From: Matt Caswell Date: Fri, 27 Mar 2020 17:16:59 +0000 (+0000) Subject: Give a better error if we can't find a sig alg X-Git-Tag: openssl-3.0.0-alpha1~182 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a70535f84902b8d86c16ef3fe9d570b96fa5cfce;p=oweals%2Fopenssl.git Give a better error if we can't find a sig alg Some scenarios where we could not find a suitable sig alg just gave "internal error" as the reason - which isn't very helpful. A more suitable reason code already exists - so we use that. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11425) --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 4ab046b7b3..624add64a8 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2964,7 +2964,7 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) if (!fatalerrs) return 1; SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CHOOSE_SIGALG, - ERR_R_INTERNAL_ERROR); + SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM); return 0; } @@ -2989,7 +2989,7 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) if (!fatalerrs) return 1; SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CHOOSE_SIGALG, - ERR_R_INTERNAL_ERROR); + SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM); return 0; } }