diff options
author | Jack Lloyd <[email protected]> | 2019-02-16 11:25:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-02-16 11:25:38 -0500 |
commit | b8199a7a4f8cff49a6c09ffc769494d48ae7f3fd (patch) | |
tree | 3fa352d2bdb512c1c64b7c4b194e23b2a8ba4603 /src/lib/pubkey | |
parent | 60e00a8282cf509fb92005a8a5812ab90215899d (diff) |
Fixes for minimized builds
Various configurations would fail build or test, fix that.
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/pkcs8.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/pubkey/pkcs8.cpp b/src/lib/pubkey/pkcs8.cpp index d299a98a4..b6d33cfcb 100644 --- a/src/lib/pubkey/pkcs8.cpp +++ b/src/lib/pubkey/pkcs8.cpp @@ -160,10 +160,15 @@ choose_pbe_params(const std::string& pbe_algo, const std::string& key_algo) if(pbe_algo.empty()) { // Defaults: - if(key_algo == "Curve25519" || key_algo == "McEliece") + const bool nonstandard_pk = (key_algo == "McEliece" || key_algo == "XMSS"); + +#if defined(BOTAN_HAS_GCM) && defined(BOTAN_HAS_SHA2_64) + if(nonstandard_pk) return std::make_pair("AES-256/GCM", "SHA-512"); - else // for everything else (RSA, DSA, ECDSA, GOST, ...) - return std::make_pair("AES-256/CBC", "SHA-256"); +#endif + + // Default is something compatible with everyone else + return std::make_pair("AES-256/CBC", "SHA-256"); } SCAN_Name request(pbe_algo); |