google / certificate-transparency

Auditing for TLS certificates.
https://certificate.transparency.dev
Apache License 2.0
869 stars 283 forks source link

python: Switch to single-shot verify functions #1443

Closed davidben closed 6 years ago

davidben commented 6 years ago

cryptography.io has since deprecated the streaming verifier function in favor of the single-shot one. This should clear the stderr output seen in Travis:

../Users/travis/build/google/certificate-transparency/python/ct/crypto/verify_ecdsa.py:63: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead. verifier = self.__key.verifier(signature, ec.ECDSA(hashes.SHA256())) ................................/Users/travis/build/google/certificate-transparency/python/ct/crypto/verify_rsa.py:63: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead. verifier = self.__key.verifier(signature, padding.PKCS1v15(), hashes.SHA256()) ........

Note this does bump the minimum cryptography.io version. The single-shot functions for ECDSA exist as of 1.5, released just shy of two years ago.