Skip to content

Commit 21af312

Browse files
sfc-gh-stakedaankit-bhatnagar167
authored andcommitted
SNOW-78474: OCSP Revocation check failure if OCSP Responder URL not present in SSL Certificate
SNOW-78020: Revoked Cert Status persists in the cache. SNOW-77925: OCSP Performance improvements
1 parent c1ffec8 commit 21af312

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ocsp_snowflake.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,9 @@ def validate_by_direct_connection(self, issuer, subject, hostname=None, do_retry
10341034
logger.debug("using OCSP response cache")
10351035

10361036
if not ocsp_response:
1037-
# TODO - this needs to be changed potentially - No OCSP Info should Fail
10381037
logger.debug('No OCSP URL is found.')
1039-
return None, issuer, subject, cert_id, ocsp_response
1038+
raise RevocationCheckError(msg="Could not retrieve OCSP Response. Cannot perform Revocation Check",
1039+
errno=ER_SERVER_CERTIFICATE_UNKNOWN)
10401040
try:
10411041
self.process_ocsp_response(issuer, cert_id, ocsp_response)
10421042
err = None
@@ -1230,7 +1230,8 @@ def _fetch_ocsp_response(self, ocsp_request, subject, cert_id,
12301230
cert_id_enc = self.encode_cert_id_base64(
12311231
self.decode_cert_id_key(cert_id))
12321232
if not ocsp_url:
1233-
return None
1233+
raise RevocationCheckError(msg="No OCSP URL found in cert. Cannot perform Certificate Revocation check",
1234+
errno=ER_SERVER_CERTIFICATE_UNKNOWN)
12341235

12351236
if not SnowflakeOCSP.SSD.ACTIVATE_SSD and \
12361237
not OCSPServer.is_enabled_new_ocsp_endpoint():

0 commit comments

Comments
 (0)