def patch_crypto_be_discovery():
 if (((sys.platform == 'win32') or (sys.platform == 'darwin')) and is_frozen()):
  from cryptography.hazmat import backends
  try:
   from cryptography.hazmat.backends.commoncrypto.backend import backend as be_cc
  except ImportError:
   be_cc = None
  try:
   from cryptography.hazmat.backends.openssl.backend import backend as be_ossl
  except ImportError:
   be_ossl = None
  backends._available_backends_list = [be for be in (be_cc, be_ossl) if (be is not None)]

def patch_crypto_be_discovery ( ) : if ( ( ( sys . platform == 'win32' ) or ( sys . platform == 'darwin' ) ) and is_frozen ( ) ) : from cryptography . hazmat import backends try : from cryptography . hazmat . backends . commoncrypto . backend import backend as be_cc except ImportError : be_cc = None try : from cryptography . hazmat . backends . openssl . backend import backend as be_ossl except ImportError : be_ossl = None backends . _available_backends_list = [ be for be in ( be_cc , be_ossl ) if ( be is not None ) ]
monkey patches cryptographys backend detection .