17f675ca7SChuck Lever /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 27f675ca7SChuck Lever /* 37f675ca7SChuck Lever * SunRPC GSS Kerberos 5 mechanism internal definitions 47f675ca7SChuck Lever * 57f675ca7SChuck Lever * Copyright (c) 2022 Oracle and/or its affiliates. 67f675ca7SChuck Lever */ 77f675ca7SChuck Lever 87f675ca7SChuck Lever #ifndef _NET_SUNRPC_AUTH_GSS_KRB5_INTERNAL_H 97f675ca7SChuck Lever #define _NET_SUNRPC_AUTH_GSS_KRB5_INTERNAL_H 107f675ca7SChuck Lever 11*e01b2c79SChuck Lever /* 12*e01b2c79SChuck Lever * GSS Kerberos 5 mechanism Per-Message calls. 13*e01b2c79SChuck Lever */ 14*e01b2c79SChuck Lever 15*e01b2c79SChuck Lever u32 gss_krb5_get_mic_v1(struct krb5_ctx *ctx, struct xdr_buf *text, 16*e01b2c79SChuck Lever struct xdr_netobj *token); 17*e01b2c79SChuck Lever u32 gss_krb5_get_mic_v2(struct krb5_ctx *ctx, struct xdr_buf *text, 18*e01b2c79SChuck Lever struct xdr_netobj *token); 19*e01b2c79SChuck Lever 20*e01b2c79SChuck Lever u32 gss_krb5_verify_mic_v1(struct krb5_ctx *ctx, struct xdr_buf *message_buffer, 21*e01b2c79SChuck Lever struct xdr_netobj *read_token); 22*e01b2c79SChuck Lever u32 gss_krb5_verify_mic_v2(struct krb5_ctx *ctx, struct xdr_buf *message_buffer, 23*e01b2c79SChuck Lever struct xdr_netobj *read_token); 24*e01b2c79SChuck Lever 25*e01b2c79SChuck Lever u32 gss_krb5_wrap_v1(struct krb5_ctx *kctx, int offset, 26*e01b2c79SChuck Lever struct xdr_buf *buf, struct page **pages); 27*e01b2c79SChuck Lever u32 gss_krb5_wrap_v2(struct krb5_ctx *kctx, int offset, 28*e01b2c79SChuck Lever struct xdr_buf *buf, struct page **pages); 29*e01b2c79SChuck Lever 30*e01b2c79SChuck Lever u32 gss_krb5_unwrap_v1(struct krb5_ctx *kctx, int offset, int len, 31*e01b2c79SChuck Lever struct xdr_buf *buf, unsigned int *slack, 32*e01b2c79SChuck Lever unsigned int *align); 33*e01b2c79SChuck Lever u32 gss_krb5_unwrap_v2(struct krb5_ctx *kctx, int offset, int len, 34*e01b2c79SChuck Lever struct xdr_buf *buf, unsigned int *slack, 35*e01b2c79SChuck Lever unsigned int *align); 36*e01b2c79SChuck Lever 37*e01b2c79SChuck Lever /* 38*e01b2c79SChuck Lever * Implementation internal functions 39*e01b2c79SChuck Lever */ 40*e01b2c79SChuck Lever 417f675ca7SChuck Lever void krb5_make_confounder(u8 *p, int conflen); 427f675ca7SChuck Lever 432dbe0cacSChuck Lever u32 gss_krb5_checksum(struct crypto_ahash *tfm, char *header, int hdrlen, 442dbe0cacSChuck Lever const struct xdr_buf *body, int body_offset, 452dbe0cacSChuck Lever struct xdr_netobj *cksumout); 462dbe0cacSChuck Lever 477f675ca7SChuck Lever #endif /* _NET_SUNRPC_AUTH_GSS_KRB5_INTERNAL_H */ 48