Skip to content

Commit f6f4f8c

Browse files
committed
RDBC-469 Added support for loading certificate from file while creating document store
1 parent 9ddcbd7 commit f6f4f8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyravendb/connection/requests_executor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ def initialize_certificate(certificate):
3939
return certificate, None
4040
pfx = certificate["pfx"]
4141
password = certificate.get("password", None)
42-
adapter = Pkcs12Adapter(pkcs12_data=pfx, pkcs12_password=password)
42+
adapter = (
43+
Pkcs12Adapter(pkcs12_filename=pfx, pkcs12_password=password)
44+
if os.path.isfile(pfx)
45+
else Pkcs12Adapter(pkcs12_data=pfx, pkcs12_password=password)
46+
)
4347
return None, adapter
4448

4549
def __init__(self, database_name, certificate, conventions=None, **kwargs):

0 commit comments

Comments
 (0)