aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_x509.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-14 14:03:16 -0500
committerJack Lloyd <[email protected]>2017-11-14 16:35:24 -0500
commit50ebb336e119eacfacd20c4b005295cac986cdf2 (patch)
treef45feddffad600bd4e1cd7e205abcd855495d0aa /src/tests/unit_x509.cpp
parentcd7866e3ec00beff057228cf3fb87b72df02f88f (diff)
Fix PKCS10 subject alt name usage
GH #1010
Diffstat (limited to 'src/tests/unit_x509.cpp')
-rw-r--r--src/tests/unit_x509.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp
index da60348c8..d2156cf60 100644
--- a/src/tests/unit_x509.cpp
+++ b/src/tests/unit_x509.cpp
@@ -538,6 +538,11 @@ Test::Result test_x509_cert(const std::string& sig_algo, const std::string& hash
result.test_eq("issuer info Orga", user1_issuer_dn.get_first_attribute("O"), ca_opts().organization);
result.test_eq("issuer info OrgaUnit", user1_issuer_dn.get_first_attribute("OU"), ca_opts().org_unit);
+ const Botan::AlternativeName& user1_altname = user1_cert.subject_alt_name();
+ result.test_eq("subject alt email", user1_altname.get_first_attribute("RFC822"), "[email protected]");
+ result.test_eq("subject alt email", user1_altname.get_first_attribute("DNS"), "botan.randombit.net");
+ result.test_eq("subject alt email", user1_altname.get_first_attribute("URI"), "https://botan.randombit.net");
+
const Botan::X509_CRL crl1 = ca.new_crl(Test::rng());
/* Verify the certs */