Validar fiel en todos los procesos
This commit is contained in:
commit
b1b73dae9f
|
@ -1,6 +1,11 @@
|
||||||
# Lista de cambios
|
# Lista de cambios
|
||||||
|
|
||||||
|
|
||||||
|
## v 0.5.1 [09-Feb-22]
|
||||||
|
---
|
||||||
|
* Fix - Validar fiel en cada proceso.
|
||||||
|
|
||||||
|
|
||||||
## v 0.5.0 [06-Feb-22]
|
## v 0.5.0 [06-Feb-22]
|
||||||
---
|
---
|
||||||
* Se cambia la lógica para evitar el error de token caducado.
|
* Se cambia la lógica para evitar el error de token caducado.
|
||||||
|
|
|
@ -221,14 +221,12 @@ def _validate_verificar_args(args):
|
||||||
if not result:
|
if not result:
|
||||||
return False, {}
|
return False, {}
|
||||||
|
|
||||||
if not data['path_enc'].is_file():
|
if not data['path_enc'].is_file() and not data['path_pem'].is_file():
|
||||||
msg = f"No se encontró la FIEL encriptada. \nRuta: {data['path_enc']}"
|
msg = f"No se encontró la FIEL [enc|pem].\nRuta: {data['path_enc']}"
|
||||||
log.error(msg)
|
log.error(msg)
|
||||||
return False, {}
|
return False, {}
|
||||||
|
|
||||||
cer = data['path_cer'].read_bytes()
|
cert = _get_cert(data)
|
||||||
key = data['path_enc'].read_bytes()
|
|
||||||
cert = SATCertificate(cer, key)
|
|
||||||
|
|
||||||
if not cert.is_valid_time:
|
if not cert.is_valid_time:
|
||||||
msg = 'La FIEL no es vigente'
|
msg = 'La FIEL no es vigente'
|
||||||
|
@ -251,14 +249,12 @@ def _validate_download_args(args):
|
||||||
if not result:
|
if not result:
|
||||||
return False, {}
|
return False, {}
|
||||||
|
|
||||||
if not data['path_enc'].is_file():
|
if not data['path_enc'].is_file() and not data['path_pem'].is_file():
|
||||||
msg = f"No se encontró la FIEL encriptada. \nRuta: {data['path_enc']}"
|
msg = f"No se encontró la FIEL [enc|pem].\nRuta: {data['path_enc']}"
|
||||||
log.error(msg)
|
log.error(msg)
|
||||||
return False, {}
|
return False, {}
|
||||||
|
|
||||||
cer = data['path_cer'].read_bytes()
|
cert = _get_cert(data)
|
||||||
key = data['path_enc'].read_bytes()
|
|
||||||
cert = SATCertificate(cer, key)
|
|
||||||
|
|
||||||
if not cert.is_valid_time:
|
if not cert.is_valid_time:
|
||||||
msg = 'La FIEL no es vigente'
|
msg = 'La FIEL no es vigente'
|
||||||
|
|
Loading…
Reference in New Issue