@pytest.mark.skipif((not platform.startswith('linux')), reason='Loading fallback paths is a linux-specific behavior to accommodate pyca/cryptography manylinux1 wheels')
def test_fallback_default_verify_paths(self, monkeypatch):
    "\n        Test that we load certificates successfully on linux from the fallback\n        path. To do this we set the _CRYPTOGRAPHY_MANYLINUX1_CA_FILE and\n        _CRYPTOGRAPHY_MANYLINUX1_CA_DIR vars to be equal to whatever the\n        current OpenSSL default is and we disable\n        SSL_CTX_SET_default_verify_paths so that it can't find certs unless\n        it loads via fallback.\n        "
    context = Context(TLSv1_METHOD)
    monkeypatch.setattr(_lib, 'SSL_CTX_set_default_verify_paths', (lambda x: 1))
    monkeypatch.setattr(SSL, '_CRYPTOGRAPHY_MANYLINUX1_CA_FILE', _ffi.string(_lib.X509_get_default_cert_file()))
    monkeypatch.setattr(SSL, '_CRYPTOGRAPHY_MANYLINUX1_CA_DIR', _ffi.string(_lib.X509_get_default_cert_dir()))
    context.set_default_verify_paths()
    store = context.get_cert_store()
    sk_obj = _lib.X509_STORE_get0_objects(store._store)
    assert (sk_obj != _ffi.NULL)
    num = _lib.sk_X509_OBJECT_num(sk_obj)
    assert (num != 0)
Test that we load certificates successfully on linux from the fallback
path. To do this we set the _CRYPTOGRAPHY_MANYLINUX1_CA_FILE and
_CRYPTOGRAPHY_MANYLINUX1_CA_DIR vars to be equal to whatever the
current OpenSSL default is and we disable
SSL_CTX_SET_default_verify_paths so that it can't find certs unless
it loads via fallback.
@pytest.mark.skipif((not platform.startswith('linux')), reason='Loading fallback paths is a linux-specific behavior to accommodate pyca/cryptography manylinux1 wheels')
def test_fallback_default_verify_paths(self, monkeypatch):
    "\n        Test that we load certificates successfully on linux from the fallback\n        path. To do this we set the _CRYPTOGRAPHY_MANYLINUX1_CA_FILE and\n        _CRYPTOGRAPHY_MANYLINUX1_CA_DIR vars to be equal to whatever the\n        current OpenSSL default is and we disable\n        SSL_CTX_SET_default_verify_paths so that it can't find certs unless\n        it loads via fallback.\n        "
    context = Context(TLSv1_METHOD)
    monkeypatch.setattr(_lib, 'SSL_CTX_set_default_verify_paths', (lambda x: 1))
    monkeypatch.setattr(SSL, '_CRYPTOGRAPHY_MANYLINUX1_CA_FILE', _ffi.string(_lib.X509_get_default_cert_file()))
    monkeypatch.setattr(SSL, '_CRYPTOGRAPHY_MANYLINUX1_CA_DIR', _ffi.string(_lib.X509_get_default_cert_dir()))
    context.set_default_verify_paths()
    store = context.get_cert_store()
    sk_obj = _lib.X509_STORE_get0_objects(store._store)
    assert (sk_obj != _ffi.NULL)
    num = _lib.sk_X509_OBJECT_num(sk_obj)
    assert (num != 0)