aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbes1.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-30 04:34:54 +0000
committerlloyd <[email protected]>2008-06-30 04:34:54 +0000
commit32937ed3ab5cb51ad175d602d466cbb9dfe917ad (patch)
treec15176e5584044a9f77ba7e04d64eb542ed25b5d /src/pbes1.cpp
parent517ba1ba8f7659f8d35ee2912709fb54d4ec6b2e (diff)
Remove the free-standing function deref_alias. It only served as a forwarder
for the implementation in Library_State. Instead explicitly call deref_alias on global_state() wherever the old freestanding version was used. This serves to make (more) uses of the global state explicit rather than implicit.
Diffstat (limited to 'src/pbes1.cpp')
-rw-r--r--src/pbes1.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pbes1.cpp b/src/pbes1.cpp
index 3126209b4..84b34eed6 100644
--- a/src/pbes1.cpp
+++ b/src/pbes1.cpp
@@ -8,6 +8,7 @@
#include <botan/ber_dec.h>
#include <botan/parsing.h>
#include <botan/lookup.h>
+#include <botan/libstate.h>
#include <algorithm>
#include <memory>
@@ -144,12 +145,14 @@ OID PBE_PKCS5v15::get_oid() const
*************************************************/
PBE_PKCS5v15::PBE_PKCS5v15(const std::string& d_algo,
const std::string& c_algo, Cipher_Dir dir) :
- direction(dir), digest(deref_alias(d_algo)), cipher(c_algo)
+ direction(dir),
+ digest(global_state().deref_alias(d_algo)),
+ cipher(c_algo)
{
std::vector<std::string> cipher_spec = split_on(c_algo, '/');
if(cipher_spec.size() != 2)
throw Invalid_Argument("PBE-PKCS5 v1.5: Invalid cipher spec " + c_algo);
- const std::string cipher_algo = deref_alias(cipher_spec[0]);
+ const std::string cipher_algo = global_state().deref_alias(cipher_spec[0]);
const std::string cipher_mode = cipher_spec[1];
if(!have_block_cipher(cipher_algo))