parameters: (self, pkey, digest)
docstring: Sign the certificate request with this key and digest type.
  
          :param pkey: The private key to sign with.
          :type pkey: :py:class:`PKey`
  
          :param digest: The message digest to use.
          :type digest: :py:class:`bytes`
  
          :return: ``None``
docstring_summary: Sign the certificate request with this key and digest type.
docstring_tokens: Sign the certificate request with this key and digest type .
function: def sign(self, pkey, digest):
          """
          Sign the certificate request with this key and digest type.
  
          :param pkey: The private key to sign with.
          :type pkey: :py:class:`PKey`
  
          :param digest: The message digest to use.
          :type digest: :py:class:`bytes`
  
          :return: ``None``
          """
          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
          )
          _openssl_assert(sign_result > 0)
function_tokens: 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 ) _openssl_assert ( sign_result > 0 )