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
#5851 Fix AttributeError on t.i.ssl.Certificate repr #11930
#5851 Fix AttributeError on t.i.ssl.Certificate repr #11930
Conversation
for more information, see https://pre-commit.ci
Many thanks, Rob for the fix. For a PR to be merged the changes need to have a release note fragment and the changes to include the tests. More info about the release notes here Let us know if you need help with the release notes or writing the tests. Regards |
@rvandam I'm keen to get this merged do you need help writing a test for this change? |
That would be great. Haven’t had time to get back to it yet.
…On Sat, Sep 9, 2023 at 11:38 AM Thomas Grainger ***@***.***> wrote:
@rvandam <https://github.com/rvandam> I'm keen to get this merged do you
need help writing a test for this change?
—
Reply to this email directly, view it on GitHub
<#11930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPELPBQEB736TNDCP3BPMLXZSSSXANCNFSM6AAAAAA35YX2XE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
c = sslverify.Certificate.loadPEM(ubuntuOneGoDaddyPem) | ||
self.assertEqual( | ||
repr(c), | ||
"<Certificate Subject=b'Go Daddy Secure Certification Authority' Issuer=>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be better to omit the Issuer=
entirely here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok. no need to spend too much time with the repr part. this is only to help with the debugging.
@adiroiban I've added a test case to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
Not sure what to say about ubuntu one cert.
It's good to have a certificate from real world, but for testing, I would prefer a certificate that is more focused on the scope of that particular test.
I would argue that a barebone certificate is better here.
I left a few comments inline.
Thanks for the update.
c = sslverify.Certificate.loadPEM(ubuntuOneGoDaddyPem) | ||
self.assertEqual( | ||
repr(c), | ||
"<Certificate Subject=b'Go Daddy Secure Certification Authority' Issuer=>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok. no need to spend too much time with the repr part. this is only to help with the debugging.
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
I am not happy with using the Ubuntu One cert here... but I think this is good enough.
I have enabled auto-merge |
Scope and purpose
Fixes #5851