diff options
author | Jack Lloyd <[email protected]> | 2015-10-14 18:37:13 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-10-14 18:37:13 -0400 |
commit | 4bfd5d6828f23e0eef04e5cf079c323274136499 (patch) | |
tree | 7b3550bbed9eb3d7c17f1f7a03f7cbad9920baf0 /src/lib/misc | |
parent | c7ceff4a3a3b6b61a02b99db05eef88f7ca4b735 (diff) |
Build fix
Diffstat (limited to 'src/lib/misc')
-rw-r--r-- | src/lib/misc/pbes2/pbes2.cpp | 4 | ||||
-rw-r--r-- | src/lib/misc/pem/pem.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/misc/pbes2/pbes2.cpp b/src/lib/misc/pbes2/pbes2.cpp index ec5a10ba8..c66b293e8 100644 --- a/src/lib/misc/pbes2/pbes2.cpp +++ b/src/lib/misc/pbes2/pbes2.cpp @@ -82,7 +82,7 @@ pbes2_encrypt(const secure_vector<byte>& key_bits, std::unique_ptr<Cipher_Mode> enc(get_cipher_mode(cipher, ENCRYPTION)); if(!enc) - throw Encoding_Error("PBE-PKCS5 cannot encrypt no cipher " + cipher); + throw Decoding_Error("PBE-PKCS5 cannot encrypt no cipher " + cipher); std::unique_ptr<PBKDF> pbkdf(get_pbkdf("PBKDF2(" + prf + ")")); @@ -157,7 +157,7 @@ pbes2_decrypt(const secure_vector<byte>& key_bits, std::unique_ptr<PBKDF> pbkdf(get_pbkdf("PBKDF2(" + prf + ")")); std::unique_ptr<Cipher_Mode> dec(get_cipher_mode(cipher, DECRYPTION)); - if(!enc) + if(!dec) throw Decoding_Error("PBE-PKCS5 cannot decrypt no cipher " + cipher); if(key_length == 0) diff --git a/src/lib/misc/pem/pem.cpp b/src/lib/misc/pem/pem.cpp index 1279b665e..83b48c07b 100644 --- a/src/lib/misc/pem/pem.cpp +++ b/src/lib/misc/pem/pem.cpp @@ -8,6 +8,7 @@ #include <botan/pem.h> #include <botan/base64.h> #include <botan/parsing.h> +#include <botan/exceptn.h> namespace Botan { |