mirror of
https://github.com/certbot/certbot.git
synced 2026-06-11 01:30:14 -04:00
Merge pull request #1013 from kuba/bugs/1012
Use PEM for Account.id generation.
This commit is contained in:
commit
f9bbb0bf17
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue