]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_privkey_sign_data2: removed unnecessary text [ci skip]
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 5 Nov 2019 15:47:17 +0000 (16:47 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 5 Nov 2019 15:49:16 +0000 (16:49 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/privkey.c

index 4ef07c8b06f24c1269286ea12d98f3d02f79d6ef..425cc3e7c6869500f22fa21c9d5b06b03244e7c7 100644 (file)
@@ -1201,21 +1201,17 @@ gnutls_privkey_sign_data2(gnutls_privkey_t signer,
  * @hash_data: holds the data to be signed
  * @signature: will contain newly allocated signature
  *
- * This function will sign the given hashed data using a signature algorithm
- * supported by the private key. Signature algorithms are always used
- * together with a hash functions.  Different hash functions may be
- * used for the RSA algorithm, but only SHA-XXX for the DSA keys.
- *
- * You may use gnutls_pubkey_get_preferred_hash_algorithm() to determine
- * the hash algorithm.
+ * This function will sign the given hashed data using the specified signature
+ * algorithm. This function is an enhancement of gnutls_privkey_sign_hash(),
+ * as it allows utilizing a alternative signature algorithm where possible
+ * (e.g, use an RSA key with RSA-PSS).
  *
- * The flags may be %GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA or %GNUTLS_PRIVKEY_SIGN_FLAG_RSA_PSS.
- * In the former case this function will ignore @hash_algo and perform a raw PKCS1 signature,
- * and in the latter an RSA-PSS signature will be generated. Note that the flag
- * %GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA is supported since 3.6.9.
+ * The flags may be %GNUTLS_PRIVKEY_SIGN_FLAG_TLS1_RSA.
+ * In that case this function will ignore @hash_algo and perform a raw PKCS1 signature.
+ * Note that this flag is supported since 3.6.9.
  *
- * Note that, not all algorithm support signing already hashed data. When
- * signing with Ed25519, gnutls_privkey_sign_data() should be used.
+ * Note also that, not all algorithm support signing already hashed data. When
+ * signing with Ed25519, gnutls_privkey_sign_data2() should be used instead.
  *
  * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
  *   negative error value.