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), - "") + "") class ReportNewAccountTest(unittest.TestCase):