Skip to content

Commit e923e4c

Browse files
committed
allow obj = X509AwareCertBucket() without args
1 parent 817adf3 commit e923e4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hubblestack/utils/signing.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def authenticate_cert(self):
230230
return STATUS.VERIFIED
231231
return STATUS.UNKNOWN
232232

233-
def __init__(self, public_crt, ca_crt):
233+
def __init__(self, public_crt=None, ca_crt=None):
234234
try:
235235
import hubblestack.pre_packaged_certificates as HPPC
236236
# iff we have hardcoded certs then we're meant to ignore any other
@@ -244,6 +244,11 @@ def __init__(self, public_crt, ca_crt):
244244
except ImportError:
245245
pass
246246

247+
if public_crt is None:
248+
public_crt = Options.public_crt
249+
if ca_crt is None:
250+
ca_crt = Options.ca_crt
251+
247252
untrusted_crt = list()
248253

249254
if isinstance(ca_crt, (list, tuple)):

0 commit comments

Comments
 (0)