Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eckersley <pde@users.noreply.github.com>2015-10-21 22:05:36 +0300
committerPeter Eckersley <pde@users.noreply.github.com>2015-10-21 22:05:36 +0300
commitf9bbb0bf17b2084add5f49df62037a8d43176ae7 (patch)
tree2e98ac3d1e9a574c29c7b66c1f9f2d9b0c8d5453
parent67926faa54e7b17d8d1d1090d8f8d189a44b7bbe (diff)
parent5544ca1c3581585ebcd7cbd4cb6e94e96bfb5685 (diff)
Merge pull request #1013 from kuba/bugs/1012
Use PEM for Account.id generation.
-rw-r--r--letsencrypt/account.py2
-rw-r--r--letsencrypt/tests/account_test.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/letsencrypt/account.py b/letsencrypt/account.py
index 81d31b831..c41b10c4a 100644
--- a/letsencrypt/account.py
+++ b/letsencrypt/account.py
@@ -56,7 +56,7 @@ class Account(object): # pylint: disable=too-few-public-methods
self.id = hashlib.md5(
self.key.key.public_key().public_bytes(
- encoding=serialization.Encoding.DER,
+ encoding=serialization.Encoding.PEM,
format=serialization.PublicFormat.SubjectPublicKeyInfo)
).hexdigest()
# Implementation note: Email? Multiple accounts can have the
diff --git a/letsencrypt/tests/account_test.py b/letsencrypt/tests/account_test.py
index 4e2fdb122..9452a74f3 100644
--- a/letsencrypt/tests/account_test.py
+++ b/letsencrypt/tests/account_test.py
@@ -45,16 +45,16 @@ class AccountTest(unittest.TestCase):
def test_id(self):
self.assertEqual(
- self.acc.id, "2ba35a3bdf380ed76a5ac9e740568395")
+ self.acc.id, "bca5889f66457d5b62fbba7b25f9ab6f")
def test_slug(self):
self.assertEqual(
- self.acc.slug, "test.letsencrypt.org@2015-07-04T14:04:10Z (2ba3)")
+ self.acc.slug, "test.letsencrypt.org@2015-07-04T14:04:10Z (bca5)")
def test_repr(self):
self.assertEqual(
repr(self.acc),
- "<Account(2ba35a3bdf380ed76a5ac9e740568395)>")
+ "<Account(bca5889f66457d5b62fbba7b25f9ab6f)>")
class ReportNewAccountTest(unittest.TestCase):