File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
sslyze/plugins/certificate_info Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,9 @@ class _OcspResponseAsJson(BaseModelWithOrmMode):
216216 @model_validator (mode = "before" )
217217 @classmethod
218218 def _handle_object (cls , ocsp_response : ocsp .OCSPResponse ) -> Any :
219+ if not isinstance (ocsp_response , ocsp .OCSPResponse ):
220+ return ocsp_response
221+
219222 response_status = ocsp_response .response_status .name
220223 if ocsp_response .response_status != ocsp .OCSPResponseStatus .SUCCESSFUL :
221224 return dict (
@@ -228,7 +231,7 @@ def _handle_object(cls, ocsp_response: ocsp.OCSPResponse) -> Any:
228231 serial_number = None ,
229232 )
230233 return dict (
231- response_status = ocsp_response . response_status ,
234+ response_status = response_status ,
232235 certificate_status = ocsp_response .certificate_status ,
233236 revocation_time = ocsp_response .revocation_time_utc ,
234237 produced_at = ocsp_response .produced_at_utc ,
You can’t perform that action at this time.
0 commit comments