diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 0c1af30..6d7d4ec 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -331,8 +331,17 @@ class Certificado(object): result = _call(args.format(self._path_cer, 'serial')) serie = result.split('=')[1].split('\n')[0][1::2] result = _call(args.format(self._path_cer, 'subject')) - #~ rfc = result.split('=')[5].split('/')[0].strip() - rfc = result.split('x500UniqueIdentifier = ')[1][:13].strip() + #~ Verificar si es por la version de OpenSSL + t1 = 'x500UniqueIdentifier = ' + t2 = 'x500UniqueIdentifier=' + if t1 in result: + rfc = result.split(t1)[1][:13].strip() + elif t2 in result: + rfc = result.split(t2)[1][:13].strip() + else: + self.error = 'No se pudo obtener el RFC del certificado' + return data + if not DEBUG: if not rfc == session_rfc: