hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/include/linux/sunrpc/gss_krb5.h
....@@ -71,10 +71,10 @@
7171 const u32 keyed_cksum; /* is it a keyed cksum? */
7272 const u32 keybytes; /* raw key len, in bytes */
7373 const u32 keylength; /* final key len, in bytes */
74
- u32 (*encrypt) (struct crypto_skcipher *tfm,
74
+ u32 (*encrypt) (struct crypto_sync_skcipher *tfm,
7575 void *iv, void *in, void *out,
7676 int length); /* encryption function */
77
- u32 (*decrypt) (struct crypto_skcipher *tfm,
77
+ u32 (*decrypt) (struct crypto_sync_skcipher *tfm,
7878 void *iv, void *in, void *out,
7979 int length); /* decryption function */
8080 u32 (*mk_key) (const struct gss_krb5_enctype *gk5e,
....@@ -83,7 +83,7 @@
8383 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
8484 struct xdr_buf *buf,
8585 struct page **pages); /* v2 encryption function */
86
- u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset,
86
+ u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, u32 len,
8787 struct xdr_buf *buf, u32 *headskip,
8888 u32 *tailskip); /* v2 decryption function */
8989 };
....@@ -98,17 +98,17 @@
9898 u32 enctype;
9999 u32 flags;
100100 const struct gss_krb5_enctype *gk5e; /* enctype-specific info */
101
- struct crypto_skcipher *enc;
102
- struct crypto_skcipher *seq;
103
- struct crypto_skcipher *acceptor_enc;
104
- struct crypto_skcipher *initiator_enc;
105
- struct crypto_skcipher *acceptor_enc_aux;
106
- struct crypto_skcipher *initiator_enc_aux;
101
+ struct crypto_sync_skcipher *enc;
102
+ struct crypto_sync_skcipher *seq;
103
+ struct crypto_sync_skcipher *acceptor_enc;
104
+ struct crypto_sync_skcipher *initiator_enc;
105
+ struct crypto_sync_skcipher *acceptor_enc_aux;
106
+ struct crypto_sync_skcipher *initiator_enc_aux;
107107 u8 Ksess[GSS_KRB5_MAX_KEYLEN]; /* session key */
108108 u8 cksum[GSS_KRB5_MAX_KEYLEN];
109
- s32 endtime;
110
- u32 seq_send;
111
- u64 seq_send64;
109
+ atomic_t seq_send;
110
+ atomic64_t seq_send64;
111
+ time64_t endtime;
112112 struct xdr_netobj mech_used;
113113 u8 initiator_sign[GSS_KRB5_MAX_KEYLEN];
114114 u8 acceptor_sign[GSS_KRB5_MAX_KEYLEN];
....@@ -117,8 +117,6 @@
117117 u8 initiator_integ[GSS_KRB5_MAX_KEYLEN];
118118 u8 acceptor_integ[GSS_KRB5_MAX_KEYLEN];
119119 };
120
-
121
-extern spinlock_t krb5_seq_lock;
122120
123121 /* The length of the Kerberos GSS token header */
124122 #define GSS_KRB5_TOK_HDR_LEN (16)
....@@ -143,14 +141,12 @@
143141 SGN_ALG_MD2_5 = 0x0001,
144142 SGN_ALG_DES_MAC = 0x0002,
145143 SGN_ALG_3 = 0x0003, /* not published */
146
- SGN_ALG_HMAC_MD5 = 0x0011, /* microsoft w2k; no support */
147144 SGN_ALG_HMAC_SHA1_DES3_KD = 0x0004
148145 };
149146 enum seal_alg {
150147 SEAL_ALG_NONE = 0xffff,
151148 SEAL_ALG_DES = 0x0000,
152149 SEAL_ALG_1 = 0x0001, /* not published */
153
- SEAL_ALG_MICROSOFT_RC4 = 0x0010,/* microsoft w2k; no support */
154150 SEAL_ALG_DES3KD = 0x0002
155151 };
156152
....@@ -257,29 +253,29 @@
257253 struct xdr_buf *outbuf, struct page **pages);
258254
259255 u32
260
-gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset,
256
+gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, int len,
261257 struct xdr_buf *buf);
262258
263259
264260 u32
265
-krb5_encrypt(struct crypto_skcipher *key,
261
+krb5_encrypt(struct crypto_sync_skcipher *key,
266262 void *iv, void *in, void *out, int length);
267263
268264 u32
269
-krb5_decrypt(struct crypto_skcipher *key,
265
+krb5_decrypt(struct crypto_sync_skcipher *key,
270266 void *iv, void *in, void *out, int length);
271267
272268 int
273
-gss_encrypt_xdr_buf(struct crypto_skcipher *tfm, struct xdr_buf *outbuf,
269
+gss_encrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *outbuf,
274270 int offset, struct page **pages);
275271
276272 int
277
-gss_decrypt_xdr_buf(struct crypto_skcipher *tfm, struct xdr_buf *inbuf,
273
+gss_decrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *inbuf,
278274 int offset);
279275
280276 s32
281277 krb5_make_seq_num(struct krb5_ctx *kctx,
282
- struct crypto_skcipher *key,
278
+ struct crypto_sync_skcipher *key,
283279 int direction,
284280 u32 seqnum, unsigned char *cksum, unsigned char *buf);
285281
....@@ -314,18 +310,9 @@
314310 struct page **pages);
315311
316312 u32
317
-gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset,
313
+gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len,
318314 struct xdr_buf *buf, u32 *plainoffset,
319315 u32 *plainlen);
320316
321
-int
322
-krb5_rc4_setup_seq_key(struct krb5_ctx *kctx,
323
- struct crypto_skcipher *cipher,
324
- unsigned char *cksum);
325
-
326
-int
327
-krb5_rc4_setup_enc_key(struct krb5_ctx *kctx,
328
- struct crypto_skcipher *cipher,
329
- s32 seqnum);
330317 void
331318 gss_krb5_make_confounder(char *p, u32 conflen);