diff options
-rw-r--r-- | src/lib/pubkey/pkcs8.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_pubkey.cpp | 4 |
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 |