Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,16 @@ int InitSSL_Side(WOLFSSL* ssl, word16 side)
}
#endif /* WOLFSSL_DTLS && !NO_WOLFSSL_SERVER */

/* Forcefully reinitialize suites here as the side may have changed,
* unless the user has explicitly set cipher suites.
* Two separate checks to ensure suites are always allocated, to avoid
* failing suites == NULL check in InitSSL_Suites. */
if (ssl->suites && !ssl->suites->setSuites) {
FreeSuites(ssl);
}
if (!ssl->suites) {
AllocateSuites(ssl);
}
return InitSSL_Suites(ssl);
}
#endif /* OPENSSL_EXTRA || WOLFSSL_EITHER_SIDE ||
Expand Down
Loading