def setUp(self): from acme.messages import ChallengeBody from acme.messages import STATUS_VALID self.challbs = ( ChallengeBody( uri='http://challb1', status=STATUS_VALID, chall=challenges.SimpleHTTP(token=b'IlirfxKKXAsHtmzK29Pj8A')), ChallengeBody(uri='http://challb2', status=STATUS_VALID, chall=challenges.DNS( token=b'DGyRejmCefe7v4NfDGDKfA')), ChallengeBody(uri='http://challb3', status=STATUS_VALID, chall=challenges.RecoveryContact()), ) combinations = ((0, 2), (1, 2)) from acme.messages import Authorization from acme.messages import Identifier from acme.messages import IDENTIFIER_FQDN identifier = Identifier(typ=IDENTIFIER_FQDN, value='example.com') self.authz = Authorization( identifier=identifier, combinations=combinations, challenges=self.challbs) self.jobj_from = { 'identifier': identifier.to_json(), 'challenges': [challb.to_json() for challb in self.challbs], 'combinations': combinations, }
def setUp(self): jwk = jose.JWKRSA(key=KEY.publickey()) from acme.messages import Authorization self.msg = Authorization(recovery_token='tok', jwk=jwk, identifier='example.com') self.jmsg = { 'type': 'authorization', 'recoveryToken': 'tok', 'identifier': 'example.com', 'jwk': jwk, }