003 File Manager
Current Path:
/usr/src/crypto/heimdal/lib/gssapi/mech
usr
/
src
/
crypto
/
heimdal
/
lib
/
gssapi
/
mech
/
📁
..
📄
compat.h
(4.07 KB)
📄
context.c
(3.66 KB)
📄
context.h
(1.66 KB)
📄
cred.h
(2.24 KB)
📄
doxygen.c
(4.18 KB)
📄
gss_accept_sec_context.c
(8.26 KB)
📄
gss_acquire_cred.c
(4.57 KB)
📄
gss_acquire_cred_ext.c
(5.34 KB)
📄
gss_acquire_cred_with_password.c
(3.69 KB)
📄
gss_add_cred.c
(5.45 KB)
📄
gss_add_cred_with_password.c
(4.7 KB)
📄
gss_add_oid_set_member.c
(2.89 KB)
📄
gss_aeap.c
(5.54 KB)
📄
gss_authorize_localname.c
(5.97 KB)
📄
gss_buffer_set.c
(3.48 KB)
📄
gss_canonicalize_name.c
(3.66 KB)
📄
gss_compare_name.c
(2.68 KB)
📄
gss_context_time.c
(1.76 KB)
📄
gss_create_empty_oid_set.c
(1.82 KB)
📄
gss_cred.c
(5.37 KB)
📄
gss_decapsulate_token.c
(2.49 KB)
📄
gss_delete_name_attribute.c
(2.47 KB)
📄
gss_delete_sec_context.c
(2.07 KB)
📄
gss_display_name.c
(2.8 KB)
📄
gss_display_name_ext.c
(2.58 KB)
📄
gss_display_status.c
(6.7 KB)
📄
gss_duplicate_name.c
(3.14 KB)
📄
gss_duplicate_oid.c
(2.37 KB)
📄
gss_encapsulate_token.c
(2.39 KB)
📄
gss_export_name.c
(2.04 KB)
📄
gss_export_name_composite.c
(2.53 KB)
📄
gss_export_sec_context.c
(2.82 KB)
📄
gss_get_mic.c
(1.96 KB)
📄
gss_get_name_attribute.c
(3.04 KB)
📄
gss_import_name.c
(6.92 KB)
📄
gss_import_sec_context.c
(2.68 KB)
📄
gss_indicate_mechs.c
(2.28 KB)
📄
gss_init_sec_context.c
(6.55 KB)
📄
gss_inquire_context.c
(3.14 KB)
📄
gss_inquire_cred.c
(5.18 KB)
📄
gss_inquire_cred_by_mech.c
(2.94 KB)
📄
gss_inquire_cred_by_oid.c
(2.83 KB)
📄
gss_inquire_mechs_for_name.c
(2.68 KB)
📄
gss_inquire_name.c
(2.89 KB)
📄
gss_inquire_names_for_mech.c
(2.55 KB)
📄
gss_inquire_sec_context_by_oid.c
(2.5 KB)
📄
gss_krb5.c
(21.41 KB)
📄
gss_mech_switch.c
(10.37 KB)
📄
gss_mo.c
(17.84 KB)
📄
gss_names.c
(3.09 KB)
📄
gss_oid.c
(14.92 KB)
📄
gss_oid_equal.c
(2.2 KB)
📄
gss_oid_to_str.c
(2.97 KB)
📄
gss_pname_to_uid.c
(5.65 KB)
📄
gss_process_context_token.c
(1.81 KB)
📄
gss_pseudo_random.c
(2.43 KB)
📄
gss_release_buffer.c
(1.67 KB)
📄
gss_release_cred.c
(2.51 KB)
📄
gss_release_name.c
(2.54 KB)
📄
gss_release_oid.c
(2.01 KB)
📄
gss_release_oid_set.c
(1.71 KB)
📄
gss_seal.c
(1.82 KB)
📄
gss_set_cred_option.c
(3.37 KB)
📄
gss_set_name_attribute.c
(2.61 KB)
📄
gss_set_sec_context_option.c
(2.36 KB)
📄
gss_sign.c
(1.71 KB)
📄
gss_store_cred.c
(3.12 KB)
📄
gss_test_oid_set_member.c
(1.77 KB)
📄
gss_unseal.c
(1.8 KB)
📄
gss_unwrap.c
(1.91 KB)
📄
gss_utils.c
(2.39 KB)
📄
gss_verify.c
(1.75 KB)
📄
gss_verify_mic.c
(1.98 KB)
📄
gss_wrap.c
(2.68 KB)
📄
gss_wrap_size_limit.c
(2 KB)
📄
gssapi.asn1
(199 B)
📄
mech.5
(3.19 KB)
📄
mech.cat5
(2.34 KB)
📄
mech_locl.h
(2.36 KB)
📄
mech_switch.h
(1.79 KB)
📄
mechqueue.h
(3.41 KB)
📄
name.h
(2.05 KB)
📄
utils.h
(1.62 KB)
Editing: gss_aeap.c
/* * AEAD support */ #include "mech_locl.h" /** * Encrypts or sign the data. * * This is a more complicated version of gss_wrap(), it allows the * caller to use AEAD data (signed header/trailer) and allow greater * controll over where the encrypted data is placed. * * The maximum packet size is gss_context_stream_sizes.max_msg_size. * * The caller needs provide the folloing buffers when using in conf_req_flag=1 mode: * * - HEADER (of size gss_context_stream_sizes.header) * { DATA or SIGN_ONLY } (optional, zero or more) * PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) * TRAILER (of size gss_context_stream_sizes.trailer) * * - on DCE-RPC mode, the caller can skip PADDING and TRAILER if the * DATA elements is padded to a block bountry and header is of at * least size gss_context_stream_sizes.header + gss_context_stream_sizes.trailer. * * HEADER, PADDING, TRAILER will be shrunken to the size required to transmit any of them too large. * * To generate gss_wrap() compatible packets, use: HEADER | DATA | PADDING | TRAILER * * When used in conf_req_flag=0, * * - HEADER (of size gss_context_stream_sizes.header) * { DATA or SIGN_ONLY } (optional, zero or more) * PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) * TRAILER (of size gss_context_stream_sizes.trailer) * * * The input sizes of HEADER, PADDING and TRAILER can be fetched using gss_wrap_iov_length() or * gss_context_query_attributes(). * * @ingroup gssapi */ GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int * conf_state, gss_iov_buffer_desc *iov, int iov_count) { struct _gss_context *ctx = (struct _gss_context *) context_handle; gssapi_mech_interface m; if (minor_status) *minor_status = 0; if (conf_state) *conf_state = 0; if (ctx == NULL) return GSS_S_NO_CONTEXT; if (iov == NULL && iov_count != 0) return GSS_S_CALL_INACCESSIBLE_READ; m = ctx->gc_mech; if (m->gm_wrap_iov == NULL) return GSS_S_UNAVAILABLE; return (m->gm_wrap_iov)(minor_status, ctx->gc_ctx, conf_req_flag, qop_req, conf_state, iov, iov_count); } /** * Decrypt or verifies the signature on the data. * * * @ingroup gssapi */ GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, gss_qop_t *qop_state, gss_iov_buffer_desc *iov, int iov_count) { struct _gss_context *ctx = (struct _gss_context *) context_handle; gssapi_mech_interface m; if (minor_status) *minor_status = 0; if (conf_state) *conf_state = 0; if (qop_state) *qop_state = 0; if (ctx == NULL) return GSS_S_NO_CONTEXT; if (iov == NULL && iov_count != 0) return GSS_S_CALL_INACCESSIBLE_READ; m = ctx->gc_mech; if (m->gm_unwrap_iov == NULL) return GSS_S_UNAVAILABLE; return (m->gm_unwrap_iov)(minor_status, ctx->gc_ctx, conf_state, qop_state, iov, iov_count); } /** * Update the length fields in iov buffer for the types: * - GSS_IOV_BUFFER_TYPE_HEADER * - GSS_IOV_BUFFER_TYPE_PADDING * - GSS_IOV_BUFFER_TYPE_TRAILER * * Consider using gss_context_query_attributes() to fetch the data instead. * * @ingroup gssapi */ GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov_length(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count) { struct _gss_context *ctx = (struct _gss_context *) context_handle; gssapi_mech_interface m; if (minor_status) *minor_status = 0; if (conf_state) *conf_state = 0; if (ctx == NULL) return GSS_S_NO_CONTEXT; if (iov == NULL && iov_count != 0) return GSS_S_CALL_INACCESSIBLE_READ; m = ctx->gc_mech; if (m->gm_wrap_iov_length == NULL) return GSS_S_UNAVAILABLE; return (m->gm_wrap_iov_length)(minor_status, ctx->gc_ctx, conf_req_flag, qop_req, conf_state, iov, iov_count); } /** * Free all buffer allocated by gss_wrap_iov() or gss_unwrap_iov() by * looking at the GSS_IOV_BUFFER_FLAG_ALLOCATED flag. * * @ingroup gssapi */ GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_iov_buffer(OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count) { OM_uint32 junk; int i; if (minor_status) *minor_status = 0; if (iov == NULL && iov_count != 0) return GSS_S_CALL_INACCESSIBLE_READ; for (i = 0; i < iov_count; i++) { if ((iov[i].type & GSS_IOV_BUFFER_FLAG_ALLOCATED) == 0) continue; gss_release_buffer(&junk, &iov[i].buffer); iov[i].type &= ~GSS_IOV_BUFFER_FLAG_ALLOCATED; } return GSS_S_COMPLETE; } /** * Query the context for parameters. * * SSPI equivalent if this function is QueryContextAttributes. * * - GSS_C_ATTR_STREAM_SIZES data is a gss_context_stream_sizes. * * @ingroup gssapi */ gss_OID_desc GSSAPI_LIB_FUNCTION __gss_c_attr_stream_sizes_oid_desc = {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03")}; GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_query_attributes(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_OID attribute, void *data, size_t len) { if (minor_status) *minor_status = 0; if (gss_oid_equal(GSS_C_ATTR_STREAM_SIZES, attribute)) { memset(data, 0, len); return GSS_S_COMPLETE; } return GSS_S_FAILURE; }
Upload File
Create Folder