From 8b0e4f05b142b73a5ca13f4706fcb6ececbb6911 Mon Sep 17 00:00:00 2001 From: rafael lisboa Date: Mon, 8 Jun 2015 13:59:55 -0300 Subject: move leap certs initialization to the certs module --- service/pixelated/bitmask_libraries/certs.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'service/pixelated/bitmask_libraries/certs.py') diff --git a/service/pixelated/bitmask_libraries/certs.py b/service/pixelated/bitmask_libraries/certs.py index a321e00e..3ca55469 100644 --- a/service/pixelated/bitmask_libraries/certs.py +++ b/service/pixelated/bitmask_libraries/certs.py @@ -25,6 +25,15 @@ LEAP_FINGERPRINT = None PACKAGED_CERTS_HOME = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "certificates")) +def init_leap_cert(leap_provider_cert, leap_provider_cert_fingerprint): + if leap_provider_cert_fingerprint is None: + LEAP_CERT = leap_provider_cert or True + LEAP_FINGERPRINT = None + else: + LEAP_FINGERPRINT = leap_provider_cert_fingerprint + LEAP_CERT = False + + def which_api_CA_bundle(provider): return str(LeapCertificate(provider).api_ca_bundle()) -- cgit v1.2.3