Created
January 8, 2016 21:59
-
-
Save the2hill/f3a5f39a6b74a9710109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cert = x509.load_pem_x509_certificate(data=certificate, | |
backend=backends.default_backend()) | |
if intermediates: | |
for x509Pem in _split_x509s(intermediates): | |
_get_x509_from_pem_bytes(x509Pem) | |
if private_key: | |
pkey = _read_privatekey(private_key, passphrase=private_key_passphrase) | |
pknum = pkey.public_key().public_numbers | |
certnum = cert.public_key().public_numbers | |
if pknum != certnum: | |
raise exceptions.MisMatchedKey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment