From 035513f43ca6f9c9ac7c8852b78e2c4a65cdec4f Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 26 Jul 2016 14:55:25 +0200 Subject: tests: userid test moved to cert-tests/ --- tests/Makefile.am | 2 +- tests/cert-tests/Makefile.am | 4 +-- tests/cert-tests/data/userid.pem | 59 ++++++++++++++++++++++++++++++++++++++++ tests/cert-tests/userid | 36 ++++++++++++++++++++++++ tests/userid/Makefile.am | 31 --------------------- tests/userid/userid | 36 ------------------------ tests/userid/userid.pem | 59 ---------------------------------------- 7 files changed, 98 insertions(+), 129 deletions(-) create mode 100644 tests/cert-tests/data/userid.pem create mode 100755 tests/cert-tests/userid delete mode 100644 tests/userid/Makefile.am delete mode 100755 tests/userid/userid delete mode 100644 tests/userid/userid.pem diff --git a/tests/Makefile.am b/tests/Makefile.am index ed80f6ba0d..0c48d293dc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,7 +20,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SUBDIRS = . pkcs1-padding pkcs8-decode pkcs12-decode \ - userid cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \ + cert-tests ocsp-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \ slow dtls srp windows if ENABLE_OPENPGP diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am index 87d372b6cd..664ee347cc 100644 --- a/tests/cert-tests/Makefile.am +++ b/tests/cert-tests/Makefile.am @@ -45,14 +45,14 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem data/template-rsa-sha3-256.pem data/template-rsa-sha3-512.pem data/template-rsa-sha3-224.pem \ data/template-rsa-sha3-384.pem \ data/name-constraints-ip2.pem data/chain-md5.pem data/gost-cert.pem \ - templates/template-tlsfeature.tmpl \ + templates/template-tlsfeature.tmpl data/userid.pem \ data/template-tlsfeature.pem data/template-tlsfeature.csr \ templates/template-tlsfeature-crq.tmpl templates/arb-extensions.tmpl data/arb-extensions.pem \ data/arb-extensions.csr dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \ pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \ - provable-dh + provable-dh userid if !HAVE_BUGGY_LIBIDN dist_check_SCRIPTS += certtool-utf8 diff --git a/tests/cert-tests/data/userid.pem b/tests/cert-tests/data/userid.pem new file mode 100644 index 0000000000..2f3474745b --- /dev/null +++ b/tests/cert-tests/data/userid.pem @@ -0,0 +1,59 @@ +# This file contains a X.509 certificate with a UID field, encoded as +# an IA5String rather than DirectoryString (i.e., TeletexString, +# PrintableString, UniversalString, UTF8String, or BMPString) which is +# the correct approach. For compatibility, it seems good to make sure +# that newer versions of GnuTLS continue to be able to read such +# certificates. + +# Thanks to Max Kellermann who reported this problem +# to gnutls-dev@gnupg.org, see Message-ID: +# <20061220125309.GA2668@roonstrasse.net>. + +# Copyright (C) 2006-2010, 2012 Free Software Foundation, Inc. +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. + +X.509 certificate info: + +Version: 3 +Serial Number (hex): 00 +Subject: UID=simon +Issuer: UID=simon +Signature Algorithm: RSA-SHA +Validity: + Not Before: Wed Dec 27 10:28:27 2006 + Not After: Thu Dec 28 10:28:30 2006 +Subject Public Key Info: + Public Key Algorithm: RSA (512 bits) +modulus: + bd:a2:fc:48:9e:c0:4c:e9:57:d0:48:17:58:6e:1f: + 74:e3:15:d5:80:db:9d:31:0b:dd:29:a2:f3:05:45: + 80:70:78:02:fe:9c:a1:92:f3:86:47:ea:f7:e9:36: + 8c:28:10:fd:fa:3f:1d:74:7b:bb:f3:0e:8b:99:44: + 05:0e:11:6f: +public exponent: + 01:00:01: + +X.509 Extensions: + Basic Constraints: (critical) + CA:FALSE + Subject Key ID: + 5E:AE:28:4A:25:2D:BD:EC:74:DC:71:E1:5E:23:9A:96:05:D8:4B:D7 + +Other information: + MD5 Fingerprint: E3:26:D8:E5:5F:54:AA:34:B9:DF:4C:1C:D6:82:CF:F2 + SHA1 Fingerprint: 5F:6E:FB:6D:B5:85:81:63:A8:1A:DC:9F:50:75:0D:57:56:53:FB:83 + Public Key ID: 5E:AE:28:4A:25:2D:BD:EC:74:DC:71:E1:5E:23:9A:96:05:D8:4B:D7 + + +-----BEGIN CERTIFICATE----- +MIIBRjCB86ADAgECAgEAMAsGCSqGSIb3DQEBBTAXMRUwEwYKCZImiZPyLGQBARYF +c2ltb24wHhcNMDYxMjI3MDkyODI3WhcNMDYxMjI4MDkyODMwWjAXMRUwEwYKCZIm +iZPyLGQBARYFc2ltb24wWTALBgkqhkiG9w0BAQEDSgAwRwJAvaL8SJ7ATOlX0EgX +WG4fdOMV1YDbnTEL3Smi8wVFgHB4Av6coZLzhkfq9+k2jCgQ/fo/HXR7u/MOi5lE +BQ4RbwIDAQABoy8wLTAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBRerihKJS297HTc +ceFeI5qWBdhL1zALBgkqhkiG9w0BAQUDQQBUuTMcLeWAXr6ihKcEdMm+pIRc5XGb +5Y7m+47risTzyqpPnDzwXI4vJm4BxHmCQg8oarkBNHaKv7nA6hCFi48w +-----END CERTIFICATE----- diff --git a/tests/cert-tests/userid b/tests/cert-tests/userid new file mode 100755 index 0000000000..912e0c94ad --- /dev/null +++ b/tests/cert-tests/userid @@ -0,0 +1,36 @@ +#!/bin/sh + +# Copyright (C) 2006, 2008, 2010, 2012 Free Software Foundation, Inc. +# +# Author: Simon Josefsson +# +# This file is part of GnuTLS. +# +# GnuTLS is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GnuTLS is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GnuTLS; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +srcdir="${srcdir:-.}" +CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" + +"${CERTTOOL}" --certificate-info --infile "${srcdir}/data/userid.pem" >out 2>&1 +RET=$? +if [ ${RET} != 0 ]; then + echo "Error in userid:" + cat out + exit 1 +fi + +rm -f out + +exit 0 diff --git a/tests/userid/Makefile.am b/tests/userid/Makefile.am deleted file mode 100644 index ea06dd5388..0000000000 --- a/tests/userid/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 2006, 2008, 2010, 2012 Free Software Foundation, Inc. -# -# Author: Simon Josefsson -# -# This file is part of GnuTLS. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this file; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -EXTRA_DIST = userid.pem - -dist_check_SCRIPTS = userid - -TESTS = userid - -TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ - LC_ALL="C" \ - top_builddir="$(top_builddir)" \ - srcdir="$(srcdir)" diff --git a/tests/userid/userid b/tests/userid/userid deleted file mode 100755 index b1c93fcf3a..0000000000 --- a/tests/userid/userid +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2006, 2008, 2010, 2012 Free Software Foundation, Inc. -# -# Author: Simon Josefsson -# -# This file is part of GnuTLS. -# -# GnuTLS is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# GnuTLS is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GnuTLS; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -srcdir="${srcdir:-.}" -CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}" - -"${CERTTOOL}" --certificate-info --infile "${srcdir}/userid.pem" >out 2>&1 -RET=$? -if [ ${RET} != 0 ]; then - echo "Error in userid:" - cat out - exit 1 -fi - -rm -f out - -exit 0 diff --git a/tests/userid/userid.pem b/tests/userid/userid.pem deleted file mode 100644 index 2f3474745b..0000000000 --- a/tests/userid/userid.pem +++ /dev/null @@ -1,59 +0,0 @@ -# This file contains a X.509 certificate with a UID field, encoded as -# an IA5String rather than DirectoryString (i.e., TeletexString, -# PrintableString, UniversalString, UTF8String, or BMPString) which is -# the correct approach. For compatibility, it seems good to make sure -# that newer versions of GnuTLS continue to be able to read such -# certificates. - -# Thanks to Max Kellermann who reported this problem -# to gnutls-dev@gnupg.org, see Message-ID: -# <20061220125309.GA2668@roonstrasse.net>. - -# Copyright (C) 2006-2010, 2012 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright -# notice and this notice are preserved. - -X.509 certificate info: - -Version: 3 -Serial Number (hex): 00 -Subject: UID=simon -Issuer: UID=simon -Signature Algorithm: RSA-SHA -Validity: - Not Before: Wed Dec 27 10:28:27 2006 - Not After: Thu Dec 28 10:28:30 2006 -Subject Public Key Info: - Public Key Algorithm: RSA (512 bits) -modulus: - bd:a2:fc:48:9e:c0:4c:e9:57:d0:48:17:58:6e:1f: - 74:e3:15:d5:80:db:9d:31:0b:dd:29:a2:f3:05:45: - 80:70:78:02:fe:9c:a1:92:f3:86:47:ea:f7:e9:36: - 8c:28:10:fd:fa:3f:1d:74:7b:bb:f3:0e:8b:99:44: - 05:0e:11:6f: -public exponent: - 01:00:01: - -X.509 Extensions: - Basic Constraints: (critical) - CA:FALSE - Subject Key ID: - 5E:AE:28:4A:25:2D:BD:EC:74:DC:71:E1:5E:23:9A:96:05:D8:4B:D7 - -Other information: - MD5 Fingerprint: E3:26:D8:E5:5F:54:AA:34:B9:DF:4C:1C:D6:82:CF:F2 - SHA1 Fingerprint: 5F:6E:FB:6D:B5:85:81:63:A8:1A:DC:9F:50:75:0D:57:56:53:FB:83 - Public Key ID: 5E:AE:28:4A:25:2D:BD:EC:74:DC:71:E1:5E:23:9A:96:05:D8:4B:D7 - - ------BEGIN CERTIFICATE----- -MIIBRjCB86ADAgECAgEAMAsGCSqGSIb3DQEBBTAXMRUwEwYKCZImiZPyLGQBARYF -c2ltb24wHhcNMDYxMjI3MDkyODI3WhcNMDYxMjI4MDkyODMwWjAXMRUwEwYKCZIm -iZPyLGQBARYFc2ltb24wWTALBgkqhkiG9w0BAQEDSgAwRwJAvaL8SJ7ATOlX0EgX -WG4fdOMV1YDbnTEL3Smi8wVFgHB4Av6coZLzhkfq9+k2jCgQ/fo/HXR7u/MOi5lE -BQ4RbwIDAQABoy8wLTAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBRerihKJS297HTc -ceFeI5qWBdhL1zALBgkqhkiG9w0BAQUDQQBUuTMcLeWAXr6ihKcEdMm+pIRc5XGb -5Y7m+47risTzyqpPnDzwXI4vJm4BxHmCQg8oarkBNHaKv7nA6hCFi48w ------END CERTIFICATE----- -- cgit v1.2.1