Blame tests/system-override-sig-hash.sh

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