##### 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

if bytes is None:
        return bytes
    data = binascii.hexlify(bytes)
    data = to_text(b':'.join(data[i:i + 2] for i in range(0, len(data), 2)))
    return data
def cryptography_decode_name(name):
    '''
    Given a cryptography x509.Name object, returns a string.
    Raises an OpenSSLObjectError if the name is not supported.
    '''
    if isinstance(name, x509.DNSName):
        return 'DNS:{0}'.format(name.value)
    if isinstance(name, x509.IPAddress):
        return 'IP:{0}'.format(name.value.compressed)
    if isinstance(name, x509.RFC822Name):
        return 'email:{0}'.format(name.value)
    if isinstance(name, x509.UniformResourceIdentifier):
        return 'URI:{0}'.format(name.value)
    if isinstance(name, x509.DirectoryName):
        
        return 'DirName:' + ''.join(['/{0}:{1}'.format(attribute.oid._name, attribute.value) for attribute in name.value])
    if isinstance(name, x509.RegisteredID):
        
        return 'RegisteredID:{0}'.format(name.value)
    if isinstance(name, x509.OtherName):
        
        return '{0}:{1}'.format(name.type_id.dotted_string, _get_hex(name.value))
    raise OpenSSLObjectError('Cannot decode name "{0}"'.format(name))
def _cryptography_get_keyusage(usage):