From cac4da4f63bf231a2da12d7977d9c5050e13d2e2 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 24 May 2025 02:54:09 +0000 Subject: Switch the default PBMAC to hmacWithSHA256 Using hmacWithSHA1 isn't outrageously bad, but newly generated encrypted password files ought to be using something better. Make it so. https://github.com/pyca/cryptography/issues/12949 https://github.com/libressl/portable/issues/1168 ok joshua --- src/lib/libcrypto/asn1/p5_pbev2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c index 21b8b6364f..4c096ac5b9 100644 --- a/src/lib/libcrypto/asn1/p5_pbev2.c +++ b/src/lib/libcrypto/asn1/p5_pbev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p5_pbev2.c,v 1.36 2025/05/10 05:54:38 tb Exp $ */ +/* $OpenBSD: p5_pbev2.c,v 1.37 2025/05/24 02:54:09 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999-2004. */ @@ -187,7 +187,7 @@ PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, unsigned char *salt, int saltlen) { X509_ALGOR *scheme = NULL, *kalg = NULL, *ret = NULL; - int prf_nid = NID_hmacWithSHA1; + int prf_nid = NID_hmacWithSHA256; int alg_nid, keylen; EVP_CIPHER_CTX ctx; unsigned char iv[EVP_MAX_IV_LENGTH]; -- cgit v1.2.3-55-g6feb