From 688a26799a8e1f8877997ece9532c0bb8513ac1a Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 3 Aug 2017 14:00:32 -0400 Subject: Test encoding of challenge password in PKCS10 requests --- src/tests/unit_x509.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tests') diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp index 89eef51d7..66cbddb36 100644 --- a/src/tests/unit_x509.cpp +++ b/src/tests/unit_x509.cpp @@ -60,6 +60,8 @@ Botan::X509_Cert_Options req_opts1(const std::string& algo) opts.not_before("160101200000Z"); opts.not_after("300101200000Z"); + opts.challenge = "zoom"; + if(algo == "RSA") { opts.constraints = Botan::Key_Constraints(Botan::KEY_ENCIPHERMENT); @@ -389,6 +391,9 @@ Test::Result test_x509_cert(const std::string& sig_algo, const std::string& hash hash_fn, Test::rng()); + result.test_eq("PKCS10 challenge password parsed", + user1_req.challenge_password(), "zoom"); + /* Create user #2's key and cert request */ std::unique_ptr user2_key(make_a_private_key(sig_algo)); -- cgit v1.2.3