Skip to content

Commit

Permalink
get client random if setting TlsSecrets on server (#3481)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt authored Mar 8, 2023
1 parent 3c3cd4a commit b92b25c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/platform/tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ CxPlatTlsSetEncryptionSecretsCallback(
}

if (TlsContext->TlsSecrets != NULL) {
if (!TlsContext->TlsSecrets->IsSet.ClientRandom) {
if (SSL_get_client_random(Ssl, TlsContext->TlsSecrets->ClientRandom, sizeof(TlsContext->TlsSecrets->ClientRandom)) > 0) {
TlsContext->TlsSecrets->IsSet.ClientRandom = TRUE;
}
}

TlsContext->TlsSecrets->SecretLength = (uint8_t)SecretLen;
switch (KeyType) {
case QUIC_PACKET_KEY_HANDSHAKE:
Expand Down

0 comments on commit b92b25c

Please sign in to comment.