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
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
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