From 4d6b31a999f9c23aa34ada5ca2ffd2101a6db9f5 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Sun, 12 Jul 2009 11:11:06 +0000 Subject: [PATCH] - Added extra certificates and tests --- tests/data_files/cert_md2.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_md4.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_md5.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_sha1.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_sha224.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_sha256.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_sha384.crt | 77 ++++++++++++++++++++++++++ tests/data_files/cert_sha512.crt | 77 ++++++++++++++++++++++++++ tests/data_files/crl.pem | 11 ++++ tests/suites/test_suite_x509parse.data | 49 ++++++++++++++-- 10 files changed, 671 insertions(+), 5 deletions(-) create mode 100644 tests/data_files/cert_md2.crt create mode 100644 tests/data_files/cert_md4.crt create mode 100644 tests/data_files/cert_md5.crt create mode 100644 tests/data_files/cert_sha1.crt create mode 100644 tests/data_files/cert_sha224.crt create mode 100644 tests/data_files/cert_sha256.crt create mode 100644 tests/data_files/cert_sha384.crt create mode 100644 tests/data_files/cert_sha512.crt create mode 100644 tests/data_files/crl.pem diff --git a/tests/data_files/cert_md2.crt b/tests/data_files/cert_md2.crt new file mode 100644 index 000000000..bfea77b6f --- /dev/null +++ b/tests/data_files/cert_md2.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 9 (0x9) + Signature Algorithm: md2WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: md2WithRSAEncryption + 28:5a:dd:48:fb:ec:80:fe:de:b7:20:c0:4c:05:a9:4b:51:e9: + a7:d1:4b:5e:76:42:d2:5d:9a:14:19:3b:cb:f9:91:d7:0f:11: + c9:cd:dd:00:8b:2c:76:73:22:a0:19:49:81:63:40:30:48:27: + 62:90:ca:b8:dc:33:35:b3:4b:58:ca:dc:07:66:87:2e:ea:44: + 2a:6a:13:67:7a:32:5e:48:1d:88:88:c5:70:e6:e7:ec:1b:2f: + a7:f4:61:71:29:f6:66:93:30:60:7e:b3:4c:01:c8:2c:53:ce: + 00:11:ec:bf:f6:f2:ce:51:97:d8:ed:ed:dc:c9:6b:b8:19:15: + c8:9a:61:6d:12:9a:99:25:d8:03:1d:a6:4c:20:a5:f8:46:a3: + 05:32:bb:1a:8e:1a:65:0d:f3:13:35:1d:6f:73:28:31:12:d7: + c4:9e:73:a0:a7:ce:82:25:d1:40:e8:1b:77:60:f3:3e:81:7f: + 19:ee:cf:97:4d:c8:c3:35:9b:72:98:3b:c3:35:43:14:0a:04: + 21:7b:f7:db:e6:5f:ce:21:d1:ce:bf:b7:ef:c1:63:21:c2:78: + e1:37:aa:b1:e0:31:b3:b6:63:4c:fd:66:c8:e6:cf:f8:d9:97: + 2f:cf:92:81:3f:d4:bf:ec:e2:ad:6e:39:c7:a6:a8:e0:32:b0: + 2e:0d:e1:30 +-----BEGIN CERTIFICATE----- +MIIDPzCCAiegAwIBAgIBCTANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA8MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQyMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhcMliz +1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtgYjGD +J39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KHqHza +CYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP6zXJ +8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCeJF1y +leCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwIDAQAB +o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+btjAf +BgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQIFAAOC +AQEAKFrdSPvsgP7etyDATAWpS1Hpp9FLXnZC0l2aFBk7y/mR1w8Ryc3dAIssdnMi +oBlJgWNAMEgnYpDKuNwzNbNLWMrcB2aHLupEKmoTZ3oyXkgdiIjFcObn7Bsvp/Rh +cSn2ZpMwYH6zTAHILFPOABHsv/byzlGX2O3t3MlruBkVyJphbRKamSXYAx2mTCCl ++EajBTK7Go4aZQ3zEzUdb3MoMRLXxJ5zoKfOgiXRQOgbd2DzPoF/Ge7Pl03IwzWb +cpg7wzVDFAoEIXv32+ZfziHRzr+378FjIcJ44TeqseAxs7ZjTP1myObP+NmXL8+S +gT/Uv+zirW45x6ao4DKwLg3hMA== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_md4.crt b/tests/data_files/cert_md4.crt new file mode 100644 index 000000000..eb05fad87 --- /dev/null +++ b/tests/data_files/cert_md4.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10 (0xa) + Signature Algorithm: md4WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD4 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: md4WithRSAEncryption + 3d:34:e7:aa:98:28:91:95:d4:df:be:66:4e:92:7f:25:f7:ce: + 23:59:db:30:52:3f:67:a0:ab:06:18:be:32:ad:f9:d5:24:87: + 90:c5:ac:42:a6:8f:2a:e3:b3:36:c4:9c:38:e4:2e:6a:64:26: + 33:39:e0:46:4e:f5:09:a7:d2:cd:6a:16:30:49:80:81:4c:19: + 43:2e:55:0d:b8:18:d6:db:8e:e0:3e:25:ca:a2:74:76:b7:1c: + 97:13:db:21:83:50:38:eb:f7:36:d5:74:3d:fc:90:d8:7f:d6: + ad:2d:5d:ab:99:fc:45:41:c1:55:22:f7:57:c0:c5:24:a0:67: + a0:e8:03:f1:98:87:7a:be:d9:57:04:06:ba:57:29:ca:6e:33: + 28:16:7d:fa:5c:2b:ae:40:78:01:6f:77:9f:54:94:fb:bb:73: + 3f:f1:ca:81:4f:65:49:2c:1a:62:15:fe:0e:43:d3:81:10:b2: + b6:e9:92:f9:b8:be:cf:50:85:a4:65:af:ed:fa:58:6c:5c:90: + b1:ae:90:7a:a4:68:93:cf:85:6b:73:98:c0:a7:97:d7:03:59: + 0c:97:33:1b:9d:5a:4a:9d:31:71:c3:e4:57:21:1e:9a:67:16: + 89:ff:de:42:88:97:05:cf:ab:63:3b:a4:fc:7f:7b:4d:54:b7: + f5:bb:68:c4 +-----BEGIN CERTIFICATE----- +MIIDPzCCAiegAwIBAgIBCjANBgkqhkiG9w0BAQMFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA8MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQ0MIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhcMliz +1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtgYjGD +J39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KHqHza +CYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP6zXJ +8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCeJF1y +leCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwIDAQAB +o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+btjAf +BgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQMFAAOC +AQEAPTTnqpgokZXU375mTpJ/JffOI1nbMFI/Z6CrBhi+Mq351SSHkMWsQqaPKuOz +NsScOOQuamQmMzngRk71CafSzWoWMEmAgUwZQy5VDbgY1tuO4D4lyqJ0drcclxPb +IYNQOOv3NtV0PfyQ2H/WrS1dq5n8RUHBVSL3V8DFJKBnoOgD8ZiHer7ZVwQGulcp +ym4zKBZ9+lwrrkB4AW93n1SU+7tzP/HKgU9lSSwaYhX+DkPTgRCytumS+bi+z1CF +pGWv7fpYbFyQsa6QeqRok8+Fa3OYwKeX1wNZDJczG51aSp0xccPkVyEemmcWif/e +QoiXBc+rYzuk/H97TVS39btoxA== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_md5.crt b/tests/data_files/cert_md5.crt new file mode 100644 index 000000000..919d184c6 --- /dev/null +++ b/tests/data_files/cert_md5.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 11 (0xb) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD5 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: md5WithRSAEncryption + 7d:c7:ae:4b:1d:56:8c:c8:2a:40:13:24:91:38:b0:72:77:6a: + a3:fd:7e:0d:30:ca:96:7e:55:85:ff:fb:cd:a7:29:bd:a3:f8: + bc:df:e3:ee:f8:f0:5d:4b:91:0e:f6:e2:c5:9c:3f:74:26:d1: + d2:37:13:59:09:d6:39:43:ce:d7:67:70:92:c8:98:2b:5a:f5: + 09:e1:ea:d9:43:f1:92:61:b8:43:74:d8:a9:f0:af:b6:df:11: + 61:cd:8f:35:39:1f:d1:17:70:f9:2b:86:3e:df:4b:c6:81:0b: + f5:cc:de:62:dd:f7:7f:14:2a:1a:e7:98:3d:6e:db:1c:47:df: + 8d:31:49:7b:78:b0:81:89:c8:b5:f5:e9:e4:9e:00:a5:20:70: + e5:32:56:e6:a7:be:68:ba:bf:d4:8e:8f:c8:42:31:30:b3:39: + fa:3e:9c:70:53:64:d6:96:af:f7:8a:e7:de:20:3a:f0:66:71: + 98:ec:c0:f8:52:c9:07:be:29:0e:0d:6e:7e:4e:36:9c:bb:a1: + 5a:ea:1e:6f:d9:8e:81:0c:58:88:1a:be:1b:01:14:ad:ad:4a: + 58:7a:10:53:43:1b:6d:2d:17:44:94:ba:31:5d:09:4e:85:5c: + c7:f2:c2:53:a5:1d:58:dc:4e:de:3c:88:b3:13:5a:7f:5d:a5: + c6:e6:3a:f7 +-----BEGIN CERTIFICATE----- +MIIDPzCCAiegAwIBAgIBCzANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA8MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQ1MIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhcMliz +1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtgYjGD +J39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KHqHza +CYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP6zXJ +8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCeJF1y +leCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwIDAQAB +o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+btjAf +BgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQQFAAOC +AQEAfceuSx1WjMgqQBMkkTiwcndqo/1+DTDKln5Vhf/7zacpvaP4vN/j7vjwXUuR +DvbixZw/dCbR0jcTWQnWOUPO12dwksiYK1r1CeHq2UPxkmG4Q3TYqfCvtt8RYc2P +NTkf0Rdw+SuGPt9LxoEL9czeYt33fxQqGueYPW7bHEffjTFJe3iwgYnItfXp5J4A +pSBw5TJW5qe+aLq/1I6PyEIxMLM5+j6ccFNk1pav94rn3iA68GZxmOzA+FLJB74p +Dg1ufk42nLuhWuoeb9mOgQxYiBq+GwEUra1KWHoQU0MbbS0XRJS6MV0JToVcx/LC +U6UdWNxO3jyIsxNaf12lxuY69w== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_sha1.crt b/tests/data_files/cert_sha1.crt new file mode 100644 index 000000000..495c1aa38 --- /dev/null +++ b/tests/data_files/cert_sha1.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 12 (0xc) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: sha1WithRSAEncryption + 0b:3d:49:a6:2a:23:fa:f1:5d:dd:c0:7e:b4:a4:47:cb:78:a8: + 58:62:e5:80:e2:50:19:41:0e:22:98:fc:51:40:f1:64:88:4c: + 2f:90:f9:eb:5e:93:51:bc:53:31:df:86:07:b0:bb:43:57:4d: + dc:0e:4d:6a:67:90:57:e1:3f:3c:df:a9:f6:fb:02:c8:fc:88: + 91:35:c9:6c:a1:dd:2d:4f:0e:36:e9:d2:6b:1d:9b:3e:e9:01: + bd:11:cd:e0:fa:c3:8f:8d:07:ae:e4:aa:a2:80:3d:ad:10:02: + d9:f2:e8:c5:37:3f:95:f9:fa:b0:c6:57:b7:ad:16:a6:c8:ec: + f8:d5:46:d4:26:53:5e:33:52:ff:aa:c0:b8:c2:3c:b5:cb:30: + d9:6c:6f:6e:68:c8:5c:61:62:28:51:72:3b:57:17:1d:05:8c: + d8:4f:63:f4:51:25:e4:4d:37:3c:2e:dc:5e:d9:c9:e2:b0:16: + f9:25:cb:02:65:28:4f:b7:b6:16:c0:d9:04:1c:0e:b6:70:79: + 3b:a6:aa:42:ee:37:97:3c:11:26:39:7b:b9:be:29:0c:06:e6: + f7:05:9f:38:19:22:d5:6e:44:52:1b:24:c8:6f:1f:8c:bc:71: + c2:7a:c3:17:ac:58:fd:c6:2e:5c:1c:83:c9:bc:a3:c7:81:1a: + 09:d5:0d:49 +-----BEGIN CERTIFICATE----- +MIIDQDCCAiigAwIBAgIBDDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA9MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxGzAZBgNVBAMTElBvbGFyU1NMIENlcnQgU0hBMTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANwTdIHGEvZnXaFmcu3cebZYXDJY +s9QU/WwCYZ4LmUZjowpB1EIzIebtQwdaHaI7ZCmoKsFmKABZ2AxJLTC3PYy7YGIx +gyd/S5WSLqDWxoSUS7Pkpsz/MjrF7EzJJFi/szN3arUXiwIQKY6VqpFgF0NCh6h8 +2gmDmJ16ZV4gUgcuZaUx/dl0HgDJrp2BVosICvUenNyiXmzb/xGDFfTRJFebD+s1 +yfGqRk50f/4dsJEfiUqEy9914813gmIJ5Z9tKd4uJdhItiC+UZdMLSBlLSpQniRd +cpXgogZBjGHkUFd0lrEptaGIN/FcnrKejoONcju1XP67EolyXKH52BgpsicCAwEA +AaNNMEswCQYDVR0TBAIwADAdBgNVHQ4EFgQUt1HU5SDVRVT0xVEb4IK1YQWvm7Yw +HwYDVR0jBBgwFoAUzyIxJ5HYwlT/HtrZ7orFiTKtDCEwDQYJKoZIhvcNAQEFBQAD +ggEBAAs9SaYqI/rxXd3AfrSkR8t4qFhi5YDiUBlBDiKY/FFA8WSITC+Q+etek1G8 +UzHfhgewu0NXTdwOTWpnkFfhPzzfqfb7Asj8iJE1yWyh3S1PDjbp0msdmz7pAb0R +zeD6w4+NB67kqqKAPa0QAtny6MU3P5X5+rDGV7etFqbI7PjVRtQmU14zUv+qwLjC +PLXLMNlsb25oyFxhYihRcjtXFx0FjNhPY/RRJeRNNzwu3F7ZyeKwFvklywJlKE+3 +thbA2QQcDrZweTumqkLuN5c8ESY5e7m+KQwG5vcFnzgZItVuRFIbJMhvH4y8ccJ6 +wxesWP3GLlwcg8m8o8eBGgnVDUk= +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_sha224.crt b/tests/data_files/cert_sha224.crt new file mode 100644 index 000000000..02d39a7a7 --- /dev/null +++ b/tests/data_files/cert_sha224.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 13 (0xd) + Signature Algorithm: sha224WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA224 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: sha224WithRSAEncryption + 81:8e:2e:bb:77:a3:7c:53:02:9e:9c:d7:66:e3:f5:3f:a6:19: + ff:09:8c:7d:4b:10:5f:c3:bd:ad:fc:cc:5c:dc:92:ef:1e:c3: + 74:70:a6:88:0d:4c:4d:2c:45:0b:76:90:b5:2f:13:93:ee:79: + ea:2a:91:f5:ab:6c:dc:5d:3d:f1:b8:3d:bb:d1:a8:40:3d:16: + 11:97:50:59:39:41:54:9f:c3:a6:d9:81:36:6d:85:90:a1:fb: + c3:6b:3d:5f:24:95:c5:1e:e4:bc:bc:22:b6:9d:6b:60:c1:3a: + 35:21:13:19:ff:82:0e:4f:e5:50:53:db:cc:51:1b:bc:4d:12: + ca:79:cc:cc:a0:6e:b5:9a:5a:25:c2:c6:e3:e2:fb:04:ba:d4: + 0d:69:ce:d3:8c:60:54:d2:32:75:8a:4d:08:ee:b0:01:15:ef: + 80:9a:ae:dd:e5:47:5a:a3:99:e8:eb:aa:38:51:6c:5a:94:6f: + 7b:6c:c6:34:eb:66:5a:da:83:53:eb:32:6c:1e:8d:7e:20:09: + 4c:9b:05:57:e8:27:71:84:53:5f:be:c3:e9:87:9f:8a:a0:41: + 67:5e:c5:7e:a8:c4:31:31:aa:f4:4b:95:c7:eb:83:01:da:8a: + 7f:0c:f3:07:b2:5f:8e:28:2e:85:a0:d8:ef:d8:35:6b:cd:42: + 92:cc:44:0e +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIBDTANBgkqhkiG9w0BAQ4FADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA/MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMjI0MIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhc +Mliz1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtg +YjGDJ39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KH +qHzaCYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP +6zXJ8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCe +JF1yleCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwID +AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+b +tjAfBgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQ4F +AAOCAQEAgY4uu3ejfFMCnpzXZuP1P6YZ/wmMfUsQX8O9rfzMXNyS7x7DdHCmiA1M +TSxFC3aQtS8Tk+556iqR9ats3F098bg9u9GoQD0WEZdQWTlBVJ/DptmBNm2FkKH7 +w2s9XySVxR7kvLwitp1rYME6NSETGf+CDk/lUFPbzFEbvE0SynnMzKButZpaJcLG +4+L7BLrUDWnO04xgVNIydYpNCO6wARXvgJqu3eVHWqOZ6OuqOFFsWpRve2zGNOtm +WtqDU+sybB6NfiAJTJsFV+gncYRTX77D6YefiqBBZ17FfqjEMTGq9EuVx+uDAdqK +fwzzB7JfjiguhaDY79g1a81CksxEDg== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_sha256.crt b/tests/data_files/cert_sha256.crt new file mode 100644 index 000000000..e5e337270 --- /dev/null +++ b/tests/data_files/cert_sha256.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 14 (0xe) + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA256 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: sha256WithRSAEncryption + 0f:4c:70:2a:ad:b8:43:ea:97:3d:5d:d6:0a:d8:e1:42:b9:3d: + 42:42:a1:dd:df:37:e3:0c:ab:40:aa:10:3c:f6:88:c1:e9:82: + ac:35:f6:f7:66:d1:ee:71:bd:b5:9f:48:dc:e2:09:8a:3e:0e: + 1d:da:12:e4:f3:53:a1:a1:d9:b2:32:df:e2:83:5d:c8:df:fa: + 1a:6c:f4:c0:94:cc:20:6b:2b:74:9e:c1:35:d7:2a:ea:99:f8: + 31:50:e9:c1:5d:3b:14:d4:12:96:b2:06:a3:4d:0f:f5:a9:8f: + 44:08:61:15:0a:92:bd:29:0b:8d:c1:87:0a:40:de:29:b8:4f: + 92:e4:b8:fa:d3:ec:5f:55:5e:32:69:57:60:6b:6a:02:89:2a: + d4:8e:91:5e:fd:45:d0:21:07:92:d6:c0:9b:ed:d0:d1:07:b9: + 84:65:01:47:ed:95:03:a5:67:66:30:83:21:87:bb:4c:08:1b: + 79:97:ec:ad:f8:89:7f:01:29:07:6a:d4:58:c6:11:d4:bc:1d: + 4f:03:3b:ef:11:a5:e7:8b:4b:29:b5:c5:7d:57:8a:6b:e5:11: + 0a:39:aa:ef:bf:53:82:ea:34:24:42:84:11:91:ba:cb:71:7e: + fa:f7:d3:1e:2b:c4:14:10:0a:16:0a:b7:a5:e2:89:ca:79:dd: + d1:ad:d2:00 +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIBDjANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA/MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMjU2MIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhc +Mliz1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtg +YjGDJ39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KH +qHzaCYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP +6zXJ8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCe +JF1yleCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwID +AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+b +tjAfBgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQsF +AAOCAQEAD0xwKq24Q+qXPV3WCtjhQrk9QkKh3d834wyrQKoQPPaIwemCrDX292bR +7nG9tZ9I3OIJij4OHdoS5PNToaHZsjLf4oNdyN/6Gmz0wJTMIGsrdJ7BNdcq6pn4 +MVDpwV07FNQSlrIGo00P9amPRAhhFQqSvSkLjcGHCkDeKbhPkuS4+tPsX1VeMmlX +YGtqAokq1I6RXv1F0CEHktbAm+3Q0Qe5hGUBR+2VA6VnZjCDIYe7TAgbeZfsrfiJ +fwEpB2rUWMYR1LwdTwM77xGl54tLKbXFfVeKa+URCjmq779Tguo0JEKEEZG6y3F+ ++vfTHivEFBAKFgq3peKJynnd0a3SAA== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_sha384.crt b/tests/data_files/cert_sha384.crt new file mode 100644 index 000000000..edba71904 --- /dev/null +++ b/tests/data_files/cert_sha384.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 15 (0xf) + Signature Algorithm: sha384WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:56:59 2009 GMT + Not After : Jul 12 10:56:59 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA384 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: sha384WithRSAEncryption + 21:92:8d:39:05:a4:16:00:35:0b:de:ce:a8:17:9f:b8:a1:8b: + ad:5c:17:40:a8:5a:3b:c9:e5:5a:48:0d:e4:c3:6f:22:5a:eb: + 19:85:10:a2:af:8f:71:e7:ca:a9:4f:be:01:3d:ba:8b:91:40: + 25:f3:51:b6:d9:54:ae:4a:1d:2a:da:dd:9f:f8:70:07:31:35: + c0:ea:5e:ca:c5:76:38:08:f1:63:0d:8d:f7:96:3a:97:cb:a0: + f0:33:0f:2a:91:e4:13:30:73:68:74:92:e5:08:af:27:b8:14: + 8e:b5:f6:a8:95:f2:52:c9:d1:bc:35:fa:97:ef:74:9e:dc:cc: + df:b3:d2:cd:8e:f1:fa:81:6d:b0:38:37:10:4a:1d:f7:ed:10: + 33:da:e0:2f:ae:bb:a8:6a:02:f9:44:d7:46:a6:fb:89:b3:d7: + 5b:dc:55:7d:a9:51:c5:f2:79:d8:60:b7:52:7c:9d:e5:13:ed: + 98:1d:39:1b:fa:da:b9:70:53:51:22:22:03:1c:6e:f6:5d:88: + d8:a8:5e:95:8d:27:69:97:d5:a6:3f:ae:83:9b:02:e9:45:21: + e6:df:d5:84:ec:78:3a:e2:e7:a9:8a:e9:62:fa:fc:dc:94:86: + 66:30:48:ea:dc:e2:5f:c0:52:d1:be:d0:03:c4:e3:7c:52:ce: + 79:f1:26:84 +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIBDzANBgkqhkiG9w0BAQwFADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA/MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMzg0MIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhc +Mliz1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtg +YjGDJ39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KH +qHzaCYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP +6zXJ8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCe +JF1yleCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwID +AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+b +tjAfBgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQwF +AAOCAQEAIZKNOQWkFgA1C97OqBefuKGLrVwXQKhaO8nlWkgN5MNvIlrrGYUQoq+P +cefKqU++AT26i5FAJfNRttlUrkodKtrdn/hwBzE1wOpeysV2OAjxYw2N95Y6l8ug +8DMPKpHkEzBzaHSS5QivJ7gUjrX2qJXyUsnRvDX6l+90ntzM37PSzY7x+oFtsDg3 +EEod9+0QM9rgL667qGoC+UTXRqb7ibPXW9xVfalRxfJ52GC3Unyd5RPtmB05G/ra +uXBTUSIiAxxu9l2I2KhelY0naZfVpj+ug5sC6UUh5t/VhOx4OuLnqYrpYvr83JSG +ZjBI6tziX8BS0b7QA8TjfFLOefEmhA== +-----END CERTIFICATE----- diff --git a/tests/data_files/cert_sha512.crt b/tests/data_files/cert_sha512.crt new file mode 100644 index 000000000..5bffb81a5 --- /dev/null +++ b/tests/data_files/cert_sha512.crt @@ -0,0 +1,77 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 16 (0x10) + Signature Algorithm: sha512WithRSAEncryption + Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA + Validity + Not Before: Jul 12 10:57:00 2009 GMT + Not After : Jul 12 10:57:00 2011 GMT + Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA512 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: + 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: + 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: + 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: + 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: + 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: + ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: + 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: + 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: + 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: + 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: + c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: + cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: + 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: + 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: + 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: + 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: + b2:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 + X509v3 Authority Key Identifier: + keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 + + Signature Algorithm: sha512WithRSAEncryption + 19:13:61:13:81:ff:a2:c4:cf:45:dc:4f:40:e5:ce:a6:78:fb: + ff:49:a2:f7:58:d5:36:c0:e4:78:2a:0c:68:97:21:62:76:5e: + 7f:4c:11:aa:31:13:17:22:d9:26:93:14:5e:60:6a:48:dd:56: + d2:b5:5d:9b:9a:d8:e0:c4:4a:42:53:de:43:2b:3e:82:0c:b7: + dd:f7:c5:5c:89:63:28:a9:8d:96:40:3a:0b:5b:df:7d:1e:4d: + b2:84:d8:38:1b:80:b6:28:d0:48:d0:42:30:f1:31:ec:ed:2e: + a2:e3:9d:e2:88:3f:b9:27:8d:34:76:dd:a7:de:71:5e:05:da: + 78:9b:2b:51:f4:d2:f5:81:a5:f8:d4:78:d8:42:ba:91:24:30: + 67:18:3c:ba:03:4f:ac:98:2c:ee:15:50:25:33:be:bb:4f:64: + 54:28:51:9a:d1:9b:b6:8e:5a:db:4c:3f:89:0c:c6:e7:d4:27: + e4:4a:8d:55:11:df:46:23:9e:8a:cb:79:f3:bb:f1:1b:c0:2c: + 5f:bd:31:09:e6:f7:31:c8:9d:4c:7a:99:74:38:78:39:d5:c1: + e5:d0:48:f7:fd:00:a5:1b:c2:bb:e9:9a:a3:1f:3f:fd:47:eb: + 78:ed:3e:59:bb:16:65:1c:62:e0:a2:78:b5:bd:50:79:b9:5d: + 4f:79:a6:37 +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIBEDANBgkqhkiG9w0BAQ0FADA7MQswCQYDVQQGEwJOTDER +MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN +MDkwNzEyMTA1NzAwWhcNMTEwNzEyMTA1NzAwWjA/MQswCQYDVQQGEwJOTDERMA8G +A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBNTEyMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhc +Mliz1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtg +YjGDJ39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KH +qHzaCYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP +6zXJ8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCe +JF1yleCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwID +AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+b +tjAfBgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQ0F +AAOCAQEAGRNhE4H/osTPRdxPQOXOpnj7/0mi91jVNsDkeCoMaJchYnZef0wRqjET +FyLZJpMUXmBqSN1W0rVdm5rY4MRKQlPeQys+ggy33ffFXIljKKmNlkA6C1vffR5N +soTYOBuAtijQSNBCMPEx7O0uouOd4og/uSeNNHbdp95xXgXaeJsrUfTS9YGl+NR4 +2EK6kSQwZxg8ugNPrJgs7hVQJTO+u09kVChRmtGbto5a20w/iQzG59Qn5EqNVRHf +RiOeist587vxG8AsX70xCeb3McidTHqZdDh4OdXB5dBI9/0ApRvCu+maox8//Ufr +eO0+WbsWZRxi4KJ4tb1QebldT3mmNw== +-----END CERTIFICATE----- diff --git a/tests/data_files/crl.pem b/tests/data_files/crl.pem new file mode 100644 index 000000000..2102f0495 --- /dev/null +++ b/tests/data_files/crl.pem @@ -0,0 +1,11 @@ +-----BEGIN X509 CRL----- +MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI +UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTA5MDcxMjExMDMz +MloXDTExMDcxMjExMDMzMlowKDASAgEBFw0wOTAyMDkyMTEyMzZaMBICAQMXDTA5 +MDIwOTIxMTIzNlowDQYJKoZIhvcNAQEFBQADggEBAHNDiBinDWNwdRsALyrq48Gg +/OOk5hEtRzoKk1hxX+c66g/KvuIZMlnvEY/lbVsB4YGQ2QSF+aw3s0Y5ZQZZVyL0 +Ix4RCMk4QR8XSev7ln3r0FQOCCwheul851EcWF7FOXsErS78+bBfYv0KMlGG+yNw +gmY8PSTLvcjydSdJHmlHo2gLuAb7vLVcuqRY/saKY9PDjYXk3ezU6hrgWi8mCres +ex8zK1oeL704Wr5KPxhzmhFoaHlm5rAvOCldFw95Z6SBq8UzWXEOrPIFbePSAru0 +DVD+/PElBgJ38+edT6mVr3wjJOzxBYaexDwaVAbgE3dNrRhhcHU/KnxtjuaM9Wg= +-----END X509 CRL----- diff --git a/tests/suites/test_suite_x509parse.data b/tests/suites/test_suite_x509parse.data index c256b4c1c..4f33c8840 100644 --- a/tests/suites/test_suite_x509parse.data +++ b/tests/suites/test_suite_x509parse.data @@ -49,20 +49,59 @@ x509_time_expired:"data_files/test-ca.crt":valid_from:1 X509 Time Expired #6 x509_time_expired:"data_files/test-ca.crt":valid_to:0 -X509 Certificate verification #1 (Revoked Cert, Revoked CRL) +X509 Certificate verification #1 (Revoked Cert, Expired CRL) x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":NULL:BADCERT_REVOKED | BADCRL_EXPIRED -X509 Certificate verification #2 (Revoked Cert, Revoked CRL) +X509 Certificate verification #2 (Revoked Cert, Expired CRL) x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"PolarSSL Server 1":BADCERT_REVOKED | BADCRL_EXPIRED -X509 Certificate verification #3 (Revoked Cert, Revoked CRL, CN Mismatch) +X509 Certificate verification #3 (Revoked Cert, Expired CRL, CN Mismatch) x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"PolarSSL Wrong CN":BADCERT_REVOKED | BADCRL_EXPIRED | BADCERT_CN_MISMATCH -X509 Certificate verification #4 (Valid Cert, Revoked CRL) +X509 Certificate verification #4 (Valid Cert, Expired CRL) x509_verify:"data_files/server2.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":NULL:BADCRL_EXPIRED -X509 Certificate verification #5 (Not trusted Cert) +X509 Certificate verification #5 (Revoked Cert) +x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:BADCERT_REVOKED + +X509 Certificate verification #6 (Revoked Cert) +x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"PolarSSL Server 1":BADCERT_REVOKED + +X509 Certificate verification #7 (Revoked Cert, CN Mismatch) +x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"PolarSSL Wrong CN":BADCERT_REVOKED | BADCERT_CN_MISMATCH + +X509 Certificate verification #8 (Valid Cert) +x509_verify:"data_files/server2.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #9 (Not trusted Cert) +x509_verify:"data_files/server2.crt":"data_files/server1.crt":"data_files/crl.pem":NULL:BADCERT_NOT_TRUSTED + +X509 Certificate verification #10 (Not trusted Cert, Expired CRL) x509_verify:"data_files/server2.crt":"data_files/server1.crt":"data_files/crl_expired.pem":NULL:BADCERT_NOT_TRUSTED +X509 Certificate verification #11 (Valid Cert MD2 Digest) +x509_verify:"data_files/cert_md2.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #12 (Valid Cert MD4 Digest) +x509_verify:"data_files/cert_md4.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #13 (Valid Cert MD5 Digest) +x509_verify:"data_files/cert_md5.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #14 (Valid Cert SHA1 Digest) +x509_verify:"data_files/cert_sha1.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #15 (Valid Cert SHA224 Digest) +x509_verify:"data_files/cert_sha224.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #16 (Valid Cert SHA256 Digest) +x509_verify:"data_files/cert_sha256.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #17 (Valid Cert SHA384 Digest) +x509_verify:"data_files/cert_sha384.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + +X509 Certificate verification #18 (Valid Cert SHA512 Digest) +x509_verify:"data_files/cert_sha512.crt":"data_files/test-ca.crt":"data_files/crl.pem":NULL:0 + X509 Parse Selftest x509_selftest: