Commit 84ada5dd authored by Milan Broz's avatar Milan Broz

Support Nettle 2.4 crypto backend (for ripemd160).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@613 36d66b0a-2a48-0410-832c-cd162a569da5
parent 7158c32b
2011-10-05 Milan Broz <mbroz@redhat.com>
* Support Nettle 2.4 crypto backend (for ripemd160).
2011-09-22 Milan Broz <mbroz@redhat.com>
* Support key-slot option for luksOpen (use only explicit keyslot).
......
......@@ -124,13 +124,11 @@ AC_DEFUN([CONFIGURE_NETTLE], [
[AC_MSG_ERROR('You need Nettle cryptographic library.')])
saved_LIBS=$LIBS
AC_CHECK_LIB(nettle, nettle_sha512_init,,
[AC_MSG_ERROR('You need Nettle library version 2.1 or more recent.')])
AC_CHECK_LIB(nettle, nettle_ripemd160_init,,
[AC_MSG_ERROR('You need Nettle library version 2.4 or more recent.')])
CRYPTO_LIBS=$LIBS
LIBS=$saved_LIBS
AC_MSG_WARN([Nettle backend does NOT provide backward compatibility (missing ripemd160 hash).])
CRYPTO_STATIC_LIBS=$CRYPTO_LIBS
])
......
......@@ -81,6 +81,14 @@ static struct hash_alg hash_algs[] = {
(digest_func) hmac_sha512_digest,
(set_key_func) hmac_sha512_set_key,
},
{ "ripemd160", RIPEMD160_DIGEST_SIZE,
(init_func) ripemd160_init,
(update_func) ripemd160_update,
(digest_func) ripemd160_digest,
(update_func) hmac_ripemd160_update,
(digest_func) hmac_ripemd160_digest,
(set_key_func) hmac_ripemd160_set_key,
},
{ NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment