]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - ssl/s3_lib.c
Add Next Protocol Negotiation.
[thirdparty/openssl.git] / ssl / s3_lib.c
index d6b047c9955ade3aa1e722495e91601aa3709a67..497f64fee57433b87fe835ccd38d01a17bbd0b22 100644 (file)
@@ -2230,6 +2230,15 @@ void ssl3_clear(SSL *s)
        s->s3->num_renegotiations=0;
        s->s3->in_read_app_data=0;
        s->version=SSL3_VERSION;
+
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NPN)
+       if (s->next_proto_negotiated)
+               {
+               OPENSSL_free(s->next_proto_negotiated);
+               s->next_proto_negotiated = NULL;
+               s->next_proto_negotiated_len = 0;
+               }
+#endif
        }
 
 long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)