Currently certtool uses PKCS12-3DES-SHA1 for encrypting keys in
PKCS#12, while it is suggested to migrate to more modern algorithms,
namely AES-128-CBC with PBKDF2 and SHA-256:
https://bugzilla.redhat.com/show_bug.cgi?id=
1759982
Signed-off-by: Daiki Ueno <ueno@gnu.org>
int cipher_to_flags(const char *cipher)
{
if (cipher == NULL) {
-#ifdef ENABLE_FIPS140
return GNUTLS_PKCS_USE_PBES2_AES_128;
-#else /* compatibility mode - most implementations don't support PBES2 with AES */
- return GNUTLS_PKCS_USE_PKCS12_3DES;
-#endif
} else if (strcasecmp(cipher, "3des") == 0) {
return GNUTLS_PKCS_USE_PBES2_3DES;
} else if (strcasecmp(cipher, "3des-pkcs12") == 0) {
if (cinfo->hash != GNUTLS_DIG_UNKNOWN)
mac = (gnutls_mac_algorithm_t)cinfo->hash;
else
- mac = GNUTLS_MAC_SHA1;
+ mac = GNUTLS_MAC_SHA256;
if (HAVE_OPT(P12_NAME)) {
name = OPT_ARG(P12_NAME);