From: Matt Caswell Date: Fri, 30 Mar 2018 13:33:55 +0000 (+0100) Subject: GOST MAC algorithms don't support EVP_PKEY_new_raw_private_key() X-Git-Tag: OpenSSL_1_1_1-pre4~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b4d3ffaf6d7dc68cc492b04e3870b0b3ee08a6f;p=oweals%2Fopenssl.git GOST MAC algorithms don't support EVP_PKEY_new_raw_private_key() We should use the old EVP_PKEY_new_mac_key() instead. Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5808) --- diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 2b0706e04c..23d3efb024 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -257,7 +257,7 @@ int tls1_change_cipher_state(SSL *s, int which) if (!(EVP_CIPHER_flags(c) & EVP_CIPH_FLAG_AEAD_CIPHER)) { /* TODO(size_t): Convert this function */ - mac_key = EVP_PKEY_new_raw_private_key(mac_type, NULL, mac_secret, + mac_key = EVP_PKEY_new_mac_key(mac_type, NULL, mac_secret, (int)*mac_secret_size); if (mac_key == NULL || EVP_DigestSignInit(mac_ctx, NULL, m, NULL, mac_key) <= 0) {