aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-03 14:00:32 -0400
committerJack Lloyd <[email protected]>2017-08-03 14:00:32 -0400
commit688a26799a8e1f8877997ece9532c0bb8513ac1a (patch)
tree15f925dd16869ee6533239145e92c5a85f495c04 /src/tests
parent147eb1c26c236a362c4fb42a3d119ef10175092d (diff)
Test encoding of challenge password in PKCS10 requests
Diffstat (limited to 'src/tests')
-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 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<Botan::Private_Key> user2_key(make_a_private_key(sig_algo));