Skip to content

Commit 04a11a7

Browse files
committed
other serialization2
1 parent e41fd48 commit 04a11a7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/integ/conftest.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from typing import Any, Callable, ContextManager, Generator
1111

1212
import pytest
13-
from cryptography.hazmat.primitives import serialization
1413

1514
import snowflake.connector
1615
from snowflake.connector.compat import IS_WINDOWS
@@ -195,12 +194,7 @@ def get_db_parameters(connection_name: str = "default") -> dict[str, Any]:
195194

196195
def get_private_key(private_key_file: str) -> bytes:
197196
with open(private_key_file, "rb") as key_file:
198-
private_key = serialization.load_pem_private_key(key_file.read(), password=None)
199-
return private_key.private_bytes(
200-
encoding=serialization.Encoding.DER,
201-
format=serialization.PrivateFormat.PKCS8,
202-
encryption_algorithm=serialization.NoEncryption(),
203-
)
197+
return key_file.read()
204198

205199

206200
@pytest.fixture(scope="session", autouse=True)

0 commit comments

Comments
 (0)