aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbes2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbes2.cpp')
-rw-r--r--src/pbes2.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pbes2.cpp b/src/pbes2.cpp
index 62913abac..d3533f14f 100644
--- a/src/pbes2.cpp
+++ b/src/pbes2.cpp
@@ -4,6 +4,7 @@
*************************************************/
#include <botan/pbe_pkcs.h>
+#include <botan/libstate.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/parsing.h>
@@ -155,7 +156,7 @@ void PBE_PKCS5v20::decode_params(DataSource& source)
std::vector<std::string> cipher_spec = split_on(cipher, '/');
if(cipher_spec.size() != 2)
throw Decoding_Error("PBE-PKCS5 v2.0: Invalid cipher spec " + cipher);
- cipher_algo = deref_alias(cipher_spec[0]);
+ cipher_algo = global_state().deref_alias(cipher_spec[0]);
if(!known_cipher(cipher_algo) || cipher_spec[1] != "CBC")
throw Decoding_Error("PBE-PKCS5 v2.0: Don't know param format for " +
@@ -195,12 +196,14 @@ bool PBE_PKCS5v20::known_cipher(const std::string& algo) const
*************************************************/
PBE_PKCS5v20::PBE_PKCS5v20(const std::string& d_algo,
const std::string& c_algo) :
- direction(ENCRYPTION), digest(deref_alias(d_algo)), cipher(c_algo)
+ direction(ENCRYPTION),
+ digest(global_state().deref_alias(d_algo)),
+ cipher(c_algo)
{
std::vector<std::string> cipher_spec = split_on(cipher, '/');
if(cipher_spec.size() != 2)
throw Invalid_Argument("PBE-PKCS5 v2.0: Invalid cipher spec " + cipher);
- cipher_algo = deref_alias(cipher_spec[0]);
+ cipher_algo = global_state().deref_alias(cipher_spec[0]);
const std::string cipher_mode = cipher_spec[1];
if(!have_block_cipher(cipher_algo))