forked from wolfSSL/wolfssl
add NO_FORCE_SCR_SAME_SUITE flag for scr
This commit is contained in:
11
src/ssl.c
11
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;
|
||||
|
Reference in New Issue
Block a user