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

"Country name must be a 2 character country code" when running certificate_info #495

Closed
wondex opened this issue Feb 12, 2021 · 1 comment

Comments

@wondex
Copy link

wondex commented Feb 12, 2021

Describe the bug

Traceback (most recent call last):
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/scanner.py", line 264, in get_results
    result = implementation_cls.result_for_completed_scan_jobs(
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/certificate_info/implementation.py", line 127, in result_for_completed_scan_jobs
    analysis_result = deployment_analyzer.perform()
  File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/sslyze/plugins/certificate_info/_cert_chain_analyzer.py", line 176, in perform
    current_subject = cert.subject
  File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/x509.py", line 101, in subject
    return _decode_x509_name(self._backend, subject)
  File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/decode_asn1.py", line 64, in _decode_x509_name
    attribute = _decode_x509_name_entry(backend, entry)
  File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/decode_asn1.py", line 55, in _decode_x509_name_entry
    return x509.NameAttribute(x509.ObjectIdentifier(oid), value, type)
  File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/cryptography/x509/name.py", line 95, in __init__
    raise ValueError(
ValueError: Country name must be a 2 character country code

To Reproduce
Install SSLyze using: pip
Run the following command: /opt/rh/rh-python38/root/usr/bin/python3.8 -m sslyze --regular

Expected behavior
Successful scan

Python environment (please complete the following information):
OS: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Python version: 3.8
SSLyze: 4.0.2

@nabla-c0d3 nabla-c0d3 changed the title Certificate_info BUG_IN_SSLYZE "Country name must be a 2 character country code" when running certificate_info Feb 13, 2021
@nabla-c0d3 nabla-c0d3 added this to To do in 4.0.3 Feb 13, 2021
@nabla-c0d3 nabla-c0d3 added the bug label Feb 13, 2021
@nabla-c0d3 nabla-c0d3 moved this from To do to In progress in 4.0.3 Feb 15, 2021
@nabla-c0d3 nabla-c0d3 moved this from In progress to Done in 4.0.3 Feb 15, 2021
@nabla-c0d3
Copy link
Owner

Fix released as part of v4.0.3.

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

No branches or pull requests

2 participants