'Sign the certificate request using the supplied key and digest
:param pkey: The key to sign with
:param digest: The message digest to use
:return: None'

def sign(self, pkey, digest):

    if pkey._only_public:
        raise ValueError('Key    has    only    public    part')
    if (not pkey._initialized):
        raise ValueError('Key    is    uninitialized')
    digest_obj = _lib.EVP_get_digestbyname(_byte_string(digest))
    if (digest_obj == _ffi.NULL):
        raise ValueError('No    such    digest    method')
    sign_result = _lib.NETSCAPE_SPKI_sign(self._spki, pkey._pkey, digest_obj)
    if (not sign_result):
        _raise_current_error()
