Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
    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)
Exemple #5
0
    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)