Merge branch 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[cascardo/linux.git] / net / sunrpc / auth_gss / gss_krb5_keys.c
index 234fa8d..8701331 100644 (file)
@@ -54,9 +54,9 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#include <crypto/skcipher.h>
 #include <linux/err.h>
 #include <linux/types.h>
-#include <linux/crypto.h>
 #include <linux/sunrpc/gss_krb5.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/lcm.h>
@@ -147,7 +147,7 @@ u32 krb5_derive_key(const struct gss_krb5_enctype *gk5e,
        size_t blocksize, keybytes, keylength, n;
        unsigned char *inblockdata, *outblockdata, *rawkey;
        struct xdr_netobj inblock, outblock;
-       struct crypto_blkcipher *cipher;
+       struct crypto_skcipher *cipher;
        u32 ret = EINVAL;
 
        blocksize = gk5e->blocksize;
@@ -157,11 +157,11 @@ u32 krb5_derive_key(const struct gss_krb5_enctype *gk5e,
        if ((inkey->len != keylength) || (outkey->len != keylength))
                goto err_return;
 
-       cipher = crypto_alloc_blkcipher(gk5e->encrypt_name, 0,
-                                       CRYPTO_ALG_ASYNC);
+       cipher = crypto_alloc_skcipher(gk5e->encrypt_name, 0,
+                                      CRYPTO_ALG_ASYNC);
        if (IS_ERR(cipher))
                goto err_return;
-       if (crypto_blkcipher_setkey(cipher, inkey->data, inkey->len))
+       if (crypto_skcipher_setkey(cipher, inkey->data, inkey->len))
                goto err_return;
 
        /* allocate and set up buffers */
@@ -238,7 +238,7 @@ err_free_in:
        memset(inblockdata, 0, blocksize);
        kfree(inblockdata);
 err_free_cipher:
-       crypto_free_blkcipher(cipher);
+       crypto_free_skcipher(cipher);
 err_return:
        return ret;
 }