aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-05-22 22:47:49 -0400
committerJack Lloyd <[email protected]>2018-05-22 22:47:49 -0400
commit4314e368d2638878d2e885e7599bd45b48c87c9a (patch)
treeba27a15da03209dc02acc8b9ab25c4b9b0fc916d /src
parentc97b3406f544ba98ae9b579d711b887b247032a7 (diff)
Fix PBE decoding and fix test macro check
Diffstat (limited to 'src')
-rw-r--r--src/lib/pubkey/pkcs8.cpp2
-rw-r--r--src/tests/test_pubkey.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp
index 1034dfa99..8d3eba6dc 100644
--- a/src/lib/pubkey/pkcs8.cpp
+++ b/src/lib/pubkey/pkcs8.cpp
@@ -169,7 +169,7 @@ choose_pbe_params(const std::string& pbe_algo, const std::string& key_algo)
SCAN_Name request(pbe_algo);
if(request.algo_name() != "PBE-PKCS5v20" || request.arg_count() != 2)
throw Exception("Unsupported PBE " + pbe_algo);
- return std::make_pair(request.arg(1), request.arg(0));
+ return std::make_pair(request.arg(0), request.arg(1));
}
}
diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp
index 2d4113c6d..38bfaf3a8 100644
--- a/src/tests/test_pubkey.cpp
+++ b/src/tests/test_pubkey.cpp
@@ -613,9 +613,9 @@ std::vector<Test::Result> PK_Key_Generation_Test::run()
result.test_failure("roundtrip BER private key", e.what());
}
-#if defined(BOTAN_HAS_PKCS5_PBE2) && defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_SHA2_32)
+#if defined(BOTAN_HAS_PKCS5_PBES2) && defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_SHA2_32)
- const std::string pbe_algo = "PBE-PKCS5v20(AES-128,SHA-256)";
+ const std::string pbe_algo = "PBE-PKCS5v20(AES-128/CBC,SHA-256)";
const std::string passphrase = Test::random_password();
try