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

t.i.ssl.Certificate __repr__ assumes certificate will have a common name. #5851

Closed
twisted-trac opened this issue Aug 6, 2012 · 0 comments · Fixed by #11930
Closed

t.i.ssl.Certificate __repr__ assumes certificate will have a common name. #5851

twisted-trac opened this issue Aug 6, 2012 · 0 comments · Fixed by #11930

Comments

@twisted-trac
Copy link

mmcc's avatar mmcc reported
Trac ID trac#5851
Type defect
Created 2012-08-06 22:29:24Z

It raises AttributeError when a cert has no common name.

>>> from twisted.internet import ssl
>>>pemfn = 'UbuntuOne-Go_Daddy_CA.pem'
>>> pemd = open(pemfn, 'r').read()
>>> ssl.Certificate.loadPEM(pemd)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "Twisted-11.1.0-py2.7-macosx-10.7-x86_64.egg/twisted/internet/_sslverify.py", line 166, in __repr__
    self.getIssuer().commonName)
  File "Twisted-11.1.0-py2.7-macosx-10.7-x86_64.egg/twisted/internet/_sslverify.py", line 85, in __getattr__
    raise AttributeError(attr)
AttributeError: commonName
>>> 
Searchable metadata
trac-id__5851 5851
type__defect defect
reporter__mmcc mmcc
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__ 
time__1344292164000000 1344292164000000
changetime__1344339159000000 1344339159000000
version__None None
owner__ 

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

Successfully merging a pull request may close this issue.

1 participant