-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into hosseinsh-changelog-1.3.0
- Loading branch information
Showing
10 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
.. moduleauthor:: Mikhail Khodorovskiy <[email protected]> | ||
.. moduleauthor:: Harm Weites <[email protected]> | ||
""" | ||
|
||
from os.path import join | ||
import sys | ||
from acme.errors import ClientError | ||
from flask import current_app | ||
|
@@ -591,9 +591,7 @@ def upload(self, name, body, private_key, chain, options, **kwargs): | |
s3.put( | ||
self.get_option("bucket", options), | ||
self.get_option("region", options), | ||
"{prefix}/{name}.{extension}".format( | ||
prefix=self.get_option("prefix", options), name=name, extension=ext | ||
), | ||
join(self.get_option("prefix", options), f"{name}.{ext}"), | ||
data, | ||
self.get_option("encrypt", options), | ||
account_number=self.get_option("accountNumber", options), | ||
|
@@ -669,6 +667,12 @@ def delete_acme_token(self, token_path, options, **kwargs): | |
"filename": filename}) | ||
return response | ||
|
||
def clean(self, certificate, options, **kwargs): | ||
prefix = self.get_option("prefix", options) | ||
s3.delete(bucket_name=self.get_option("bucket", options), | ||
prefixed_object_name=join(prefix, f"{certificate.name}.pem"), | ||
account_number=self.get_option("accountNumber", options)) | ||
|
||
|
||
class SNSNotificationPlugin(ExpirationNotificationPlugin): | ||
title = "AWS SNS" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters