@classmethod<EOL><INDENT>def from_der_data(cls, data):<DEDENT>
<EOL>logger.debug("<STR_LIT>".format(data))<EOL>if cls._cert_asn1_type is None:<EOL><INDENT>cls._cert_asn1_type = Certificate()<EOL><DEDENT>cert = der_decoder.decode(data, asn1Spec = cls._cert_asn1_type)[<NUM_LIT:0>]<EOL>result = cls()<EOL>tbs_cert = cert.getComponentByName('<STR_LIT>')<EOL>subject = tbs_cert.getComponentByName('<STR_LIT>')<EOL>logger.debug("<STR_LIT>".format(subject))<EOL>result._decode_subject(subject)<EOL>validity = tbs_cert.getComponentByName('<STR_LIT>')<EOL>result._decode_validity(validity)<EOL>extensions = tbs_cert.getComponentByName('<STR_LIT>')<EOL>if extensions:<EOL><INDENT>for extension in extensions:<EOL><INDENT>logger.debug("<STR_LIT>".format(extension))<EOL>oid = extension.getComponentByName('<STR_LIT>')<EOL>logger.debug("<STR_LIT>".format(oid))<EOL>if oid != SUBJECT_ALT_NAME_OID:<EOL><INDENT>continue<EOL><DEDENT>value = extension.getComponentByName('<STR_LIT>')<EOL>logger.debug("<STR_LIT>".format(value))<EOL>if isinstance(value, Any):<EOL><INDENT>value = der_decoder.decode(value,<EOL>asn1Spec = OctetString())[<NUM_LIT:0>]<EOL><DEDENT>alt_names = der_decoder.decode(value,<EOL>asn1Spec = GeneralNames())[<NUM_LIT:0>]<EOL>logger.debug("<STR_LIT>".format(alt_names))<EOL>result._decode_alt_names(alt_names)<EOL><DEDENT><DEDENT>return result<EOL>
Decode DER-encoded certificate.

        :Parameters:
            - `data`: the encoded certificate
        :Types:
            - `data`: `bytes`

        :Return: decoded certificate data
        :Returntype: ASN1CertificateData