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))
Gets a sane issuer from a given certificate.
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/watchers/iam/iam_ssl.py/cert_get_issuer