'export a CRL as a string
:param cert: Used to sign CRL.
:type cert: :class:`X509`
:param key: Used to sign CRL.
:type key: :class:`PKey`
:param type: The export format, either :py:data:`FILETYPE_PEM`,
:py:data:`FILETYPE_ASN1`, or :py:data:`FILETYPE_TEXT`.
:param int days: The number of days until the next update of this CRL.
:param bytes digest: The name of the message digest to use (eg
``b"sha1"``).
:return: :py:data:`bytes`'

def export(self, cert, key, type=FILETYPE_PEM, days=100, digest=_UNSPECIFIED):

    if (not isinstance(cert, X509)):
        raise TypeError('cert    must    be    an    X509    instance')
    if (not isinstance(key, PKey)):
        raise TypeError('key    must    be    a    PKey    instance')
    if (not isinstance(type, int)):
        raise TypeError('type    must    be    an    integer')
    if (digest is _UNSPECIFIED):
        _warn('The    default    message    digest    (md5)    is    deprecated.        Pass    the    name    of    a    message    digest    explicitly.', category=DeprecationWarning, stacklevel=2)
        digest = 'md5'
    digest_obj = _lib.EVP_get_digestbyname(digest)
    if (digest_obj == _ffi.NULL):
        raise ValueError('No    such    digest    method')
    bio = _lib.BIO_new(_lib.BIO_s_mem())
    if (bio == _ffi.NULL):
        _raise_current_error()
    sometime = _lib.ASN1_TIME_new()
    if (sometime == _ffi.NULL):
        _raise_current_error()
    _lib.X509_gmtime_adj(sometime, 0)
    _lib.X509_CRL_set_lastUpdate(self._crl, sometime)
    _lib.X509_gmtime_adj(sometime, (((days * 24) * 60) * 60))
    _lib.X509_CRL_set_nextUpdate(self._crl, sometime)
    _lib.X509_CRL_set_issuer_name(self._crl, _lib.X509_get_subject_name(cert._x509))
    sign_result = _lib.X509_CRL_sign(self._crl, key._pkey, digest_obj)
    if (not sign_result):
        _raise_current_error()
    if (type == FILETYPE_PEM):
        ret = _lib.PEM_write_bio_X509_CRL(bio, self._crl)
    elif (type == FILETYPE_ASN1):
        ret = _lib.i2d_X509_CRL_bio(bio, self._crl)
    elif (type == FILETYPE_TEXT):
        ret = _lib.X509_CRL_print(bio, self._crl)
    else:
        raise ValueError('type    argument    must    be    FILETYPE_PEM,    FILETYPE_ASN1,    or    FILETYPE_TEXT')
    if (not ret):
        _raise_current_error()
    return _bio_to_string(bio)
