diff options
author | lloyd <[email protected]> | 2008-10-11 20:55:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-11 20:55:52 +0000 |
commit | 78d1b1f0fc224388c8b2c2f6c193b7bb4861ebd0 (patch) | |
tree | b29eef58ffbc26ce092e6ec53430a1aff7d6c9b3 /checks/x509.cpp | |
parent | 7d20d06825918fbcaaf219e4bb8e0fdfc31c5a8b (diff) |
Generate an ECDSA cert if ECDSA is enabled during tests
Diffstat (limited to 'checks/x509.cpp')
-rw-r--r-- | checks/x509.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/checks/x509.cpp b/checks/x509.cpp index d3fbc2bd9..6f191285c 100644 --- a/checks/x509.cpp +++ b/checks/x509.cpp @@ -9,6 +9,10 @@ #include <botan/dsa.h> #endif +#if defined(BOTAN_HAS_ECDSA) + #include <botan/ecdsa.h> +#endif + #ifdef BOTAN_HAS_X509 #include <botan/x509self.h> #include <botan/x509stor.h> @@ -146,7 +150,12 @@ void do_x509_tests(RandomNumberGenerator& rng) /* Create user #2's key and cert request */ std::cout << '.' << std::flush; +#if defined(BOTAN_HAS_ECDSA) + ECDSA_PrivateKey user2_key(rng, get_EC_Dom_Pars_by_oid("1.3.132.0.8")); +#else RSA_PrivateKey user2_key(rng, 1024); +#endif + std::cout << '.' << std::flush; PKCS10_Request user2_req = X509::create_cert_req(req_opts2(), user2_key, |