crypto: n2/des - fix build breakage after DES updates
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 22 Aug 2019 11:49:15 +0000 (14:49 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Aug 2019 12:12:45 +0000 (22:12 +1000)
Fix build breakage caused by the DES library refactor.

Fixes: d4b90dbc8578 ("crypto: n2/des - switch to new verification routines")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/n2_core.c

index 4765163df6be2dac3c56ee36e37f751b4fe9210a..63923cc337271f7817d3956d24f422f699d77bad 100644 (file)
@@ -757,7 +757,8 @@ static int n2_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 static int n2_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
                         unsigned int keylen)
 {
-       struct n2_cipher_context *ctx = crypto_ablkcipher_ctx(cipher);
+       struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher);
+       struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm);
        struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm);
        int err;
 
@@ -775,7 +776,8 @@ static int n2_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 static int n2_3des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
                          unsigned int keylen)
 {
-       struct n2_cipher_context *ctx = crypto_ablkcipher_ctx(cipher);
+       struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher);
+       struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm);
        struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm);
        int err;