First attempt at adding the possibility to set the pointer size for the builds on...
[openssl.git] / ssl / s3_lib.c
index 51ec94b5b17226a1e79d5cd2d26ee4926aefd40d..53bf4c23aa704099ec24c6a4b0fbc068563e4450 100644 (file)
@@ -2211,6 +2211,7 @@ void ssl3_clear(SSL *s)
        wlen = s->s3->wbuf.len;
        if (s->s3->handshake_buffer) {
                BIO_free(s->s3->handshake_buffer);
+               s->s3->handshake_buffer = NULL;
        }
        if (s->s3->handshake_dgst) {
                ssl3_free_digest_list(s);
@@ -2229,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_NEXTPROTONEG)
+       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)
@@ -2534,6 +2544,11 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
                                        unsigned char *, int, void *))fp;
                break;
 #endif
+       case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
+               {
+               s->not_resumable_session_cb = (int (*)(SSL *, int))fp;
+               }
+               break;
        default:
                break;
                }
@@ -2778,6 +2793,11 @@ long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
                break;
 
 #endif
+       case SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB:
+               {
+               ctx->not_resumable_session_cb = (int (*)(SSL *, int))fp;
+               }
+               break;
        default:
                return(0);
                }
@@ -3087,6 +3107,18 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
 
        alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
 
+#ifndef OPENSSL_NO_GOST
+       if (s->version >= TLS1_VERSION)
+               {
+               if (alg_k & SSL_kGOST)
+                       {
+                       p[ret++]=TLS_CT_GOST94_SIGN;
+                       p[ret++]=TLS_CT_GOST01_SIGN;
+                       return(ret);
+                       }
+               }
+#endif
+
 #ifndef OPENSSL_NO_DH
        if (alg_k & (SSL_kDHr|SSL_kEDH))
                {
@@ -3313,4 +3345,3 @@ need to go to SSL_ST_ACCEPT.
                }
        return(ret);
        }
-