forked from elmau/empresa-libre
Fix - al obtener el RFC del certificado en Centos7
This commit is contained in:
parent
6184a8c892
commit
4e693312e5
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue