From e05b10974c5a283e4b9b0a89a7cb3c4b5ca0b1b6 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Tue, 7 Jul 2015 07:20:48 +0000 Subject: [PATCH] test/acme_util.py: fix nonce lengths --- letsencrypt/achallenges.py | 3 --- letsencrypt/tests/acme_util.py | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/letsencrypt/achallenges.py b/letsencrypt/achallenges.py index 80535026b..0be626b35 100644 --- a/letsencrypt/achallenges.py +++ b/letsencrypt/achallenges.py @@ -58,9 +58,6 @@ class DVSNI(AnnotatedChallenge): """ response = challenges.DVSNIResponse(s=s) cert_pem = crypto_util.make_ss_cert(self.key.pem, [ - # TODO: setting nonce_domain first will cause "Error: - # [('asn1 encoding routines', 'ASN1_mbstring_ncopy', - # 'string too long')]" (get_subject().CN = domains[0]) self.domain, self.nonce_domain, response.z_domain(self.challb)]) return cert_pem, response diff --git a/letsencrypt/tests/acme_util.py b/letsencrypt/tests/acme_util.py index b0939dc68..4b660c648 100644 --- a/letsencrypt/tests/acme_util.py +++ b/letsencrypt/tests/acme_util.py @@ -21,8 +21,8 @@ KEY = jose.ComparableRSAKey(serialization.load_pem_private_key( SIMPLE_HTTP = challenges.SimpleHTTP( token="evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ+PCt92wr+oA") DVSNI = challenges.DVSNI( - r="O*\xb4-\xad\xec\x95>\xed\xa9\r0\x94\xe8\x97\x9c&6\xbf'\xb3" - "\xed\x9a9nX\x0f'\\m\xe7\x12", nonce="a82d5ff8ef740d12881f6d3c2277ab2e") + r=jose.b64decode("Tyq0La3slT7tqQ0wlOiXnCY2vyez7Zo5blgPJ1xt5xI"), + nonce=jose.b64decode("a82d5ff8ef740d12881f6d3c2277ab2e")) DNS = challenges.DNS(token="17817c66b60ce2e4012dfad92657527a") RECOVERY_CONTACT = challenges.RecoveryContact( activation_url="https://example.ca/sendrecovery/a5bd99383fb0", @@ -30,7 +30,7 @@ RECOVERY_CONTACT = challenges.RecoveryContact( contact="c********n@example.com") RECOVERY_TOKEN = challenges.RecoveryToken() POP = challenges.ProofOfPossession( - alg="RS256", nonce="xD\xf9\xb9\xdbU\xed\xaa\x17\xf1y|\x81\x88\x99 ", + alg="RS256", nonce=jose.b64decode("eET5udtV7aoX8Xl8gYiZIA"), hints=challenges.ProofOfPossession.Hints( jwk=jose.JWKRSA(key=KEY.public_key()), cert_fingerprints=(