Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when parsing an OCSP Response with no Next Update #481

Closed
wondex opened this issue Jan 28, 2021 · 2 comments
Closed

Crash when parsing an OCSP Response with no Next Update #481

wondex opened this issue Jan 28, 2021 · 2 comments

Comments

@wondex
Copy link

wondex commented Jan 28, 2021

Describe the bug
Traceback (most recent call last):
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/main.py", line 84, in
main()
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/main.py", line 76, in main
output_hub.server_scan_completed(scan_result)
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/cli/output_hub.py", line 53, in server_scan_completed
out_generator.server_scan_completed(server_scan_result)
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/cli/console_output.py", line 75, in server_scan_completed
for line in cli_connector_cls.result_to_console_output(scan_command_result):
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/certificate_info/_cli_connector.py", line 92, in result_to_console_output
result_as_txt.extend(cls._cert_deployment_to_console_output(index, cert_deployment))
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/certificate_info/_cli_connector.py", line 271, in _cert_deployment_to_console_output
"Next Update:", cert_deployment.ocsp_response.next_update.date().isoformat()
AttributeError: 'NoneType' object has no attribute 'date'

To Reproduce
Steps to reproduce the behavior:

  1. Install SSLyze using using: pip
  2. Run the following command: /opt/rh/rh-python38/root/usr/bin/python3.8 -m sslyze --regular
  3. See: Describe the bug

Expected behavior
A clear and concise description of what you expected to happen.

Versions:

  • OS: Red Hat Enterprise Linux Server release 7.9 (Maipo)
  • Python version: 3.8
  • SSLyzeL: 4.0.1

Additional context
Already had issues with version 3.1.0, issue #471. Hoped version 4.0.1 would solved this, but another issue occured (don't have this issue with version .
We don't encounter this with an old version (2.0.3).

validated it with openssl, certificated expired (maybe this is an issue in the cli_connector.py script? openssl output:
openssl s_client -connect :443 -showcerts | openssl x509 -text
...
Not Before: Nov 25 13:56:25 2016 GMT
Not After : Nov 26 13:56:25 2019 GMT
...

@nabla-c0d3
Copy link
Owner

Thanks for the report; it's because of this https://serverfault.com/questions/985493/next-update-is-missing-from-the-ocsp-response
Should be an easy fix.

@nabla-c0d3 nabla-c0d3 added the bug label Jan 29, 2021
@nabla-c0d3 nabla-c0d3 changed the title Certificate_info - object has no attribute date (expired certificate) Crash when parsing an OCSP Response with no Next Update Jan 29, 2021
@nabla-c0d3 nabla-c0d3 added this to To do in 4.0.2 Jan 30, 2021
@nabla-c0d3 nabla-c0d3 moved this from To do to Done in 4.0.2 Jan 30, 2021
@nabla-c0d3
Copy link
Owner

Fix released as part of v4.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
4.0.2
Done
Development

No branches or pull requests

2 participants