Skip to content
This repository was archived by the owner on May 2, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sqeleton/databases/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,13 @@ def __init__(self, *, schema: str, **kw):
with open(kw.get("key"), "rb") as key:
if "password" in kw:
raise ConnectError("Cannot use password and key at the same time")
if kw.get("private_key_passphrase"):
encoded_passphrase = kw.get("private_key_passphrase").encode()
else:
encoded_passphrase = None
p_key = serialization.load_pem_private_key(
key.read(),
password=None,
password=encoded_passphrase,
backend=default_backend(),
)

Expand Down