Skip to content

Commit 9233bc5

Browse files
authored
Merge pull request #98 from poissoncorp/RDBC-469-5.0
RDBC-469 We need to send a file cert using pfx12_file
2 parents 9ddcbd7 + f6f4f8c commit 9233bc5

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)