diff options
author | lloyd <[email protected]> | 2008-10-01 14:35:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-01 14:35:05 +0000 |
commit | 9320b5e5c1b64894a6ff8797f392b57dfd72dea3 (patch) | |
tree | 0f32f404d3c4aa1590acc848888eac715e5e2320 | |
parent | 927b1a4b991fd7d4893c9f733f79ac015690e7b9 (diff) |
Hook ECDSA into get_{public,private}_key
-rw-r--r-- | src/pk/pubkey/pk_algs.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pk/pubkey/pk_algs.cpp b/src/pk/pubkey/pk_algs.cpp index 83ceb61c7..3c1b81ba9 100644 --- a/src/pk/pubkey/pk_algs.cpp +++ b/src/pk/pubkey/pk_algs.cpp @@ -17,6 +17,10 @@ #include <botan/dh.h> #endif +#ifdef BOTAN_HAS_ECDSA + #include <botan/ec.h> +#endif + #ifdef BOTAN_HAS_NR #include <botan/nr.h> #endif @@ -60,6 +64,10 @@ Public_Key* get_public_key(const std::string& alg_name) if(alg_name == "ELG") return new ElGamal_PublicKey; #endif +#if defined(BOTAN_HAS_ECDSA) + if(alg_name == "ECDSA") return new ECDSA_PublicKey; +#endif + return 0; } @@ -92,6 +100,10 @@ Private_Key* get_private_key(const std::string& alg_name) if(alg_name == "ELG") return new ElGamal_PrivateKey; #endif +#if defined(BOTAN_HAS_ECDSA) + if(alg_name == "ECDSA") return new ECDSA_PrivateKey; +#endif + return 0; } |