示例#1
0
    def work(self):

        valid, msg = is_valid_id_cert()
        if not valid:
            self.logmsg = msg
            self.errcode = evcommon.EVOTE_CERT_ERROR
            self.errmsg = evmessage.EV_ERRORS.EBASOBIV_SERTIFIKAAT
            return False

        self._ik, self._en, self._pn = cert_info()
        if not birthday.is_18(self._ik):
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EV_ERRORS.POLE_18
            self.logmsg = self.errmsg
            return False

        return True
示例#2
0
    def work(self):

        valid, msg = is_valid_id_cert()
        if not valid:
            self.logmsg = msg
            self.errcode = evcommon.EVOTE_CERT_ERROR
            self.errmsg = evmessage.EV_ERRORS.EBASOBIV_SERTIFIKAAT
            return False

        self._ik, self._en, self._pn = cert_info()
        if not birthday.is_18(self._ik):
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EV_ERRORS.POLE_18
            self.logmsg = self.errmsg
            return False

        return True
示例#3
0
    def work(self):

        valid, msg = is_valid_id_cert()
        if not valid:
            self.logmsg = msg
            self.errcode = evcommon.EVOTE_CERT_ERROR
            self.errmsg = evmessage.EvMessage().\
                get_str("SERTIFIKAAT_POLE_SELLE_CA_POOLT_VALJA_ANTUD", \
                    evstrings.SERTIFIKAAT_POLE_SELLE_CA_POOLT_VALJA_ANTUD)
            return False

        self._ik, self._en, self._pn = cert_info()
        if not birthday.is_18(self._ik):
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EvMessage().\
                get_str("POLE_18", evstrings.POLE_18)
            self.logmsg = self.errmsg
            return False

        return True
示例#4
0
    def work(self):

        valid, msg = is_valid_id_cert()
        if not valid:
            self.logmsg = msg
            self.errcode = evcommon.EVOTE_CERT_ERROR
            self.errmsg = evmessage.EvMessage().\
                get_str("SERTIFIKAAT_POLE_SELLE_CA_POOLT_VALJA_ANTUD", \
                    evstrings.SERTIFIKAAT_POLE_SELLE_CA_POOLT_VALJA_ANTUD)
            return False

        self._ik, self._en, self._pn = cert_info()
        if not birthday.is_18(self._ik):
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EvMessage().\
                get_str("POLE_18", evstrings.POLE_18)
            self.logmsg = self.errmsg
            return False

        return True
示例#5
0
    def work(self):

        valid, msg = is_valid_id_cert()
        if not valid:
            self.logmsg = msg
            self.errcode = evcommon.EVOTE_CERT_ERROR
            self.errmsg = evmessage.EV_ERRORS.EBASOBIV_SERTIFIKAAT
            return False

        self._ik, self._en, self._pn, org = cert_info()
        if not birthday.is_18(self._ik):
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EV_ERRORS.POLE_18
            self.logmsg = self.errmsg
            return False

        if org in ['ESTEID (DIGI-ID E-RESIDENT)',
                   'ESTEID (MOBIIL-ID E-RESIDENT)']:
            self.errcode = evcommon.EVOTE_ERROR
            self.errmsg = evmessage.EV_ERRORS.E_RESIDENT
            self.logmsg = self.errmsg
            return False

        return True