git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git]
/
net
/
sunrpc
/
auth_gss
/
gss_krb5_mech.c
diff --git
a/net/sunrpc/auth_gss/gss_krb5_mech.c
b/net/sunrpc/auth_gss/gss_krb5_mech.c
index
70e1e53
..
325e72e
100644
(file)
--- a/
net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/
net/sunrpc/auth_gss/gss_krb5_mech.c
@@
-34,6
+34,7
@@
*
*/
*
*/
+#include <linux/err.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
@@
-78,10
+79,10
@@
simple_get_netobj(const void *p, const void *end, struct xdr_netobj *res)
}
static inline const void *
}
static inline const void *
-get_key(const void *p, const void *end, struct crypto_
tfm
**res)
+get_key(const void *p, const void *end, struct crypto_
blkcipher
**res)
{
struct xdr_netobj key;
{
struct xdr_netobj key;
- int alg
, alg_mode
;
+ int alg;
char *alg_name;
p = simple_get_bytes(p, end, &alg, sizeof(alg));
char *alg_name;
p = simple_get_bytes(p, end, &alg, sizeof(alg));
@@
-93,18
+94,19
@@
get_key(const void *p, const void *end, struct crypto_tfm **res)
switch (alg) {
case ENCTYPE_DES_CBC_RAW:
switch (alg) {
case ENCTYPE_DES_CBC_RAW:
- alg_name = "des";
- alg_mode = CRYPTO_TFM_MODE_CBC;
+ alg_name = "cbc(des)";
break;
default:
printk("gss_kerberos_mech: unsupported algorithm %d\n", alg);
goto out_err_free_key;
}
break;
default:
printk("gss_kerberos_mech: unsupported algorithm %d\n", alg);
goto out_err_free_key;
}
- if (!(*res = crypto_alloc_tfm(alg_name, alg_mode))) {
+ *res = crypto_alloc_blkcipher(alg_name, 0, CRYPTO_ALG_ASYNC);
+ if (IS_ERR(*res)) {
printk("gss_kerberos_mech: unable to initialize crypto algorithm %s\n", alg_name);
printk("gss_kerberos_mech: unable to initialize crypto algorithm %s\n", alg_name);
+ *res = NULL;
goto out_err_free_key;
}
goto out_err_free_key;
}
- if (crypto_cipher_setkey(*res, key.data, key.len)) {
+ if (crypto_
blk
cipher_setkey(*res, key.data, key.len)) {
printk("gss_kerberos_mech: error setting key for crypto algorithm %s\n", alg_name);
goto out_err_free_tfm;
}
printk("gss_kerberos_mech: error setting key for crypto algorithm %s\n", alg_name);
goto out_err_free_tfm;
}
@@
-113,7
+115,7
@@
get_key(const void *p, const void *end, struct crypto_tfm **res)
return p;
out_err_free_tfm:
return p;
out_err_free_tfm:
- crypto_free_
tfm
(*res);
+ crypto_free_
blkcipher
(*res);
out_err_free_key:
kfree(key.data);
p = ERR_PTR(-EINVAL);
out_err_free_key:
kfree(key.data);
p = ERR_PTR(-EINVAL);
@@
-172,9
+174,9
@@
gss_import_sec_context_kerberos(const void *p,
return 0;
out_err_free_key2:
return 0;
out_err_free_key2:
- crypto_free_
tfm
(ctx->seq);
+ crypto_free_
blkcipher
(ctx->seq);
out_err_free_key1:
out_err_free_key1:
- crypto_free_
tfm
(ctx->enc);
+ crypto_free_
blkcipher
(ctx->enc);
out_err_free_mech:
kfree(ctx->mech_used.data);
out_err_free_ctx:
out_err_free_mech:
kfree(ctx->mech_used.data);
out_err_free_ctx:
@@
-187,8
+189,8
@@
static void
gss_delete_sec_context_kerberos(void *internal_ctx) {
struct krb5_ctx *kctx = internal_ctx;
gss_delete_sec_context_kerberos(void *internal_ctx) {
struct krb5_ctx *kctx = internal_ctx;
- crypto_free_
tfm
(kctx->seq);
- crypto_free_
tfm
(kctx->enc);
+ crypto_free_
blkcipher
(kctx->seq);
+ crypto_free_
blkcipher
(kctx->enc);
kfree(kctx->mech_used.data);
kfree(kctx);
}
kfree(kctx->mech_used.data);
kfree(kctx);
}