Skip to content

Commit

Permalink
Fixed alex#46 -- allow using relative paths for account key
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed May 4, 2016
1 parent 97543ca commit a3ce2e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion letsencrypt-aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,13 @@ def update_elbs(logger, acme_client, force_issue, certificate_requests):
def setup_acme_client(s3_client, acme_directory_url, acme_account_key):
uri = rfc3986.urlparse(acme_account_key)
if uri.scheme == "file":
with open(uri.path) as f:
if uri.host is None:
path = uri.path
elif uri.path is None:
path = uri.host
else:
path = os.path.join(uri.host, uri.path)
with open(path) as f:
key = f.read()
elif uri.scheme == "s3":
# uri.path includes a leading "/"
Expand Down

0 comments on commit a3ce2e2

Please sign in to comment.