def setUp(self): # acme-spec uses a confusing example in which both signature # nonce and challenge nonce are the same, don't make the same # mistake here... signature = other.Signature( alg=jose.RS256, jwk=jose.JWKRSA(key=KEY.publickey()), sig='\xa7\xc1\xe7\xe82o\xbc\xcd\xd0\x1e\x010#Z|\xaf\x15\x83' '\x94\x8f#\x9b\nQo(\x80\x15,\x08\xfcz\x1d\xfd\xfd.\xaap' '\xfa\x06\xd1\xa2f\x8d8X2>%d\xbd%\xe1T\xdd\xaa0\x18\xde' '\x99\x08\xf0\x0e{', nonce='\x99\xc7Q\xb3f2\xbc\xdci\xfe\xd6\x98k\xc67\xdf', ) from letsencrypt.acme.challenges import ProofOfPossessionResponse self.msg = ProofOfPossessionResponse( nonce='xD\xf9\xb9\xdbU\xed\xaa\x17\xf1y|\x81\x88\x99 ', signature=signature) self.jmsg_to = { 'type': 'proofOfPossession', 'nonce': 'eET5udtV7aoX8Xl8gYiZIA', 'signature': signature, } self.jmsg_from = { 'type': 'proofOfPossession', 'nonce': 'eET5udtV7aoX8Xl8gYiZIA', 'signature': signature.fully_serialize(), }
def setUp(self): self.responses = ( challenges.SimpleHTTPSResponse(path='Hf5GrX4Q7EBax9hc2jJnfw'), None, # null challenges.RecoveryTokenResponse(token='23029d88d9e123e'), ) self.contact = ("mailto:[email protected]", "tel:+12025551212") signature = other.Signature( alg=jose.RS256, jwk=jose.JWKRSA(key=KEY.publickey()), sig='-v\xd8\xc2\xa3\xba0\xd6\x92\x16\xb5.\xbe\xa1[\x04\xbe' '\x1b\xa1X\xd2)\x18\x94\x8f\xd7\xd0\xc0\xbbcI`W\xdf v' '\xe4\xed\xe8\x03J\xe8\xc8<?\xc8W\x94\x94cj(\xe7\xaa$' '\x92\xe9\x96\x11\xc2\xefx\x0bR', nonce='\xab?\x08o\xe6\x81$\x9f\xa1\xc9\x025\x1c\x1b\xa5+') from letsencrypt.acme.messages import AuthorizationRequest self.msg = AuthorizationRequest( session_id='aefoGaavieG9Wihuk2aufai3aeZ5EeW4', nonce='\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9', responses=self.responses, signature=signature, contact=self.contact, ) self.jmsg_to = { 'type': 'authorizationRequest', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'responses': self.responses, 'signature': signature, 'contact': self.contact, } self.jmsg_from = { 'type': 'authorizationRequest', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'responses': [ None if response is None else response.fully_serialize() for response in self.responses ], 'signature': signature.fully_serialize(), # TODO: schema validation doesn't recognize tuples as # arrays :( 'contact': list(self.contact), }
def setUp(self): self.responses = [ { 'type': 'simpleHttps', 'path': 'Hf5GrX4Q7EBax9hc2jJnfw' }, None, # null { 'type': 'recoveryToken', 'token': '23029d88d9e123e' }, ] self.contact = ["mailto:[email protected]", "tel:+12025551212"] signature = other.Signature( alg='RS256', jwk=jose.JWK(key=KEY.publickey()), sig='-v\xd8\xc2\xa3\xba0\xd6\x92\x16\xb5.\xbe\xa1[\x04\xbe' '\x1b\xa1X\xd2)\x18\x94\x8f\xd7\xd0\xc0\xbbcI`W\xdf v' '\xe4\xed\xe8\x03J\xe8\xc8<?\xc8W\x94\x94cj(\xe7\xaa$' '\x92\xe9\x96\x11\xc2\xefx\x0bR', nonce='\xab?\x08o\xe6\x81$\x9f\xa1\xc9\x025\x1c\x1b\xa5+') from letsencrypt.acme.messages import AuthorizationRequest self.msg = AuthorizationRequest( session_id='aefoGaavieG9Wihuk2aufai3aeZ5EeW4', nonce='\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9', responses=self.responses, signature=signature, contact=self.contact, ) self.jmsg_to = { 'type': 'authorizationRequest', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'responses': self.responses, 'signature': signature, 'contact': self.contact, } self.jmsg_from = { 'type': 'authorizationRequest', 'sessionID': 'aefoGaavieG9Wihuk2aufai3aeZ5EeW4', 'nonce': '7Nbyb1lI6xPVI3Hg3aKSqQ', 'responses': self.responses, 'signature': signature.to_json(), 'contact': self.contact, } self.jmsg_from['signature']['jwk'] = self.jmsg_from['signature'][ 'jwk'].to_json()
def setUp(self): signature = other.Signature( alg='RS256', jwk=jose.JWK(key=KEY.publickey()), sig='\x15\xed\x84\xaa:\xf2DO\x0e9 \xbcg\xf8\xc0\xcf\x87\x9a' '\x95\xeb\xffT[\x84[\xec\x85\x7f\x8eK\xe9\xc2\x12\xc8Q' '\xafo\xc6h\x07\xba\xa6\xdf\xd1\xa7"$\xba=Z\x13n\x14\x0b' 'k\xfe\xee\xb4\xe4\xc8\x05\x9a\x08\xa7', nonce='\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9') from letsencrypt.acme.messages import CertificateRequest self.msg = CertificateRequest(csr=CSR, signature=signature) self.jmsg = { 'type': 'certificateRequest', 'csr': jose.b64encode(CSR.as_der()), 'signature': signature, }
def setUp(self): self.sig_nonce = '\xec\xd6\xf2oYH\xeb\x13\xd5#q\xe0\xdd\xa2\x92\xa9' signature = other.Signature( alg='RS256', jwk=jose.JWK(key=KEY.publickey()), sig='eJ\xfe\x12"U\x87\x8b\xbf/ ,\xdeP\xb2\xdc1\xb00\xe5\x1dB' '\xfch<\xc6\x9eH@!\x1c\x16\xb2\x0b_\xc4\xddP\x89\xc8\xce?' '\x16g\x069I\xb9\xb3\x91\xb9\x0e$3\x9f\x87\x8e\x82\xca\xc5' 's\xd9\xd0\xe7', nonce=self.sig_nonce) from letsencrypt.acme.messages import RevocationRequest self.msg = RevocationRequest(certificate=CERT, signature=signature) self.jmsg = { 'type': 'revocationRequest', 'certificate': jose.b64encode(CERT.as_der()), 'signature': signature, }