-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Drop md5 and sha1 fingerprints #2267
Comments
I can help with this |
To extract signature hash algorithm we need to use either openssl or cryptography. Core library does not expose this information: https://docs.python.org/3/library/ssl.html#ssl.SSLSocket.getpeercert @Alxpy are you still interested in this issue? |
We use |
Sorry I misunderstood what exactly is needed. I thought you want to disallow client connections to https servers where md5|sha1 was used to sign certificate by CA. So you want to disallow sha1|md5 while checking fingerprint as described here? # Attempt to connect to https://www.python.org
# with a pin to a bogus certificate:
bad_fingerprint = b'0'*64
exc = None
try:
r = await session.get('https://www.python.org',
fingerprint=bad_fingerprint)
except aiohttp.FingerprintMismatch as e:
exc = e
assert exc is not None
assert exc.expected == bad_fingerprint
# www.python.org cert's actual fingerprint
assert exc.got == b'...' Looks like its enough to raise (instead of warning) something from aiohttp/client_exceptions.py in this piece: aiohttp/aiohttp/client_reqrep.py Line 348 in 20362c5
Should new exception be created? Like InsecureFingerprintHash(ClientSSLError) |
I think |
@redixin yes, I'm interested in this issue, I'll do it on the weekend |
* Fix #2267: Drop md5 and sha1 fingerprints * Add missing changenote * Fix spelling
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Should be done in 3.0
The text was updated successfully, but these errors were encountered: