1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Allow building with libgcrypt 1.10 for now.

* common/kmac.c (compute_kmac256): Return an error for older gcrypt
versions.
--

Except for the new KEM module there is no hard requirement for
libgcrypt 1.11 *yet*.
This commit is contained in:
Werner Koch 2024-04-03 09:43:25 +02:00
parent c69363e8c7
commit fa33b18940
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -42,6 +42,7 @@ compute_kmac256 (void *digest, size_t digestlen,
const void *custom, size_t customlen,
gcry_buffer_t *data_iov, int data_iovlen)
{
#if GCRYPT_VERSION_NUMBER >= 0x010b00
gpg_error_t err;
gcry_buffer_t iov[20];
const unsigned char headPAD[2] = { 1, KECCAK512_BLOCKSIZE };
@ -129,4 +130,7 @@ compute_kmac256 (void *digest, size_t digestlen,
err = gcry_md_hash_buffers_ext (GCRY_MD_CSHAKE256, 0,
digest, digestlen, iov, iovcnt);
return err;
#else
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
#endif
}