mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-11 15:52:21 -05:00
fix imports
This commit is contained in:
@@ -2,14 +2,15 @@ import base64
|
||||
import re
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import requests
|
||||
import six
|
||||
|
||||
# import oscrypto.asymmetric
|
||||
# import oscrypto.errors
|
||||
from cryptography import x509
|
||||
from cryptography.exceptions import InvalidSignature
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
from cryptography.hazmat.primitives.asymmetric import padding
|
||||
from cryptography.exceptions import InvalidSignature
|
||||
import requests
|
||||
import six
|
||||
|
||||
from app import redis_store
|
||||
from app.config import Config
|
||||
@@ -122,10 +123,7 @@ def validate_sns_cert(sns_payload):
|
||||
try:
|
||||
public_key = certificate.public_key()
|
||||
public_key.verify(
|
||||
signature,
|
||||
string_to_sign,
|
||||
padding.PKCS1v15(),
|
||||
hashes.SHA256() # or SHA1?
|
||||
signature, string_to_sign, padding.PKCS1v15(), hashes.SHA256() # or SHA1?
|
||||
)
|
||||
# oscrypto.asymmetric.rsa_pkcs1v15_verify(
|
||||
# oscrypto.asymmetric.load_certificate(certificate),
|
||||
|
||||
Reference in New Issue
Block a user