33
33
SubjectAlternativeName )
34
34
from cryptography .hazmat .backends import default_backend
35
35
from cryptography .hazmat .primitives .asymmetric .padding import PKCS1v15
36
- from cryptography .hazmat .primitives .hashes import SHA1
36
+ from cryptography .hazmat .primitives .hashes import SHA256
37
37
from cryptography .exceptions import InvalidSignature
38
38
from contextlib import closing
39
39
from asn1crypto import pem
@@ -121,7 +121,7 @@ def __init__(
121
121
self ,
122
122
signature_cert_chain_url_key = SIGNATURE_CERT_CHAIN_URL_HEADER ,
123
123
signature_key = SIGNATURE_HEADER ,
124
- padding = PKCS1v15 (), hash_algorithm = SHA1 ()):
124
+ padding = PKCS1v15 (), hash_algorithm = SHA256 ()):
125
125
# type: (str, str, AsymmetricPadding, HashAlgorithm) -> None
126
126
"""Verifier that performs request signature verification.
127
127
@@ -140,7 +140,7 @@ def __init__(
140
140
can also provide the Padding and the Hash Algorithm functions
141
141
that is used to verify the input body. These are defaulted as
142
142
:py:class:`cryptography.hazmat.primitives.asymmetric.padding.PKCS1v15`
143
- and :py:class:`cryptography.hazmat.primitives.hashes.SHA1 `
143
+ and :py:class:`cryptography.hazmat.primitives.hashes.SHA256 `
144
144
instances respectively.
145
145
146
146
A certificate cache is initialized, to store certificate chains
@@ -160,7 +160,7 @@ def __init__(
160
160
cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding
161
161
:param hash_algorithm: Hash algorithm instance to be used
162
162
to verify the hash value of the request body with the
163
- decrypted signature. Defaulted to `SHA1 `
163
+ decrypted signature. Defaulted to `SHA256 `
164
164
:type hash_algorithm:
165
165
cryptography.hazmat.primitives.hashes.HashAlgorithm
166
166
"""
0 commit comments