Reset TLS Unit Test Flags
@@ -31,6 +31,7 @@ protected:
CXPLAT_SEC_CONFIG* ClientSecConfigExtraCertValidation {nullptr};
CXPLAT_SEC_CONFIG* ClientSecConfigNoCertValidation {nullptr};
CXPLAT_SEC_CONFIG* ClientSecConfigClientCertNoCertValidation {nullptr};
+ static QUIC_CREDENTIAL_FLAGS SelfSignedCertParamsFlags;
static QUIC_CREDENTIAL_CONFIG* SelfSignedCertParams;
static QUIC_CREDENTIAL_CONFIG* ClientCertParams;
@@ -60,6 +61,7 @@ protected:
{
SelfSignedCertParams = (QUIC_CREDENTIAL_CONFIG*)CxPlatGetSelfSignedCert(CXPLAT_SELF_SIGN_CERT_USER, FALSE);
ASSERT_NE(nullptr, SelfSignedCertParams);
+ SelfSignedCertParamsFlags = SelfSignedCertParams->Flags;
#ifndef QUIC_DISABLE_CLIENT_CERT_TESTS
ClientCertParams = (QUIC_CREDENTIAL_CONFIG*)CxPlatGetSelfSignedCert(CXPLAT_SELF_SIGN_CERT_USER, TRUE);
ASSERT_NE(nullptr, ClientCertParams);
@@ -79,6 +81,7 @@ protected:
void SetUp() override
{
+ SelfSignedCertParams->Flags = SelfSignedCertParamsFlags; // Make sure to start fresh
VERIFY_QUIC_SUCCESS(
CxPlatTlsSecConfigCreate(
SelfSignedCertParams,
@@ -768,6 +771,7 @@ const CXPLAT_TLS_CALLBACKS TlsTest::TlsContext::TlsClientCallbacks = {
TlsTest::TlsContext::OnPeerCertReceived
};
+QUIC_CREDENTIAL_FLAGS TlsTest::SelfSignedCertParamsFlags = QUIC_CREDENTIAL_FLAG_NONE;
QUIC_CREDENTIAL_CONFIG* TlsTest::SelfSignedCertParams = nullptr;
QUIC_CREDENTIAL_CONFIG* TlsTest::ClientCertParams = nullptr;
