summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-05-05 14:31:30 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-05-05 21:40:19 +0200
commit0dae926e6311f0e0beed00550d2c0734c3823f0c (patch)
tree57862f0af0fee107b75186713d2b41c95f3fc4d6 /tests
parent963c8dcb4236198bc968d33e3d99b371d34e8c95 (diff)
downloadgnutls-0dae926e6311f0e0beed00550d2c0734c3823f0c.tar.gz
tests: utilize the email_protection_key template option
This ensures that generated certificates and requests will include that key purpose when the option is present. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/cert-tests/Makefile.am6
-rw-r--r--tests/cert-tests/data/arb-extensions.csr15
-rw-r--r--tests/cert-tests/data/arb-extensions.pem16
-rw-r--r--tests/cert-tests/templates/arb-extensions.tmpl2
4 files changed, 20 insertions, 19 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index a108cbe7f5..0168385d4a 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -68,7 +68,7 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem
data/openpgp-invalid7.pub data/openpgp-invalid8.pub \
data/key-corpus-rc2-1.p12 data/key-corpus-rc2-2.p12 data/key-corpus-rc2-3.p12
-dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \
+dist_check_SCRIPTS = pathlen aki certtool invalid-sig email crq \
pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \
provable-dh userid sha2-test sha2-dsa-test provable-privkey-dsa2048 \
provable-privkey-rsa2048 provable-privkey-gen-default pkcs7-constraints \
@@ -96,10 +96,6 @@ if !HAVE_BUGGY_LIBIDN
dist_check_SCRIPTS += certtool-utf8
endif
-if ENABLE_NON_SUITEB_CURVES
-dist_check_SCRIPTS += crq
-endif
-
if !WINDOWS
dist_check_SCRIPTS += template-test pem-decoding othername-test krb5-test sha3-test md5-test \
tlsfeature-test template-exts-test pkcs1-pad pkcs12-utf8
diff --git a/tests/cert-tests/data/arb-extensions.csr b/tests/cert-tests/data/arb-extensions.csr
index a166177dd7..6da7637669 100644
--- a/tests/cert-tests/data/arb-extensions.csr
+++ b/tests/cert-tests/data/arb-extensions.csr
@@ -43,6 +43,8 @@ PKCS #10 Certificate Request Information:
Hexdump: 0406beafcafefafa
Basic Constraints (critical):
Certificate Authority (CA): FALSE
+ Key Purpose (critical):
+ Email protection.
Key Usage (critical):
Digital signature.
Other Information:
@@ -55,21 +57,22 @@ Other Information:
Self signature: verified
-----BEGIN NEW CERTIFICATE REQUEST-----
-MIIDIjCCAosCAQAwezEVMBMGA1UEAxMMQ2luZHkgTGF1cGVyMRcwFQYDVQQLEw5z
+MIIDOjCCAqMCAQAwezEVMBMGA1UEAxMMQ2luZHkgTGF1cGVyMRcwFQYDVQQLEw5z
bGVlcGluZyBkZXB0LjESMBAGA1UEChMJS29rbyBpbmMuMQ8wDQYDVQQIEwZBdHRp
a2kxCzAJBgNVBAYTAkdSMRcwFQYKCZImiZPyLGQBARMHY2xhdXBlcjCBnzANBgkq
hkiG9w0BAQEFAAOBjQAwgYkCgYEApcbOdUOEv2SeAicT8QNZ93ktku18L1CkA/Et
ebmGiwV+OrtEqq+EzxOYHhxKOPczLXqfctRrbSawMTdwEPtC6didGGV+GUn8BZYE
aIMed4a/7fXlEjsT/jMYnBp6HWmvRwJgeh+56M/byDQwUZY9jJZcALxh3ggPsTYh
-f6kA4wUCAwEAAaCCAWUwggFhBgkqhkiG9w0BCQ4xggFSMIIBTjASBgMqAwQECwAB
+f6kA4wUCAwEAAaCCAX0wggF5BgkqhkiG9w0BCQ4xggFqMIIBZjASBgMqAwQECwAB
AgMEBQYHqqvNMBIGA84HCAQLAAECAwQFBgeqq80wGgYGKgMEBQYHBBAdNM1a0GXc
J8F+lEewqqynMFwGCCoDj////38HBFAXjw5BPwQcydZK9kvztmx86sb6NKTXftZM
losmx2FwlEX0DZygoACRr30hJ4nAC3OHsdDXq2I91AKdS4bbNlNiHTTNWtBl3CfB
fpRHsKqspzBSBgYqg5nLAAcESNZK9kvztmx86sb6NKTXftZMlosmx2FwlEX0DZyg
oACRr30hJ4nAC3OHsdDXq2I91AKdS4bbNlNiHTTNWtBl3CfBfpRHsKqspzANBgMY
AQUEBgQEyv6+rzATBgpyCwwNDg8QEQEFAQH/BALK/jATBgQYAQUBAQH/BAgEBr6v
-yv76+jAMBgNVHRMBAf8EAjAAMA8GA1UdDwEB/wQFAwMHgAAwDQYJKoZIhvcNAQEL
-BQADgYEAI9e1q4TPDV4ahWqNIMo4rWLuZoPiuKbWi+xJfBXeZ+D+FEA4lOLudSV/
-Y3gVRJFONKfnTi7QpmdaGro70xEN2aaE53iTaf4QO4VmPBEVuzLaOURFYuDL4S51
-Mz2bUl/XaZazrxgLCT/o8CGSSpc2tJAMKWvCHiUQQU4MQh/SUT8=
+yv76+jAMBgNVHRMBAf8EAjAAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMEMA8GA1Ud
+DwEB/wQFAwMHgAAwDQYJKoZIhvcNAQELBQADgYEAOGlrPFk5kGvLTJJCBb/uLMGU
+0Hus+/V3UqPJ9xalLG+gt5qAWxnDa6Uj3xhWdrGqgeA10Rru7WeoCKGTsZS7pVoz
+i/42Rlwr5SmolxMo6iEOc5YtkLvhHhP5GENuf6kXimfHeSRmEbkrT3T8LIPj5ep1
+ZxrmGlCiGZHBv1wjl74=
-----END NEW CERTIFICATE REQUEST-----
diff --git a/tests/cert-tests/data/arb-extensions.pem b/tests/cert-tests/data/arb-extensions.pem
index 100844da7a..5ff7214224 100644
--- a/tests/cert-tests/data/arb-extensions.pem
+++ b/tests/cert-tests/data/arb-extensions.pem
@@ -1,5 +1,5 @@
-----BEGIN CERTIFICATE-----
-MIIDzjCCAzegAwIBAgIBCTANBgkqhkiG9w0BAQsFADB7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a0GXc
J8F+lEewqqynMA0GAxgBBQQGBATK/r6vMBMGCnILDA0ODxARAQUBAf8EAsr+MBMG
-BBgBBQEBAf8ECAQGvq/K/vr6MAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFF1ArfDO
-lECVi36ZlB2SVCLKcjZfMA0GCSqGSIb3DQEBCwUAA4GBAIGsimh5r4PgCx1gQPqx
-4YnbyWLOFPolEzO2dvN5AQHl4bSLyR0VjBETmKLt7fbNWzsd8PYTf8hbX6Y5xZrf
-YTq8UXcDQptphDyOJck0XYhztk5ct4CEK/zU9wRMKAx+D7LA1dvUfB0Rj/uKUMQb
-zGTcVic26fPIQND5EQAkl8eu
+BBgBBQEBAf8ECAQGvq/K/vr6MAwGA1UdEwEB/wQCMAAwEwYDVR0lBAwwCgYIKwYB
+BQUHAwQwHQYDVR0OBBYEFF1ArfDOlECVi36ZlB2SVCLKcjZfMA0GCSqGSIb3DQEB
+CwUAA4GBABx3+l8LF+8mJ6zJlijTQh5NxLEqfoGwh6qO8AI1hDvefE2H+5D7zeAR
+CUq0m9YYwDqBghZ9cdVgAltc9uEhzzoJ0oDbHj43HNiQWOUTwzqZ/0XjuqZj2iFm
+DDjXdbtVns+tl8J/5486nNx957g5eOjSMitd2XmrhHTAmhe3fSXR
-----END CERTIFICATE-----
diff --git a/tests/cert-tests/templates/arb-extensions.tmpl b/tests/cert-tests/templates/arb-extensions.tmpl
index b812bd4362..1f2c7dc809 100644
--- a/tests/cert-tests/templates/arb-extensions.tmpl
+++ b/tests/cert-tests/templates/arb-extensions.tmpl
@@ -26,6 +26,8 @@ uid = "clauper"
serial = 9
expiration_days = 2590
+email_protection_key
+
add_extension = "1.2.3.4 0001020304050607AAABCD"
add_extension = "5.6.7.8 0x0001020304050607AAABCD"
add_extension = "1.2.3.4.5.6.7 1d34cd5ad065dc27c17e9447b0aaaca7"