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