def gen_authzr(authz_status, domain, challs, statuses, combos=True):
 challbs = tuple((chall_to_challb(chall, status) for (chall, status) in six.moves.zip(challs, statuses)))
 authz_kwargs = {'identifier': messages.Identifier(typ=messages.IDENTIFIER_FQDN, value=domain), 'challenges': challbs}
 if combos:
  authz_kwargs.update({'combinations': gen_combos(challbs)})
 if (authz_status == messages.STATUS_VALID):
  authz_kwargs.update({'status': authz_status, 'expires': (datetime.datetime.now() + datetime.timedelta(days=31))})
 else:
  authz_kwargs.update({'status': authz_status})
 return messages.AuthorizationResource(uri='https://trusted.ca/new-authz-resource', new_cert_uri='https://trusted.ca/new-cert', body=messages.Authorization(**authz_kwargs))

def gen_authzr ( authz_status , domain , challs , statuses , combos = True ) : challbs = tuple ( ( chall_to_challb ( chall , status ) for ( chall , status ) in six . moves . zip ( challs , statuses ) ) ) authz_kwargs = { 'identifier' : messages . Identifier ( typ = messages . IDENTIFIER_FQDN , value = domain ) , 'challenges' : challbs } if combos : authz_kwargs . update ( { 'combinations' : gen_combos ( challbs ) } ) if ( authz_status == messages . STATUS_VALID ) : authz_kwargs . update ( { 'status' : authz_status , 'expires' : ( datetime . datetime . now ( ) + datetime . timedelta ( days = 31 ) ) } ) else : authz_kwargs . update ( { 'status' : authz_status } ) return messages . AuthorizationResource ( uri = 'https://trusted.ca/new-authz-resource' , new_cert_uri = 'https://trusted.ca/new-cert' , body = messages . Authorization ( ** authz_kwargs ) )
generate an authorization resource .