File tree 2 files changed +5
-5
lines changed
src/native/libs/System.Security.Cryptography.Native
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -485,7 +485,6 @@ extern bool g_libSslUses32BitTime;
485
485
REQUIRED_FUNCTION(OCSP_cert_to_id) \
486
486
REQUIRED_FUNCTION(OCSP_check_nonce) \
487
487
REQUIRED_FUNCTION(OCSP_request_add0_id) \
488
- REQUIRED_FUNCTION(OCSP_request_add1_nonce) \
489
488
REQUIRED_FUNCTION(OCSP_REQUEST_free) \
490
489
REQUIRED_FUNCTION(OCSP_REQUEST_new) \
491
490
REQUIRED_FUNCTION(OCSP_resp_find_status) \
@@ -1018,7 +1017,6 @@ extern TYPEOF(OPENSSL_gmtime)* OPENSSL_gmtime_ptr;
1018
1017
#define OCSP_check_nonce OCSP_check_nonce_ptr
1019
1018
#define OCSP_CERTID_free OCSP_CERTID_free_ptr
1020
1019
#define OCSP_request_add0_id OCSP_request_add0_id_ptr
1021
- #define OCSP_request_add1_nonce OCSP_request_add1_nonce_ptr
1022
1020
#define OCSP_REQUEST_free OCSP_REQUEST_free_ptr
1023
1021
#define OCSP_REQUEST_new OCSP_REQUEST_new_ptr
1024
1022
#define OCSP_resp_find_status OCSP_resp_find_status_ptr
Original file line number Diff line number Diff line change @@ -946,7 +946,8 @@ static X509VerifyStatusCode CheckOcspGetExpiry(OCSP_REQUEST* req,
946
946
int nonceCheck = req == NULL ? 1 : OCSP_check_nonce (req , basicResp );
947
947
948
948
// Treat "response has no nonce" as success, since not all responders set the nonce.
949
- if (nonceCheck == -1 )
949
+ // Treat "neither has a nonce" as success, since we do not send nonces in our requests.
950
+ if (nonceCheck == -1 || nonceCheck == 2 )
950
951
{
951
952
nonceCheck = 1 ;
952
953
}
@@ -1188,8 +1189,9 @@ static OCSP_REQUEST* BuildOcspRequest(X509* subject, X509* issuer)
1188
1189
// Ownership was successfully transferred to req
1189
1190
certId = NULL ;
1190
1191
1191
- // Add a random nonce.
1192
- OCSP_request_add1_nonce (req , NULL , -1 );
1192
+ // We return the request without setting a nonce on it. Most public CA OCSP responders ignore the nonce, and in some
1193
+ // cases flat out error when presented with a nonce.
1194
+ // This behavior also matches Windows and Apple platforms.
1193
1195
return req ;
1194
1196
}
1195
1197
You can’t perform that action at this time.
0 commit comments