Skip to content
Closed
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions src/generated/linux/tls_openssl.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ tracepoint(CLOG_TLS_OPENSSL_C, OpenSslNoMatchingAlpn , arg1);\



/*----------------------------------------------------------
// Decoder Ring for OpenSslMissingTransportParameters
// [conn][%p] No transport parameters received
// QuicTraceLogConnError(
OpenSslMissingTransportParameters,
TlsContext->Connection,
"No transport parameters received");
// arg1 = arg1 = TlsContext->Connection = arg1
----------------------------------------------------------*/
#ifndef _clog_3_ARGS_TRACE_OpenSslMissingTransportParameters
#define _clog_3_ARGS_TRACE_OpenSslMissingTransportParameters(uniqueId, arg1, encoded_arg_string)\
tracepoint(CLOG_TLS_OPENSSL_C, OpenSslMissingTransportParameters , arg1);\

#endif




/*----------------------------------------------------------
// Decoder Ring for OpenSslHandshakeDataStart
// [conn][%p] Writing Handshake data starts at %u
Expand Down
19 changes: 19 additions & 0 deletions src/generated/linux/tls_openssl.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,25 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslNoMatchingAlpn,



/*----------------------------------------------------------
// Decoder Ring for OpenSslMissingTransportParameters
// [conn][%p] No transport parameters received
// QuicTraceLogConnError(
OpenSslMissingTransportParameters,
TlsContext->Connection,
"No transport parameters received");
// arg1 = arg1 = TlsContext->Connection = arg1
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslMissingTransportParameters,
TP_ARGS(
const void *, arg1),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1)
)
)



/*----------------------------------------------------------
// Decoder Ring for OpenSslHandshakeDataStart
// [conn][%p] Writing Handshake data starts at %u
Expand Down
23 changes: 23 additions & 0 deletions src/platform/tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,15 @@ static int QuicTlsGotTp(SSL *S, const unsigned char *Params,

UNREFERENCED_PARAMETER(Arg);

if (ParamsLen == 0 || Params == NULL) {
return 0;
}

if (AData->PeerTp != NULL) {
return AData->PeerTpLen == ParamsLen &&
memcmp(AData->PeerTp, Params, ParamsLen) == 0;
}

AData->PeerTp = CXPLAT_ALLOC_NONPAGED(ParamsLen,
QUIC_POOL_TLS_TRANSPARAMS);
if (AData->PeerTp == NULL) {
Expand Down Expand Up @@ -3317,6 +3326,20 @@ CxPlatTlsProcessData(
TlsContext->ResultFlags |= CXPLAT_TLS_RESULT_ERROR;
goto Exit;
}

//
// By this point, OpenSSL should have called QuicTlsGotTp, which stores
// a non-NULL PeerTp and sets PeerTPReceived. Fail the handshake if the
// required transport parameters were not processed.
//
if (!TlsContext->PeerTPReceived) {
QuicTraceLogConnError(
OpenSslMissingTransportParameters,
TlsContext->Connection,
"No transport parameters received");
TlsContext->ResultFlags |= CXPLAT_TLS_RESULT_ERROR;
goto Exit;
}
} else if ((TlsContext->SecConfig->Flags & QUIC_CREDENTIAL_FLAG_INDICATE_CERTIFICATE_RECEIVED) &&
!TlsContext->PeerCertReceived) {
QUIC_STATUS ValidationResult =
Expand Down