/*
* Check to see if we were changed into a different method, if so, revert
- * back. We always do this in TLSv1.3. Below that we only do it if we are
- * not doing session-id reuse.
+ * back.
*/
- if (s->method != s->ctx->method
- && (SSL_IS_TLS13(s)
- || (!ossl_statem_get_in_handshake(s) && s->session == NULL))) {
+ if (s->method != s->ctx->method) {
s->method->ssl_free(s);
s->method = s->ctx->method;
if (!s->method->ssl_new(s))
return 0;
}
+int SSL_free_buffers(SSL *ssl)
+{
+ RECORD_LAYER *rl = &ssl->rlayer;
+
+ if (RECORD_LAYER_read_pending(rl) || RECORD_LAYER_write_pending(rl))
+ return 0;
+
+ RECORD_LAYER_release(rl);
+ return 1;
+}
+
+int SSL_alloc_buffers(SSL *ssl)
+{
+ return ssl3_setup_buffers(ssl);
+}
+
void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)
{
ctx->keylog_callback = cb;