forked from wolfSSL/wolfssl
Merge pull request #3596 from julek-wolfssl/dtls-multiple-hellorequest
Calling wolfSSL_Rehandshake during renegotiation should not be an error
This commit is contained in:
13
src/ssl.c
13
src/ssl.c
@@ -2671,9 +2671,20 @@ static int _Rehandshake(WOLFSSL* ssl)
|
|||||||
ssl->options.acceptState != ACCEPT_FIRST_REPLY_DONE) {
|
ssl->options.acceptState != ACCEPT_FIRST_REPLY_DONE) {
|
||||||
|
|
||||||
if (ssl->options.handShakeState != HANDSHAKE_DONE) {
|
if (ssl->options.handShakeState != HANDSHAKE_DONE) {
|
||||||
WOLFSSL_MSG("Can't renegotiate until previous handshake complete");
|
if (!ssl->options.handShakeDone) {
|
||||||
|
WOLFSSL_MSG("Can't renegotiate until initial "
|
||||||
|
"handshake complete");
|
||||||
return SECURE_RENEGOTIATION_E;
|
return SECURE_RENEGOTIATION_E;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
WOLFSSL_MSG("Renegotiation already started. "
|
||||||
|
"Moving it forward.");
|
||||||
|
ret = wolfSSL_negotiate(ssl);
|
||||||
|
if (ret == WOLFSSL_SUCCESS)
|
||||||
|
ssl->secure_rene_count++;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_FORCE_SCR_SAME_SUITE
|
#ifndef NO_FORCE_SCR_SAME_SUITE
|
||||||
/* force same suite */
|
/* force same suite */
|
||||||
|
Reference in New Issue
Block a user