def cert_get_bitstrength(cert):
    if hasattr(cert.public_key(), 'key_size'):
        return cert.public_key().key_size
    else:
        return None
Calculates a certificates public key bit length.
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/watchers/iam/iam_ssl.py/cert_get_bitstrength