Skip to content

Commit

Permalink
fix(dns): Fixed api secret encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Mordred committed May 28, 2020
1 parent dbb486c commit e5d7763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion certbot_plugin_websupport/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _find_txt_record_id(self, zone_id, record_name, record_content):
def _send_request(self, method, path, data=None):
timestamp = int(time.time())
canonical_request = "%s %s %s" % (method, path, timestamp)
signature = hmac.new(self.api_secret, canonical_request.encode('utf-8'), hashlib.sha1).hexdigest()
signature = hmac.new(self.api_secret.encode('utf-8'), canonical_request.encode('utf-8'), hashlib.sha1).hexdigest()

headers = {
"Authorization": "Basic %s" % (base64.b64encode("%s:%s" % (self.api_key, signature))),
Expand Down

0 comments on commit e5d7763

Please sign in to comment.