def cert_get_issuer(cert):
 delchars = ''.join((c for c in map(chr, range(256)) if (not c.isalnum())))
 try:
  issuer = str(cert.issuer.get_attributes_for_oid(x509.OID_ORGANIZATION_NAME)[0].value)
  for c in delchars:
   issuer = issuer.replace(c, '')
  return issuer
 except Exception as e:
  app.logger.error('Unable to get issuer! {0}'.format(e))
  return 'ERROR_EXTRACTING_ISSUER'

def cert_get_issuer ( cert ) : delchars = '' . join ( ( c for c in map ( chr , range ( 256 ) ) if ( not c . isalnum ( ) ) ) ) try : issuer = str ( cert . issuer . get_attributes_for_oid ( x509 . OID_ORGANIZATION_NAME ) [ 0 ] . value ) for c in delchars : issuer = issuer . replace ( c , '' ) return issuer except Exception as e : app . logger . error ( 'Unable to get issuer! {0}' . format ( e ) ) return 'ERROR_EXTRACTING_ISSUER'
gets a sane issuer from a given certificate .