X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fstatem%2Fstatem_lib.c;h=29fb9dcf1fa11d35ee2976aac6cf86e11a87bab3;hp=c2b14853c2d4bc9f0513c2ef4dfe628f2b6ea397;hb=db0f35dda18403accabe98e7780f3dfc516f49de;hpb=270d65fa34caa974fb27c9b161b0c9b6cd806c76 diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index c2b14853c2..29fb9dcf1f 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -116,6 +116,10 @@ int tls_setup_handshake(SSL *s) } if (SSL_IS_FIRST_HANDSHAKE(s)) { s->ctx->stats.sess_accept++; + } else if ((s->options & SSL_OP_NO_RENEGOTIATION)) { + /* Renegotiation is disabled */ + ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_NO_RENEGOTIATION); + return 0; } else if (!s->s3->send_connection_binding && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)) {