diff options
author | lloyd <[email protected]> | 2008-06-30 04:16:10 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-30 04:16:10 +0000 |
commit | 1a65b9d92c61f9ed17e545519dd2d2e1fe7d905f (patch) | |
tree | 57203cc88f1b8111e471942d3cfa400e300a3757 | |
parent | 4944c7fac9b38223c0a7f35e36ef5c40bee735d9 (diff) |
Remove the default_pbe option. Instead hardcode the default into
PKCS8::encrypt_key - this is slightly less flexible, but removes the
dependency on the Library_State object. And if someone wants to use
a different algorithm, they just have to pass in an actual value for the
pbe string instead of letting it default to the empty string.
-rw-r--r-- | src/pkcs8.cpp | 5 | ||||
-rw-r--r-- | src/policy.cpp | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/pkcs8.cpp b/src/pkcs8.cpp index c19b7d507..f5ee5435d 100644 --- a/src/pkcs8.cpp +++ b/src/pkcs8.cpp @@ -1,6 +1,6 @@ /************************************************* * PKCS #8 Source File * -* (C) 1999-2007 Jack Lloyd * +* (C) 1999-2008 Jack Lloyd * *************************************************/ #include <botan/pkcs8.h> @@ -8,7 +8,6 @@ #include <botan/ber_dec.h> #include <botan/asn1_obj.h> #include <botan/pk_algs.h> -#include <botan/libstate.h> #include <botan/oids.h> #include <botan/pem.h> #include <botan/pbe.h> @@ -166,7 +165,7 @@ void encrypt_key(const Private_Key& key, const std::string& pass, const std::string& pbe_algo, X509_Encoding encoding) { - const std::string DEFAULT_PBE = global_state().option("base/default_pbe"); + const std::string DEFAULT_PBE = "PBE-PKCS5v20(SHA-1,TripleDES/CBC)"; Pipe raw_key; raw_key.start_msg(); diff --git a/src/policy.cpp b/src/policy.cpp index bb0541648..5f94098c6 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -212,8 +212,6 @@ void set_default_aliases(Library_State& config) *************************************************/ void set_default_config(Library_State& config) { - config.set_option("base/default_pbe", - "PBE-PKCS5v20(SHA-1,TripleDES/CBC)"); config.set_option("base/default_allocator", "malloc"); config.set_option("pk/test/public", "basic"); |