|
|
|
|
@ -32,7 +32,7 @@ def app_store_webhook(request): |
|
|
|
|
fulljson = json.loads(decoded) |
|
|
|
|
signedPayload = fulljson['signedPayload'] |
|
|
|
|
|
|
|
|
|
root_certificates = load_root_certificates() |
|
|
|
|
root_certificates = _get_root_cert(None) |
|
|
|
|
enable_online_checks = True |
|
|
|
|
bundle_id = "stax.SlashPoker.nosebleed" |
|
|
|
|
environment = Environment.SANDBOX |
|
|
|
|
@ -108,18 +108,18 @@ def app_store_webhook(request): |
|
|
|
|
# except (ValueError, KeyError, jwt.exceptions.PyJWTError, X509StoreContextError) as err: |
|
|
|
|
# raise InvalidTokenError from err |
|
|
|
|
# |
|
|
|
|
# def _get_root_cert(root_cert_path): |
|
|
|
|
# |
|
|
|
|
# fn = os.environ.get("APPLE_ROOT_CA") |
|
|
|
|
# if fn is None: |
|
|
|
|
# fn = root_cert_path or "AppleRootCA-G3.cer" |
|
|
|
|
# |
|
|
|
|
# fn = os.path.expanduser(fn) |
|
|
|
|
# with open(fn, "rb") as f: |
|
|
|
|
# data = f.read() |
|
|
|
|
# root_cert = load_certificate(FILETYPE_ASN1, data) |
|
|
|
|
# |
|
|
|
|
# return root_cert |
|
|
|
|
def _get_root_cert(root_cert_path): |
|
|
|
|
|
|
|
|
|
fn = os.environ.get("APPLE_ROOT_CA") |
|
|
|
|
if fn is None: |
|
|
|
|
fn = root_cert_path or "AppleRootCA-G3.cer" |
|
|
|
|
|
|
|
|
|
fn = os.path.expanduser(fn) |
|
|
|
|
with open(fn, "rb") as f: |
|
|
|
|
data = f.read() |
|
|
|
|
root_cert = load_certificate(FILETYPE_ASN1, data) |
|
|
|
|
|
|
|
|
|
return root_cert |
|
|
|
|
# |
|
|
|
|
# class InvalidTokenError(Exception): |
|
|
|
|
# pass |
|
|
|
|
|