Skip to content

Commit c432462

Browse files
committed
Changed how using certs works with certifi.where
1 parent e00a08b commit c432462

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/codeflare_sdk/cluster/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(
7676
token: str,
7777
server: str,
7878
skip_tls: bool = False,
79-
ca_cert_path: str = "/etc/pki/tls/certs/ca-bundle.crt",
79+
ca_cert_path: str = None,
8080
):
8181
"""
8282
Initialize a TokenAuthentication object that requires a value for `token`, the API Token
@@ -101,7 +101,9 @@ def login(self) -> str:
101101
configuration.api_key_prefix["authorization"] = "Bearer"
102102
configuration.host = self.server
103103
configuration.api_key["authorization"] = self.token
104-
if self.skip_tls == False:
104+
if self.skip_tls == False and self.ca_cert_path == None:
105+
configuration.verify_ssl = True
106+
elif self.skip_tls == False:
105107
configuration.ssl_ca_cert = self.ca_cert_path
106108
else:
107109
configuration.verify_ssl = False

0 commit comments

Comments
 (0)