Hi:

[CRYPTO] digest: Fix dit_final typo and remove dia_digest

The choice of dia_final versus final for dit_final was reversed.  This
patch fixes that.

It also removes dia_digest since it turns out that the only potential
user for it, padlock-sha + IPsec, wouldn't work because it just so
happens that for ESP the hash offset is off the encryption offset by
24 bytes for AES.  Since padlock requires the input to be 16-byte
aligned, at least one of them (or both) will have to cope with copying.

If something else needs it in future we can always add it back.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/crypto/digest.c b/crypto/digest.c
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -109,9 +109,9 @@ int crypto_init_digest_ops(struct crypto
        
        ops->dit_init   = dalg->dia_init;
        ops->dit_update = dalg->dia_update_sg ?: update;
-       ops->dit_final  = crypto_tfm_alg_alignmask(tfm) ? dalg->dia_final :
-                                                         final;
-       ops->dit_digest = dalg->dia_digest ?: digest;
+       ops->dit_final  = crypto_tfm_alg_alignmask(tfm) ?
+                         final : dalg->dia_final;
+       ops->dit_digest = digest;
        ops->dit_setkey = dalg->dia_setkey ? setkey : nosetkey;
        
        return 0;
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -111,8 +111,6 @@ struct digest_alg {
        void (*dia_update_sg)(struct crypto_tfm *tfm, struct scatterlist *sg,
                              unsigned int nsg);
        void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
-       void (*dia_digest)(struct crypto_tfm *tfm, struct scatterlist *sg,
-                          unsigned int nsg, u8 *out);
        int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
                          unsigned int keylen);
 };
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to