diff options
Diffstat (limited to 'crypto/crypto_null.c')
-rw-r--r-- | crypto/crypto_null.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c index 941c9a434d50..20ff2c746e0b 100644 --- a/crypto/crypto_null.c +++ b/crypto/crypto_null.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | 27 | ||
28 | static DEFINE_MUTEX(crypto_default_null_skcipher_lock); | 28 | static DEFINE_MUTEX(crypto_default_null_skcipher_lock); |
29 | static struct crypto_blkcipher *crypto_default_null_skcipher; | 29 | static struct crypto_skcipher *crypto_default_null_skcipher; |
30 | static int crypto_default_null_skcipher_refcnt; | 30 | static int crypto_default_null_skcipher_refcnt; |
31 | 31 | ||
32 | static int null_compress(struct crypto_tfm *tfm, const u8 *src, | 32 | static int null_compress(struct crypto_tfm *tfm, const u8 *src, |
@@ -153,15 +153,16 @@ MODULE_ALIAS_CRYPTO("compress_null"); | |||
153 | MODULE_ALIAS_CRYPTO("digest_null"); | 153 | MODULE_ALIAS_CRYPTO("digest_null"); |
154 | MODULE_ALIAS_CRYPTO("cipher_null"); | 154 | MODULE_ALIAS_CRYPTO("cipher_null"); |
155 | 155 | ||
156 | struct crypto_blkcipher *crypto_get_default_null_skcipher(void) | 156 | struct crypto_skcipher *crypto_get_default_null_skcipher(void) |
157 | { | 157 | { |
158 | struct crypto_blkcipher *tfm; | 158 | struct crypto_skcipher *tfm; |
159 | 159 | ||
160 | mutex_lock(&crypto_default_null_skcipher_lock); | 160 | mutex_lock(&crypto_default_null_skcipher_lock); |
161 | tfm = crypto_default_null_skcipher; | 161 | tfm = crypto_default_null_skcipher; |
162 | 162 | ||
163 | if (!tfm) { | 163 | if (!tfm) { |
164 | tfm = crypto_alloc_blkcipher("ecb(cipher_null)", 0, 0); | 164 | tfm = crypto_alloc_skcipher("ecb(cipher_null)", |
165 | 0, CRYPTO_ALG_ASYNC); | ||
165 | if (IS_ERR(tfm)) | 166 | if (IS_ERR(tfm)) |
166 | goto unlock; | 167 | goto unlock; |
167 | 168 | ||
@@ -181,7 +182,7 @@ void crypto_put_default_null_skcipher(void) | |||
181 | { | 182 | { |
182 | mutex_lock(&crypto_default_null_skcipher_lock); | 183 | mutex_lock(&crypto_default_null_skcipher_lock); |
183 | if (!--crypto_default_null_skcipher_refcnt) { | 184 | if (!--crypto_default_null_skcipher_refcnt) { |
184 | crypto_free_blkcipher(crypto_default_null_skcipher); | 185 | crypto_free_skcipher(crypto_default_null_skcipher); |
185 | crypto_default_null_skcipher = NULL; | 186 | crypto_default_null_skcipher = NULL; |
186 | } | 187 | } |
187 | mutex_unlock(&crypto_default_null_skcipher_lock); | 188 | mutex_unlock(&crypto_default_null_skcipher_lock); |