def asn1_to_der(asn1):
    """Convert from asn1crypto x509 to DER bytes.

    Args:
        asn1 (:obj:`x509.Certificate`):
            asn1crypto x509 to convert to DER bytes

    Returns:
        (:obj:`bytes`)

    """
    return asn1.dump()