Commit 110bf1c0e932615cbe43a8af8a07bc3750ae4295
Committed by
Herbert Xu
1 parent
82062c72cd
Exists in
master
and in
7 other branches
[CRYPTO] api: Fixed incorrect passing of context instead of tfm
Fix a few omissions in passing TFM instead of CTX to algorithms. Signed-off-by: Michal Ludvig <michal@logix.cz> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 2 changed files with 4 additions and 4 deletions Side-by-side Diff
crypto/compress.c
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | int ret = 0; |
45 | 45 | struct compress_tfm *ops = &tfm->crt_compress; |
46 | 46 | |
47 | - ret = tfm->__crt_alg->cra_compress.coa_init(crypto_tfm_ctx(tfm)); | |
47 | + ret = tfm->__crt_alg->cra_compress.coa_init(tfm); | |
48 | 48 | if (ret) |
49 | 49 | goto out; |
50 | 50 | |
... | ... | @@ -57,6 +57,6 @@ |
57 | 57 | |
58 | 58 | void crypto_exit_compress_ops(struct crypto_tfm *tfm) |
59 | 59 | { |
60 | - tfm->__crt_alg->cra_compress.coa_exit(crypto_tfm_ctx(tfm)); | |
60 | + tfm->__crt_alg->cra_compress.coa_exit(tfm); | |
61 | 61 | } |
crypto/digest.c
... | ... | @@ -70,10 +70,10 @@ |
70 | 70 | unsigned int size = crypto_tfm_alg_digestsize(tfm); |
71 | 71 | u8 buffer[size + alignmask]; |
72 | 72 | u8 *dst = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); |
73 | - tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), dst); | |
73 | + tfm->__crt_alg->cra_digest.dia_final(tfm, dst); | |
74 | 74 | memcpy(out, dst, size); |
75 | 75 | } else |
76 | - tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out); | |
76 | + tfm->__crt_alg->cra_digest.dia_final(tfm, out); | |
77 | 77 | } |
78 | 78 | |
79 | 79 | static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) |