Skip to content

Commit 7618887

Browse files
committed
Merge pull request #6 from orchardup/make-host-ca-configurable
Make host CA configurable with envvar
2 parents f51f797 + 3a845b2 commit 7618887

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

orchard/models/host.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ def _keys_path(self):
2727
return os.path.expanduser('~/.orchard/host-keys')
2828

2929
def _host_ca_path(self):
30-
return os.path.abspath(os.path.join(os.path.dirname(__file__), '../certs/host-ca.pem'))
30+
host_ca_path = os.environ.get(
31+
'ORCHARD_HOST_CA',
32+
os.path.join(os.path.dirname(__file__), '../certs/host-ca.pem')
33+
)
34+
return os.path.abspath(host_ca_path)
3135

3236
def _client_key_path(self):
3337
return os.path.join(self._keys_path(), '%s.key' % self.id)

0 commit comments

Comments
 (0)