diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-24 08:17:59 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-27 07:36:01 -0500 |
commit | 3b5cf20cf439c3e8963c2d2a3f225434d31827e3 (patch) | |
tree | 99e7292bde840c37349fad7d815681b312059b1c /include/linux/sunrpc | |
parent | 2731a944f6512b3a2684ebc1d78e2d59c18b06fc (diff) |
sunrpc: Use skcipher and ahash/shash
This patch replaces uses of blkcipher with skcipher and the long
obsolete hash interface with either shash (for non-SG users) and
ahash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/gss_krb5.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index df02a4188487..7df625d41e35 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -36,7 +36,7 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/crypto.h> | 39 | #include <crypto/skcipher.h> |
40 | #include <linux/sunrpc/auth_gss.h> | 40 | #include <linux/sunrpc/auth_gss.h> |
41 | #include <linux/sunrpc/gss_err.h> | 41 | #include <linux/sunrpc/gss_err.h> |
42 | #include <linux/sunrpc/gss_asn1.h> | 42 | #include <linux/sunrpc/gss_asn1.h> |
@@ -71,10 +71,10 @@ struct gss_krb5_enctype { | |||
71 | const u32 keyed_cksum; /* is it a keyed cksum? */ | 71 | const u32 keyed_cksum; /* is it a keyed cksum? */ |
72 | const u32 keybytes; /* raw key len, in bytes */ | 72 | const u32 keybytes; /* raw key len, in bytes */ |
73 | const u32 keylength; /* final key len, in bytes */ | 73 | const u32 keylength; /* final key len, in bytes */ |
74 | u32 (*encrypt) (struct crypto_blkcipher *tfm, | 74 | u32 (*encrypt) (struct crypto_skcipher *tfm, |
75 | void *iv, void *in, void *out, | 75 | void *iv, void *in, void *out, |
76 | int length); /* encryption function */ | 76 | int length); /* encryption function */ |
77 | u32 (*decrypt) (struct crypto_blkcipher *tfm, | 77 | u32 (*decrypt) (struct crypto_skcipher *tfm, |
78 | void *iv, void *in, void *out, | 78 | void *iv, void *in, void *out, |
79 | int length); /* decryption function */ | 79 | int length); /* decryption function */ |
80 | u32 (*mk_key) (const struct gss_krb5_enctype *gk5e, | 80 | u32 (*mk_key) (const struct gss_krb5_enctype *gk5e, |
@@ -98,12 +98,12 @@ struct krb5_ctx { | |||
98 | u32 enctype; | 98 | u32 enctype; |
99 | u32 flags; | 99 | u32 flags; |
100 | const struct gss_krb5_enctype *gk5e; /* enctype-specific info */ | 100 | const struct gss_krb5_enctype *gk5e; /* enctype-specific info */ |
101 | struct crypto_blkcipher *enc; | 101 | struct crypto_skcipher *enc; |
102 | struct crypto_blkcipher *seq; | 102 | struct crypto_skcipher *seq; |
103 | struct crypto_blkcipher *acceptor_enc; | 103 | struct crypto_skcipher *acceptor_enc; |
104 | struct crypto_blkcipher *initiator_enc; | 104 | struct crypto_skcipher *initiator_enc; |
105 | struct crypto_blkcipher *acceptor_enc_aux; | 105 | struct crypto_skcipher *acceptor_enc_aux; |
106 | struct crypto_blkcipher *initiator_enc_aux; | 106 | struct crypto_skcipher *initiator_enc_aux; |
107 | u8 Ksess[GSS_KRB5_MAX_KEYLEN]; /* session key */ | 107 | u8 Ksess[GSS_KRB5_MAX_KEYLEN]; /* session key */ |
108 | u8 cksum[GSS_KRB5_MAX_KEYLEN]; | 108 | u8 cksum[GSS_KRB5_MAX_KEYLEN]; |
109 | s32 endtime; | 109 | s32 endtime; |
@@ -262,24 +262,24 @@ gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, | |||
262 | 262 | ||
263 | 263 | ||
264 | u32 | 264 | u32 |
265 | krb5_encrypt(struct crypto_blkcipher *key, | 265 | krb5_encrypt(struct crypto_skcipher *key, |
266 | void *iv, void *in, void *out, int length); | 266 | void *iv, void *in, void *out, int length); |
267 | 267 | ||
268 | u32 | 268 | u32 |
269 | krb5_decrypt(struct crypto_blkcipher *key, | 269 | krb5_decrypt(struct crypto_skcipher *key, |
270 | void *iv, void *in, void *out, int length); | 270 | void *iv, void *in, void *out, int length); |
271 | 271 | ||
272 | int | 272 | int |
273 | gss_encrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *outbuf, | 273 | gss_encrypt_xdr_buf(struct crypto_skcipher *tfm, struct xdr_buf *outbuf, |
274 | int offset, struct page **pages); | 274 | int offset, struct page **pages); |
275 | 275 | ||
276 | int | 276 | int |
277 | gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf, | 277 | gss_decrypt_xdr_buf(struct crypto_skcipher *tfm, struct xdr_buf *inbuf, |
278 | int offset); | 278 | int offset); |
279 | 279 | ||
280 | s32 | 280 | s32 |
281 | krb5_make_seq_num(struct krb5_ctx *kctx, | 281 | krb5_make_seq_num(struct krb5_ctx *kctx, |
282 | struct crypto_blkcipher *key, | 282 | struct crypto_skcipher *key, |
283 | int direction, | 283 | int direction, |
284 | u32 seqnum, unsigned char *cksum, unsigned char *buf); | 284 | u32 seqnum, unsigned char *cksum, unsigned char *buf); |
285 | 285 | ||
@@ -320,12 +320,12 @@ gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, | |||
320 | 320 | ||
321 | int | 321 | int |
322 | krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, | 322 | krb5_rc4_setup_seq_key(struct krb5_ctx *kctx, |
323 | struct crypto_blkcipher *cipher, | 323 | struct crypto_skcipher *cipher, |
324 | unsigned char *cksum); | 324 | unsigned char *cksum); |
325 | 325 | ||
326 | int | 326 | int |
327 | krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, | 327 | krb5_rc4_setup_enc_key(struct krb5_ctx *kctx, |
328 | struct crypto_blkcipher *cipher, | 328 | struct crypto_skcipher *cipher, |
329 | s32 seqnum); | 329 | s32 seqnum); |
330 | void | 330 | void |
331 | gss_krb5_make_confounder(char *p, u32 conflen); | 331 | gss_krb5_make_confounder(char *p, u32 conflen); |