]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - crypto/hmac.c
[CRYPTO]: HMAC needs some more scatterlist fixups.
[mv-sheeva.git] / crypto / hmac.c
index e3f5c0f3e2f74ce2465b762e0aad594c833dbb8b..0f05be769c346c71d6ed3a70228d947c4699e50f 100644 (file)
@@ -61,7 +61,7 @@ static int hmac_setkey(struct crypto_hash *parent,
                desc.tfm = tfm;
                desc.flags = crypto_hash_get_flags(parent);
                desc.flags &= CRYPTO_TFM_REQ_MAY_SLEEP;
-               sg_set_buf(&tmp, inkey, keylen);
+               sg_init_one(&tmp, inkey, keylen);
 
                err = crypto_hash_digest(&desc, &tmp, keylen, digest);
                if (err)
@@ -96,7 +96,7 @@ static int hmac_init(struct hash_desc *pdesc)
 
        desc.tfm = ctx->child;
        desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
-       sg_set_buf(&tmp, ipad, bs);
+       sg_init_one(&tmp, ipad, bs);
 
        err = crypto_hash_init(&desc);
        if (unlikely(err))
@@ -131,7 +131,7 @@ static int hmac_final(struct hash_desc *pdesc, u8 *out)
 
        desc.tfm = ctx->child;
        desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
-       sg_set_buf(&tmp, opad, bs + ds);
+       sg_init_one(&tmp, opad, bs + ds);
 
        err = crypto_hash_final(&desc, digest);
        if (unlikely(err))