aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-31 15:30:49 +0000
committerlloyd <[email protected]>2015-01-31 15:30:49 +0000
commit00c9b3f4834603946065c15b9b2e9fa5e973b979 (patch)
treeb0f82333a1eeab624409db9515e511838f6fa2d6 /src/lib/pubkey
parent710229be83cdbc061949c61942896b5af9e134d8 (diff)
Use registry for streams and MACs. Start updating callers.
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/pkcs8.cpp6
-rw-r--r--src/lib/pubkey/rfc6979/rfc6979.cpp4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp
index 3cfb48c3a..a1731c8ef 100644
--- a/src/lib/pubkey/pkcs8.cpp
+++ b/src/lib/pubkey/pkcs8.cpp
@@ -99,8 +99,7 @@ secure_vector<byte> PKCS8_decode(
if(OIDS::lookup(pbe_alg_id.oid) != "PBE-PKCS5v20")
throw std::runtime_error("Unknown PBE type " + pbe_alg_id.oid.as_string());
- key = pbes2_decrypt(key_data, pass.second, pbe_alg_id.parameters,
- global_state().algorithm_factory());
+ key = pbes2_decrypt(key_data, pass.second, pbe_alg_id.parameters);
}
BER_Decoder(key)
@@ -185,8 +184,7 @@ std::vector<byte> BER_encode(const Private_Key& key,
const std::pair<AlgorithmIdentifier, std::vector<byte>> pbe_info =
pbes2_encrypt(PKCS8::BER_encode(key), pass, msec,
- pbe_params.first, pbe_params.second,
- rng, global_state().algorithm_factory());
+ pbe_params.first, pbe_params.second, rng);
return DER_Encoder()
.start_cons(SEQUENCE)
diff --git a/src/lib/pubkey/rfc6979/rfc6979.cpp b/src/lib/pubkey/rfc6979/rfc6979.cpp
index a691e6e8c..1b22fae54 100644
--- a/src/lib/pubkey/rfc6979/rfc6979.cpp
+++ b/src/lib/pubkey/rfc6979/rfc6979.cpp
@@ -7,7 +7,6 @@
#include <botan/rfc6979.h>
#include <botan/hmac_drbg.h>
-#include <botan/libstate.h>
#include <botan/scan_name.h>
namespace Botan {
@@ -19,8 +18,7 @@ std::string hash_for_deterministic_signature(const std::string& emsa)
if(emsa_name.arg_count() > 0)
{
const std::string pos_hash = emsa_name.arg(0);
- if(global_state().algorithm_factory().prototype_hash_function(pos_hash))
- return pos_hash;
+ return pos_hash;
}
return "SHA-512"; // safe default if nothing we understand