From 78d1b1f0fc224388c8b2c2f6c193b7bb4861ebd0 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 11 Oct 2008 20:55:52 +0000 Subject: Generate an ECDSA cert if ECDSA is enabled during tests --- checks/x509.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'checks/x509.cpp') 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 #endif +#if defined(BOTAN_HAS_ECDSA) + #include +#endif + #ifdef BOTAN_HAS_X509 #include #include @@ -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, -- cgit v1.2.3