Go into the error state if a fatal alert is sent or received
[openssl.git] / ssl / d1_pkt.c
index 23aa9dbce484a8388f30f9fb1b3d72c2a0b5fb9b..c7fe97727bfaa6f9c4d5d92535bc71f93533f309 100644 (file)
@@ -1309,6 +1309,7 @@ int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
             ERR_add_error_data(2, "SSL alert number ", tmp);
             s->shutdown |= SSL_RECEIVED_SHUTDOWN;
             SSL_CTX_remove_session(s->session_ctx, s->session);
+            s->state = SSL_ST_ERR;
             return (0);
         } else {
             al = SSL_AD_ILLEGAL_PARAMETER;