|
Packit Service |
4684c1 |
#!/bin/sh
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
# Copyright (C) 2019 Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
#
|
|
Packit Service |
4684c1 |
# Author: Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
#
|
|
Packit Service |
4684c1 |
# This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
#
|
|
Packit Service |
4684c1 |
# GnuTLS is free software; you can redistribute it and/or modify it
|
|
Packit Service |
4684c1 |
# under the terms of the GNU General Public License as published by the
|
|
Packit Service |
4684c1 |
# Free Software Foundation; either version 3 of the License, or (at
|
|
Packit Service |
4684c1 |
# your option) any later version.
|
|
Packit Service |
4684c1 |
#
|
|
Packit Service |
4684c1 |
# GnuTLS is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
# General Public License for more details.
|
|
Packit Service |
4684c1 |
#
|
|
Packit Service |
4684c1 |
# You should have received a copy of the GNU General Public License
|
|
Packit Service |
4684c1 |
# along with GnuTLS; if not, write to the Free Software Foundation,
|
|
Packit Service |
4684c1 |
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
srcdir="${srcdir:-.}"
|
|
Packit Service |
4684c1 |
CLI="${CLI:-../src/gnutls-cli${EXEEXT}}"
|
|
Packit Service |
4684c1 |
TMPFILE=c.$$.tmp
|
|
Packit Service |
4684c1 |
export GNUTLS_SYSTEM_PRIORITY_FAIL_ON_INVALID=1
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
cat <<_EOF_ > ${TMPFILE}
|
|
Packit Service |
4684c1 |
[overrides]
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
insecure-something = md5
|
|
Packit Service |
4684c1 |
insecure-hash = sha256
|
|
Packit Service |
4684c1 |
insecure-hash= sha512
|
|
Packit Service |
4684c1 |
_EOF_
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
|
|
Packit Service |
4684c1 |
${CLI} --list -d 4 >/dev/null 2>&1
|
|
Packit Service |
4684c1 |
if test $? = 0;then
|
|
Packit Service |
4684c1 |
echo "unknown option was not caught"
|
|
Packit Service |
4684c1 |
exit 1
|
|
Packit Service |
4684c1 |
fi
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
cat <<_EOF_ > ${TMPFILE}
|
|
Packit Service |
4684c1 |
[overrides]
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
insecure-sig-for-cert = rsa-sha256
|
|
Packit Service |
4684c1 |
insecure-sig = rsa-sha512
|
|
Packit Service |
4684c1 |
insecure-sig = rsa-sha1
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
[unknown-section]
|
|
Packit Service |
4684c1 |
insecure-sig = rsa-sha512
|
|
Packit Service |
4684c1 |
insecure-sig = rsa-sha1
|
|
Packit Service |
4684c1 |
_EOF_
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}"
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
${CLI} --list >/dev/null 2>&1
|
|
Packit Service |
4684c1 |
if test $? = 0;then
|
|
Packit Service |
4684c1 |
echo "unknown section was not caught"
|
|
Packit Service |
4684c1 |
exit 1
|
|
Packit Service |
4684c1 |
fi
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
exit 0
|