diff options
author | Daiki Ueno <ueno@gnu.org> | 2021-12-22 08:22:04 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2021-12-22 08:25:19 +0100 |
commit | 3d5e876692da2f6fac59221653d8131177da259e (patch) | |
tree | db2babe7a0e65cb8b0eb73bcd1fa8c2f142b122f /lib | |
parent | 29eee975a62400231db28e3d0e0a53414e795ebd (diff) | |
download | gnutls-3d5e876692da2f6fac59221653d8131177da259e.tar.gz |
gnutls_{hash,hmac}_copy: mention the functions do not always work
It is known that some built-in accelerated implementation, such as
AF_ALG, does not support copying hash/hmac contexts. This expands the
documentation to suggest checking the return value of those functions.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crypto-api.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/crypto-api.c b/lib/crypto-api.c index bd600ef166..a43aaf9b89 100644 --- a/lib/crypto-api.c +++ b/lib/crypto-api.c @@ -543,7 +543,9 @@ gnutls_hmac_fast(gnutls_mac_algorithm_t algorithm, * This function will create a copy of MAC context, containing all its current * state. Copying contexts for MACs registered using * gnutls_crypto_register_mac() is not supported and will always result in an - * error. + * error. In addition to that, some of the MAC implementations do not support + * this operation. Applications should check the return value and provide a + * proper fallback. * * Returns: new MAC context or NULL in case of an error. * @@ -697,7 +699,9 @@ gnutls_hash_fast(gnutls_digest_algorithm_t algorithm, * This function will create a copy of Message Digest context, containing all * its current state. Copying contexts for Message Digests registered using * gnutls_crypto_register_digest() is not supported and will always result in - * an error. + * an error. In addition to that, some of the Message Digest implementations do + * not support this operation. Applications should check the return value and + * provide a proper fallback. * * Returns: new Message Digest context or NULL in case of an error. * |