def use_openssl(libcrypto_path, libssl_path, trust_list_path=None):
 if (not isinstance(libcrypto_path, str_cls)):
  raise ValueError((u'libcrypto_path must be a unicode string, not %s' % type_name(libcrypto_path)))
 if (not isinstance(libssl_path, str_cls)):
  raise ValueError((u'libssl_path must be a unicode string, not %s' % type_name(libssl_path)))
 if (not os.path.exists(libcrypto_path)):
  raise LibraryNotFoundError((u'libcrypto does not exist at %s' % libcrypto_path))
 if (not os.path.exists(libssl_path)):
  raise LibraryNotFoundError((u'libssl does not exist at %s' % libssl_path))
 if (trust_list_path is not None):
  if (not isinstance(trust_list_path, str_cls)):
   raise ValueError((u'trust_list_path must be a unicode string, not %s' % type_name(trust_list_path)))
  if (not os.path.exists(trust_list_path)):
   raise OSError((u'trust_list_path does not exist at %s' % trust_list_path))
 with _backend_lock:
  if (_module_values[u'backend'] is not None):
   raise RuntimeError(u'Another part of oscrypto has already been imported, unable to force use of OpenSSL')
  _module_values[u'backend'] = u'openssl'
  _module_values[u'backend_config'] = {u'libcrypto_path': libcrypto_path, u'libssl_path': libssl_path, u'trust_list_path': trust_list_path}

def use_openssl ( libcrypto_path , libssl_path , trust_list_path = None ) : if ( not isinstance ( libcrypto_path , str_cls ) ) : raise ValueError ( ( u'libcrypto_path must be a unicode string, not %s' % type_name ( libcrypto_path ) ) ) if ( not isinstance ( libssl_path , str_cls ) ) : raise ValueError ( ( u'libssl_path must be a unicode string, not %s' % type_name ( libssl_path ) ) ) if ( not os . path . exists ( libcrypto_path ) ) : raise LibraryNotFoundError ( ( u'libcrypto does not exist at %s' % libcrypto_path ) ) if ( not os . path . exists ( libssl_path ) ) : raise LibraryNotFoundError ( ( u'libssl does not exist at %s' % libssl_path ) ) if ( trust_list_path is not None ) : if ( not isinstance ( trust_list_path , str_cls ) ) : raise ValueError ( ( u'trust_list_path must be a unicode string, not %s' % type_name ( trust_list_path ) ) ) if ( not os . path . exists ( trust_list_path ) ) : raise OSError ( ( u'trust_list_path does not exist at %s' % trust_list_path ) ) with _backend_lock : if ( _module_values [ u'backend' ] is not None ) : raise RuntimeError ( u'Another part of oscrypto has already been imported, unable to force use of OpenSSL' ) _module_values [ u'backend' ] = u'openssl' _module_values [ u'backend_config' ] = { u'libcrypto_path' : libcrypto_path , u'libssl_path' : libssl_path , u'trust_list_path' : trust_list_path }
forces using openssl dynamic libraries on os x or windows .