summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-09-24 10:44:39 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-09-24 10:44:39 +0000
commitc64fc97523570a72abc3a58a0b85cbb3da231067 (patch)
treeb169c97a8154e2d6688a1c81c8b598eb3a4ec77e /tests
parent727a7f70684a3df439f05a57f97d737e79b287fb (diff)
parent39a6de929c1a6baa2b7914bfa89275b3ee4db0e2 (diff)
downloadgnutls-c64fc97523570a72abc3a58a0b85cbb3da231067.tar.gz
Merge branch 'tmp-pkcs11-lax-search' into 'master'
Provide a less restrictive PKCS#11 search of certificates Closes #569 See merge request gnutls/gnutls!757
Diffstat (limited to 'tests')
-rw-r--r--tests/test-chains.h131
1 files changed, 131 insertions, 0 deletions
diff --git a/tests/test-chains.h b/tests/test-chains.h
index 93768fd90c..09a386c821 100644
--- a/tests/test-chains.h
+++ b/tests/test-chains.h
@@ -24,6 +24,136 @@
#define MAX_CHAIN 10
+static const char *chain_with_no_subject_id_in_ca_ok[] = {
+ "-----BEGIN CERTIFICATE-----\n"
+ "MIIFVDCCBDygAwIBAgIQR+AAAAAAXtwVoBdbGUjUQDANBgkqhkiG9w0BAQsFADBv\n"
+ "MQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRowGAYDVQQLExFTZWN1\n"
+ "cmUgU1NMIFN1Yi1DQTEwMC4GA1UEAxMnVFdDQSBTZWN1cmUgU1NMIENlcnRpZmlj\n"
+ "YXRpb24gQXV0aG9yaXR5MB4XDTE2MDcyNjAyMTY1NloXDTE5MDcyNjE1NTk1OVow\n"
+ "gaAxCzAJBgNVBAYTAlRXMQ8wDQYDVQQIEwZUYWl3YW4xDzANBgNVBAcTBlRhaXBl\n"
+ "aTEjMCEGA1UEChMaTmF0aW9uYWwgVGFpd2FuIFVuaXZlcnNpdHkxMzAxBgNVBAsT\n"
+ "KkNvbXB1dGVyIGFuZCBJbm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g4VfSnQO8d57+\n"
+ "nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlglPx4mI88k1HtQJAH32RjJMtOcQWh\n"
+ "15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryPA9gK8kxkRr05YuWW\n"
+ "6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3mi4TW\n"
+ "nsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5j\n"
+ "wa19hAM8EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWz\n"
+ "aGHQRiapIVJpLesux+t3zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmy\n"
+ "KwbQBM0=\n"
+ "-----END CERTIFICATE-----\n"
+};
+
static const char *rsa_pss_chain_smaller_salt_in_sig_fail[] = {
"-----BEGIN CERTIFICATE-----\n"
"MIIDfzCCAjegAwIBAgIMWXnRYyUPHcgwMUF2MD0GCSqGSIb3DQEBCjAwoA0wCwYJ\n"
@@ -3999,6 +4129,7 @@ static struct
{ "rsa pss: chain with increasing salt size - ok", rsa_pss_chain_increasing_salt_size_ok, &rsa_pss_chain_increasing_salt_size_ok[3], 0, 0, 0, 1501159136},
{ "rsa pss: chain with alternating signatures - ok", rsa_pss_chain_pkcs11_pss_pkcs1_ok, &rsa_pss_chain_pkcs11_pss_pkcs1_ok[3], 0, 0, 0, 1501159136},
{ "rsa pss: chain with changing hashes - ok", rsa_pss_chain_sha512_sha384_sha256_ok, &rsa_pss_chain_sha512_sha384_sha256_ok[3], 0, 0, 0, 1501159136},
+ { "no subject id: chain with missing subject id, but valid auth id - ok", chain_with_no_subject_id_in_ca_ok, &chain_with_no_subject_id_in_ca_ok[4], 0, 0, 0, 1537518468},
#ifdef ENABLE_GOST
{ "gost 34.10-01 - ok", gost01, &gost01[2], 0, 0, 0, 1466612070, 1},
{ "gost 34.10-01 - not ok (due to profile)", gost01, &gost01[2], GNUTLS_PROFILE_TO_VFLAGS(GNUTLS_PROFILE_ULTRA),