def _load_x509(certificate):
source = certificate.dump()<EOL>cf_source = None<EOL>try:<EOL><INDENT>cf_source = CFHelpers.cf_data_from_bytes(source)<EOL>sec_key_ref = Security.SecCertificateCreateWithData(CoreFoundation.kCFAllocatorDefault, cf_source)<EOL>return Certificate(sec_key_ref, certificate)<EOL><DEDENT>finally:<EOL><INDENT>if cf_source:<EOL><INDENT>CoreFoundation.CFRelease(cf_source)<EOL><DEDENT><DEDENT>
Loads an ASN.1 object of an x509 certificate into a Certificate object

:param certificate:
    An asn1crypto.x509.Certificate object

:return:
    A Certificate object