Update an error reason code to be ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED
authorMatt Caswell <matt@openssl.org>
Mon, 27 Nov 2017 11:34:05 +0000 (11:34 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 4 Dec 2017 13:31:48 +0000 (13:31 +0000)
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 <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4778)

ssl/statem/statem.c

index fe348419cdbc6ab9aa1d36340d3c1ee2b56b1d9f..0cacc4acb73d703e5a78b5714dcbf06701b8ffd1 100644 (file)
@@ -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;
         }
     }