RT 1505: Use SSL3_AL_FATAL not "2"
authorMatthieu Crapet <mcrapet@gmail.com>
Fri, 8 Aug 2014 22:03:58 +0000 (18:03 -0400)
committerRich Salz <rsalz@akamai.com>
Sat, 9 Aug 2014 02:47:33 +0000 (22:47 -0400)
Use SSL3_AL_FATAL instead of the literal constant "2"
Every bit of cleanup helps.
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/s3_pkt.c

index 8fc3bb4e0b742d310dee43a6c1a5e0802cc41e20..9a1d65d8cbbbf12d7673bbc1b2dcb6b876ed4523 100644 (file)
@@ -1793,7 +1793,7 @@ int ssl3_send_alert(SSL *s, int level, int desc)
                desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have protocol_version alerts */
        if (desc < 0) return -1;
        /* If a fatal one, remove from cache */
-       if ((level == 2) && (s->session != NULL))
+       if ((level == SSL3_AL_FATAL) && (s->session != NULL))
                SSL_CTX_remove_session(s->ctx,s->session);
 
        s->s3->alert_dispatch=1;