load certif

main
Laurent 2 years ago
parent d78c461849
commit 84170c571b
  1. 26
      subscriptions/views.py

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

Loading…
Cancel
Save