def __poll_sign(self): service = MobileIDService() r1, r2 = service.poll_sign(self.ctx()) if r1 == 'OUTSTANDING_TRANSACTION': return protocol.msg_mobid_poll() if r1 == 'SIGNATURE': return self.__hts_vote(r2) return self.__return_mid_error(r1)
def __poll_sign(self): service = MobileIDService() r1, r2 = service.poll_sign(self.ctx()) if r1 == "OUTSTANDING_TRANSACTION": return protocol.msg_mobid_poll() if r1 == "SIGNATURE": evlog.log("Received SIGNATURE from DDS") return self.__hts_vote(r2) return self.__return_mid_error(r1)
def __poll_auth(self): service = MobileIDService() rsp = service.poll_auth(self.ctx()) if rsp._Status == 'OUTSTANDING_TRANSACTION': return protocol.msg_mobid_poll() if rsp._Status == 'USER_AUTHENTICATED': c1, c2 = self.ctx().verify_challenge(rsp._Signature) if not c1: evlog.log_error(c2) return self.__return_mid_error('Autentimine ebaõnnestus') return self.__get_candidate_list() return self.__return_mid_error(rsp._Status)