From 9a24b02e6dbff69f326a6a2a90272e238f2bb9df Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 23 Aug 2018 04:21:43 -0400 Subject: Add PBES2 as alias for PBE-PKCS5v20 Easier to remember and type. --- src/lib/pubkey/pkcs8.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/pubkey/pkcs8.cpp') diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp index c91e436c7..f6d50256d 100644 --- a/src/lib/pubkey/pkcs8.cpp +++ b/src/lib/pubkey/pkcs8.cpp @@ -167,7 +167,9 @@ 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) + if(request.arg_count() != 2) + throw Exception("Unsupported PBE " + pbe_algo); + if(request.algo_name() != "PBE-PKCS5v20" && request.algo_name() != "PBES2") throw Exception("Unsupported PBE " + pbe_algo); return std::make_pair(request.arg(0), request.arg(1)); } -- cgit v1.2.3