From 6dd4b77a855570a6433af0a8584bdb9bfe353bc3 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Tue, 9 Mar 2021 14:12:46 +1000 Subject: [PATCH] Add ossl_gost symbols Partial fix for #12964 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14473) --- ssl/statem/statem_clnt.c | 8 ++++---- ssl/statem/statem_local.h | 4 ++-- ssl/statem/statem_srvr.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index c60b259e1fd..e7917be4fbb 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -3114,7 +3114,7 @@ static int tls_construct_cke_gost(SSL *s, WPACKET *pkt) } #ifndef OPENSSL_NO_GOST -int gost18_cke_cipher_nid(const SSL *s) +int ossl_gost18_cke_cipher_nid(const SSL *s) { if ((s->s3.tmp.new_cipher->algorithm_enc & SSL_MAGMA) != 0) return NID_magma_ctr; @@ -3124,7 +3124,7 @@ int gost18_cke_cipher_nid(const SSL *s) return NID_undef; } -int gost_ukm(const SSL *s, unsigned char *dgst_buf) +int ossl_gost_ukm(const SSL *s, unsigned char *dgst_buf) { EVP_MD_CTX * hash = NULL; unsigned int md_len; @@ -3159,14 +3159,14 @@ static int tls_construct_cke_gost18(SSL *s, WPACKET *pkt) unsigned char *pms = NULL; size_t pmslen = 0; size_t msglen; - int cipher_nid = gost18_cke_cipher_nid(s); + int cipher_nid = ossl_gost18_cke_cipher_nid(s); if (cipher_nid == NID_undef) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); return 0; } - if (gost_ukm(s, rnd_dgst) <= 0) { + if (ossl_gost_ukm(s, rnd_dgst) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); goto err; } diff --git a/ssl/statem/statem_local.h b/ssl/statem/statem_local.h index c277a8e9c55..61de225584d 100644 --- a/ssl/statem/statem_local.h +++ b/ssl/statem/statem_local.h @@ -159,8 +159,8 @@ MSG_PROCESS_RETURN tls_process_end_of_early_data(SSL *s, PACKET *pkt); #ifndef OPENSSL_NO_GOST /* These functions are used in GOST18 CKE, both for client and server */ -int gost18_cke_cipher_nid(const SSL *s); -int gost_ukm(const SSL *s, unsigned char *dgst_buf); +int ossl_gost18_cke_cipher_nid(const SSL *s); +int ossl_gost_ukm(const SSL *s, unsigned char *dgst_buf); #endif /* Extension processing */ diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 4c2ca4e6e5c..aca17868b13 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -3198,14 +3198,14 @@ static int tls_process_cke_gost18(SSL *s, PACKET *pkt) const unsigned char *start = NULL; size_t outlen = 32, inlen = 0; int ret = 0; - int cipher_nid = gost18_cke_cipher_nid(s); + int cipher_nid = ossl_gost18_cke_cipher_nid(s); if (cipher_nid == NID_undef) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); return 0; } - if (gost_ukm(s, rnd_dgst) <= 0) { + if (ossl_gost_ukm(s, rnd_dgst) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); goto err; } -- 2.47.2