Re: crypto: sha-s390 - Switch to shash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 02, 2009 at 06:01:07PM +0000, Jan Glauber wrote:
>
> The patch is not yet in cryptodev, so I applied it on top of cryptodev.
> Compiling it gives me the following error:
> 
>  CC [M]  arch/s390/crypto/sha256_s390.o
> arch/s390/crypto/sha_common.c: In function ‘s390_sha_update’:
> arch/s390/crypto/sha_common.c:23: error: implicit declaration of function ‘crypto_shash_blocksize’
> make[1]: *** [arch/s390/crypto/sha_common.o] Error 1

Thanks for testing! It turns out that this was the first in-tree
user for crypto_shash_blocksize so I'll need to add it.

crypto: shash - Add crypto_shash_blocksize

This function is needed by algorithms that don't know their own
block size, e.g., in s390 where the code is common between multiple
versions of SHA.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index cd16d6e..b71c86b 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -231,6 +231,11 @@ static inline unsigned int crypto_shash_alignmask(
 	return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm));
 }
 
+static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm)
+{
+	return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm));
+}
+
 static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg)
 {
 	return container_of(alg, struct shash_alg, base);

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux