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 16:39:05 +0200
commit2ed544849ab97652329c0dfa50325d82efb0619c (patch)
treea0fa6c1aaa238984c4e4d64609189c169eaa1ea6 /tests
parent35a0e0de18f4a7f64fad2ef9797f0ea05b03a172 (diff)
downloadgnutls-2ed544849ab97652329c0dfa50325d82efb0619c.tar.gz
tests: utilize the email_protection_key template optiontmp-certtool-update
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
-rwxr-xr-xtests/cert-tests/crq1
-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
5 files changed, 21 insertions, 19 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index 728c8a597a..8cef7615d4 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -98,11 +98,7 @@ dist_check_SCRIPTS += openpgp-certs
endif
endif
-dist_check_SCRIPTS += certtool-utf8
-
-if ENABLE_NON_SUITEB_CURVES
-dist_check_SCRIPTS += crq
-endif
+dist_check_SCRIPTS += certtool-utf8 crq
if !WINDOWS
dist_check_SCRIPTS += template-test pem-decoding othername-test krb5-test sha3-test md5-test \
diff --git a/tests/cert-tests/crq b/tests/cert-tests/crq
index 31d9e76c4c..3edc004d6b 100755
--- a/tests/cert-tests/crq
+++ b/tests/cert-tests/crq
@@ -108,6 +108,7 @@ super-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very
N
Y
+N
Y
N
N
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-----
-MIIDzjCCAzegAwIBAgIBCTANBgkqhkiG9w0BAQsFADB7MRUwEwYDVQQDEwxDaW5k
+MIID4zCCA0ygAwIBAgIBCTANBgkqhkiG9w0BAQsFADB7MRUwEwYDVQQDEwxDaW5k
eSBMYXVwZXIxFzAVBgoJkiaJk/IsZAEBEwdjbGF1cGVyMRcwFQYDVQQLEw5zbGVl
c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ZfMA0GCSqGSIb3DQEBCwUAA4GBAIGsimh5r4PgCx1gQPqx
-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"