From: Matt Caswell Date: Mon, 27 Nov 2017 11:34:05 +0000 (+0000) Subject: Update an error reason code to be ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED X-Git-Tag: OpenSSL_1_1_1-pre1~382 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e7677aeacea0657846df444553680fdd3391f8c;p=oweals%2Fopenssl.git Update an error reason code to be ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED The most likely explanation for us ending up at this point in the code is that we were called by the user application incorrectly - so use an appropriate error code. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4778) --- diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index fe348419cd..0cacc4acb7 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -443,7 +443,7 @@ static int state_machine(SSL *s, int server) } else { /* Error */ check_fatal(s, SSL_F_STATE_MACHINE); - SSLerr(SSL_F_STATE_MACHINE, ERR_R_INTERNAL_ERROR); + SSLerr(SSL_F_STATE_MACHINE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); goto end; } }