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

AttributeError: 'DSAPublicNumbers' object has no attribute 'e' #314

Closed
postmodern opened this issue Apr 16, 2018 · 3 comments
Closed

AttributeError: 'DSAPublicNumbers' object has no attribute 'e' #314

postmodern opened this issue Apr 16, 2018 · 3 comments

Comments

@postmodern
Copy link
Contributor

Steps to Reproduce

  1. pip3 install -U nassl==1.1.3 cryptography==2.2.2 sslyze==1.4.1
  2. sslyze --certinfo --regular server.spruceland.ca:30333 server.spruceland.ca:30334 server.spruceland.ca:33899

Expected Result

Exits

Actual Result

Traceback (most recent call last):
  File "/home/postmodern/.local/bin/sslyze", line 11, in 
    sys.exit(main())
  File "/home/postmodern/.local/lib/python3.6/site-packages/sslyze/__main__.py", line 121, in main
    output_hub.server_scan_completed(CompletedServerScan(server_info, plugin_result_list))
  File "/home/postmodern/.local/lib/python3.6/site-packages/sslyze/cli/output_hub.py", line 67, in server_scan_completed
    out_generator.server_scan_completed(server_scan_result)
  File "/home/postmodern/.local/lib/python3.6/site-packages/sslyze/cli/console_output.py", line 87, in server_scan_completed
    for line in plugin_result.as_text():
  File "/home/postmodern/.local/lib/python3.6/site-packages/sslyze/plugins/certificate_info_plugin.py", line 380, in as_text
    text_output.extend(self._get_basic_certificate_text())
  File "/home/postmodern/.local/lib/python3.6/site-packages/sslyze/plugins/certificate_info_plugin.py", line 697, in _get_basic_certificate_text
    text_output.append(self._format_field('Exponent:', '{0} (0x{0:x})'.format(public_key.public_numbers().e)))
AttributeError: 'DSAPublicNumbers' object has no attribute 'e'

and hangs.

Additional Info

Python: 3.6.5
nassl: 1.1.3
cryptography: 2.2.2
sslyze: 1.4.1

@jsf9k
Copy link

jsf9k commented Apr 17, 2018

I confirmed that I'm seeing the same behavior.

@postmodern
Copy link
Contributor Author

postmodern commented Aug 23, 2018

@nabla-c0d3 I'm still getting this with sslyze 1.4.3, cryptography 2.3.1, nassl 1.1.3.

$ sslyze --certinfo --xml_out=sslyze.xml mail.proptaxappeal.net:4044

Traceback (most recent call last):
  File "/home/postmodern/sslyze/bin/sslyze", line 11, in <module>
    sys.exit(main())
  File "/home/postmodern/sslyze/lib/python3.6/site-packages/sslyze/__main__.py", line 121, in main
    output_hub.server_scan_completed(CompletedServerScan(server_info, plugin_result_list))
  File "/home/postmodern/sslyze/lib/python3.6/site-packages/sslyze/cli/output_hub.py", line 67, in server_scan_completed
    out_generator.server_scan_completed(server_scan_result)
  File "/home/postmodern/sslyze/lib/python3.6/site-packages/sslyze/cli/xml_output.py", line 93, in server_scan_completed
    server_scan_node.append(plugin_result.as_xml())
  File "/home/postmodern/sslyze/lib/python3.6/site-packages/sslyze/plugins/certificate_info_plugin.py", line 596, in as_xml
    for cert_xml in self._certificate_chain_to_xml(self.certificate_chain):
  File "/home/postmodern/sslyze/lib/python3.6/site-packages/sslyze/plugins/certificate_info_plugin.py", line 566, in _certificate_chain_to_xml
    key_attrs['exponent'] = str(public_key.public_numbers().e)
AttributeError: 'DSAPublicNumbers' object has no attribute 'e'

@nabla-c0d3
Copy link
Owner

I tried just now with v2.0.0:

python -m sslyze --certinfo server.spruceland.ca:30333 server.spruceland.ca:30334 server.spruceland.ca:33899

It worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants