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:
parent
c69363e8c7
commit
fa33b18940
@ -42,6 +42,7 @@ compute_kmac256 (void *digest, size_t digestlen,
|
|||||||
const void *custom, size_t customlen,
|
const void *custom, size_t customlen,
|
||||||
gcry_buffer_t *data_iov, int data_iovlen)
|
gcry_buffer_t *data_iov, int data_iovlen)
|
||||||
{
|
{
|
||||||
|
#if GCRYPT_VERSION_NUMBER >= 0x010b00
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
gcry_buffer_t iov[20];
|
gcry_buffer_t iov[20];
|
||||||
const unsigned char headPAD[2] = { 1, KECCAK512_BLOCKSIZE };
|
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,
|
err = gcry_md_hash_buffers_ext (GCRY_MD_CSHAKE256, 0,
|
||||||
digest, digestlen, iov, iovcnt);
|
digest, digestlen, iov, iovcnt);
|
||||||
return err;
|
return err;
|
||||||
|
#else
|
||||||
|
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user