diff --git a/src/ssl.c b/src/ssl.c index 564877b55..9657f86c7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -736,7 +736,7 @@ int CyaSSL_UseSecureRenegotiation(CYASSL* ssl) } -/* do a secure renegotiation handshake, use forced, we discourage */ +/* do a secure renegotiation handshake, user forced, we discourage */ int CyaSSL_Rehandshake(CYASSL* ssl) { int ret; @@ -759,6 +759,15 @@ int CyaSSL_Rehandshake(CYASSL* ssl) return SECURE_RENEGOTIATION_E; } +#ifndef NO_FORCE_SCR_SAME_SUITE + /* force same suite */ + if (ssl->suites) { + ssl->suites->suiteSz = SUITE_LEN; + ssl->suites->suites[0] = ssl->options.cipherSuite0; + ssl->suites->suites[1] = ssl->options.cipherSuite; + } +#endif + /* reset handshake states */ ssl->options.serverState = NULL_STATE; ssl->options.clientState = NULL_STATE;