aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 15:25:18 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 15:25:18 -0800
commit9783e1df7a6bd1e4dc5e2cafcdc29b65a47473d6 (patch)
tree9216a285bfe23aa799ca6efa01a3f4063d798e64 /crypto/hmac.c
parent[NET]: Fix net/socket.c warnings. (diff)
parent[CRYPTO] doc: added the developer of Camellia cipher (diff)
downloadlinux-dev-9783e1df7a6bd1e4dc5e2cafcdc29b65a47473d6.tar.xz
linux-dev-9783e1df7a6bd1e4dc5e2cafcdc29b65a47473d6.zip
Merge branch 'HEAD' of master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Conflicts: crypto/Kconfig
Diffstat (limited to 'crypto/hmac.c')
-rw-r--r--crypto/hmac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c
index b521bcd2b2c6..44187c5ee593 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -172,15 +172,16 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
static int hmac_init_tfm(struct crypto_tfm *tfm)
{
+ struct crypto_hash *hash;
struct crypto_instance *inst = (void *)tfm->__crt_alg;
struct crypto_spawn *spawn = crypto_instance_ctx(inst);
struct hmac_ctx *ctx = hmac_ctx(__crypto_hash_cast(tfm));
- tfm = crypto_spawn_tfm(spawn);
- if (IS_ERR(tfm))
- return PTR_ERR(tfm);
+ hash = crypto_spawn_hash(spawn);
+ if (IS_ERR(hash))
+ return PTR_ERR(hash);
- ctx->child = crypto_hash_cast(tfm);
+ ctx->child = hash;
return 0;
}