Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ public Task ConnectWithRevocation_WithCallback(bool checkRevocation)
[InlineData(true)]
public Task ConnectWithRevocation_StapledOcsp(bool offlineContext)
{
if (PlatformDetection.IsRedHatFamily7 && !offlineContext)
{
throw new SkipTestException("Active test issue https://github.com/dotnet/runtime/issues/71037");
}

// Offline will only work if
// a) the revocation has been checked recently enough that it is cached, or
// b) the server stapled the response
Expand Down
19 changes: 12 additions & 7 deletions src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ SSL_CTX* CryptoNative_SslCtxCreate(const SSL_METHOD* method)
return NULL;
}
}

// Opportunistically request the server present a stapled OCSP response.
if (SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, TLSEXT_STATUSTYPE_ocsp, NULL) != 1)
{
ERR_clear_error();
}
}

return ctx;
Expand Down Expand Up @@ -365,7 +359,18 @@ void CryptoNative_SslCtxSetProtocolOptions(SSL_CTX* ctx, SslProtocols protocols)
SSL* CryptoNative_SslCreate(SSL_CTX* ctx)
{
ERR_clear_error();
return SSL_new(ctx);
SSL* ret = SSL_new(ctx);

if (ret != NULL)
{
// Opportunistically request the server present a stapled OCSP response.
if (SSL_ctrl(ret, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, TLSEXT_STATUSTYPE_ocsp, NULL) != 1)
{
ERR_clear_error();
}
}

return ret;
}

int32_t CryptoNative_SslGetError(SSL* ssl, int32_t ret)
Expand Down