##### SUMMARY
The `get_certificate` module should support a cryptography backend, so PyOpenSSL can be deprecated / removed eventually.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
get_certificate

cert = get_server_certificate((host, port), ca_certs=ca_cert)
            x509 = crypto.load_certificate(crypto.FILETYPE_PEM, cert)
        except Exception as e:
            module.fail_json(msg="Failed to get cert from port with error: {0}".format(e))
    result['cert'] = cert
    result['subject'] = {}
    for component in x509.get_subject().get_components():
        result['subject'][component[0]] = component[1]
    result['expired'] = x509.has_expired()
    result['extensions'] = []
    extension_count = x509.get_extension_count()
    for index in range(0, extension_count):
        extension = x509.get_extension(index)
        result['extensions'].append({
            'critical': extension.get_critical(),
            'asn1_data': extension.get_data(),
            'name': extension.get_short_name(),
        })
    result['issuer'] = {}
    for component in x509.get_issuer().get_components():
        result['issuer'][component[0]] = component[1]
    result['not_after'] = x509.get_notAfter()
    result['not_before'] = x509.get_notBefore()
    result['serial_number'] = x509.get_serial_number()
    result['signature_algorithm'] = x509.get_signature_algorithm()
    result['version'] = x509.get_version()
    module.exit_json(**result)
if __name__ == '__main__':
    main()