Home
last modified time | relevance | path

Searched refs:mech (Results 1 – 25 of 187) sorted by relevance

12345678

/titanic_41/usr/src/lib/libgss/
H A Dg_glue.c310 gss_mechanism mech; local
312 mech = gssint_get_mechanism (mech_type);
313 if (mech) {
314 if (mech->gss_import_name) {
315 status = mech->gss_import_name (
316 mech->context, /* SUNW17PACresync */
322 map_error(minor_status, mech);
340 gss_mechanism mech; local
350 mech = gssint_get_mechanism(mech_type);
351 if (!mech)
[all …]
H A Dg_inquire_context.c81 gss_mechanism mech; in gss_inquire_context() local
99 mech = __gss_get_mechanism(ctx->mech_type); in gss_inquire_context()
101 if (!mech || !mech->gss_inquire_context || !mech->gss_display_name || in gss_inquire_context()
102 !mech->gss_release_name) { in gss_inquire_context()
106 status = mech->gss_inquire_context( in gss_inquire_context()
107 mech->context, in gss_inquire_context()
119 map_error(minor_status, mech); in gss_inquire_context()
125 status = __gss_convert_name_to_union_name(minor_status, mech, in gss_inquire_context()
129 mech->gss_release_name(mech->context, in gss_inquire_context()
136 status = __gss_convert_name_to_union_name(minor_status, mech, in gss_inquire_context()
[all …]
H A Dg_seal.c88 gss_mechanism mech; local
103 mech = __gss_get_mechanism(ctx->mech_type);
105 if (mech) {
106 if (mech->gss_seal) {
107 status = mech->gss_seal(
108 mech->context,
117 map_error(minor_status, mech);
165 gss_mechanism mech; local
184 mech = __gss_get_mechanism(ctx->mech_type);
186 if (!mech)
[all …]
H A Dg_inquire_cred.c54 gss_mechanism mech; local
82 if ((mech = __gss_get_mechanism(GSS_C_NULL_OID)) == NULL)
85 if (!mech->gss_inquire_cred)
88 status = mech->gss_inquire_cred(mech->context, minor_status,
95 map_error(minor_status, mech);
104 &temp_minor_status, mech,
108 map_error(minor_status, mech);
227 gss_mechanism mech; local
240 mech = __gss_get_mechanism(mech_type);
241 if (!mech)
[all …]
H A Dg_compare_name.c75 gss_mechanism mech = NULL; local
99 mech = __gss_get_mechanism(union_name1->mech_type);
100 if (!mech)
102 if (!mech->gss_compare_name)
119 if (!mech)
121 if (!mech->gss_compare_name)
123 major_status = mech->gss_compare_name(mech->context,
129 map_error(minor_status, mech);
200 if (!mech)
202 if (!mech->gss_compare_name)
[all …]
H A Dg_utils.c148 qop_num_pairs[qop_num_pair_cnt].mech = strdup(name); in __gss_read_qop_file()
149 if (qop_num_pairs[qop_num_pair_cnt].mech == NULL) { in __gss_read_qop_file()
166 char *mech, in __gss_qop_to_num() argument
186 if ((strcasecmp(mech, qop_num_pairs[i].mech) == 0) && in __gss_qop_to_num()
198 char *mech, in __gss_num_to_qop() argument
215 if (mech == NULL) in __gss_num_to_qop()
222 if ((strcasecmp(mech, qop_num_pairs[i].mech) == 0) && in __gss_num_to_qop()
237 char *mech, in __gss_get_mech_info() argument
248 if (!mech) in __gss_get_mech_info()
255 if (strcmp(mech, qop_num_pairs[i].mech) == 0) { in __gss_get_mech_info()
[all …]
H A Dg_store_cred.c100 gss_mechanism mech; local
125 mech = __gss_get_mechanism(desired_mech);
126 if (mech == NULL)
129 if (mech->gss_store_cred == NULL)
136 major_status = mech->gss_store_cred(mech->context,
146 map_error(minor_status, mech);
157 mech = __gss_get_mechanism(dmech);
158 if (mech == NULL)
161 if (mech->gss_store_cred == NULL)
168 major_status = mech->gss_store_cred(mech->context,
[all …]
H A Dg_context_time.c43 gss_mechanism mech; local
61 mech = __gss_get_mechanism(ctx->mech_type);
63 if (mech) {
65 if (mech->gss_context_time) {
66 status = mech->gss_context_time(
67 mech->context,
72 map_error(minor_status, mech);
H A Dg_process_context.c44 gss_mechanism mech; local
65 mech = __gss_get_mechanism(ctx->mech_type);
67 if (mech) {
69 if (mech->gss_process_context_token) {
70 status = mech->gss_process_context_token(
71 mech->context,
76 map_error(minor_status, mech);
H A Dg_acquire_cred.c152 gss_mechanism mech; local
177 mech = __gss_get_mechanism(NULL);
178 if (mech == NULL)
184 default_OID.length = mech->mech_type.length;
185 default_OID.elements = mech->mech_type.elements;
335 gss_mechanism mech; local
358 mech = __gss_get_mechanism(desired_mech);
359 if (!mech)
361 else if (!mech->gss_acquire_cred)
391 &mech->mech_type,
[all …]
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/mech/
H A Dutil_errmap.c50 gss_OID_desc mech; member
72 if (m1.mech.length < m2.mech.length) in mecherror_cmp()
74 if (m1.mech.length > m2.mech.length) in mecherror_cmp()
76 if (m1.mech.length == 0) in mecherror_cmp()
78 return memcmp(m1.mech.elements, m2.mech.elements, m1.mech.length); in mecherror_cmp()
91 dest->mech.elements = malloc(src.mech.length); in mecherror_copy()
92 if (dest->mech.elements == NULL) { in mecherror_copy()
93 if (src.mech.length) in mecherror_copy()
98 memcpy(dest->mech.elements, src.mech.elements, src.mech.length); in mecherror_copy()
119 if (value.mech.length == 0) { in mecherror_print()
[all …]
/titanic_41/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Dencr_mgr.c34 CK_MECHANISM * mech, in encr_mgr_init() argument
45 if (! sess || ! ctx || ! mech) { in encr_mgr_init()
88 switch (mech->mechanism) { in encr_mgr_init()
91 if (mech->ulParameterLen != 0) { in encr_mgr_init()
114 if (mech->ulParameterLen > 0) { in encr_mgr_init()
115 ptr = (CK_BYTE *)malloc(mech->ulParameterLen); in encr_mgr_init()
119 (void) memcpy(ptr, mech->pParameter, mech->ulParameterLen); in encr_mgr_init()
123 ctx->mech.ulParameterLen = mech->ulParameterLen; in encr_mgr_init()
124 ctx->mech.mechanism = mech->mechanism; in encr_mgr_init()
125 ctx->mech.pParameter = ptr; in encr_mgr_init()
[all …]
H A Ddecr_mgr.c36 CK_MECHANISM *mech, in decr_mgr_init() argument
88 switch (mech->mechanism) { in decr_mgr_init()
91 if (mech->ulParameterLen != 0) in decr_mgr_init()
115 if (mech->ulParameterLen > 0) { in decr_mgr_init()
116 ptr = (CK_BYTE *)malloc(mech->ulParameterLen); in decr_mgr_init()
120 (void) memcpy(ptr, mech->pParameter, mech->ulParameterLen); in decr_mgr_init()
124 ctx->mech.ulParameterLen = mech->ulParameterLen; in decr_mgr_init()
125 ctx->mech.mechanism = mech->mechanism; in decr_mgr_init()
126 ctx->mech.pParameter = ptr; in decr_mgr_init()
140 ctx->mech.ulParameterLen = 0; in decr_mgr_cleanup()
[all …]
H A Dsign_mgr.c33 CK_MECHANISM * mech, in sign_mgr_init() argument
66 switch (mech->mechanism) { in sign_mgr_init()
139 if (mech->ulParameterLen != 0) { in sign_mgr_init()
164 (CK_MAC_GENERAL_PARAMS *)mech->pParameter; in sign_mgr_init()
166 if (mech->ulParameterLen != in sign_mgr_init()
171 if ((mech->mechanism == CKM_MD5_HMAC_GENERAL) && in sign_mgr_init()
175 if ((mech->mechanism == CKM_SHA_1_HMAC_GENERAL) && in sign_mgr_init()
200 if (mech->ulParameterLen > 0 && mech->pParameter == NULL) in sign_mgr_init()
203 if (mech->ulParameterLen > 0) { in sign_mgr_init()
204 ptr = (CK_BYTE *)malloc(mech->ulParameterLen); in sign_mgr_init()
[all …]
H A Dsess_mgr.c580 if (sess->encr_ctx.mech.pParameter) in session_mgr_close_session()
581 free(sess->encr_ctx.mech.pParameter); in session_mgr_close_session()
586 if (sess->decr_ctx.mech.pParameter) in session_mgr_close_session()
587 free(sess->decr_ctx.mech.pParameter); in session_mgr_close_session()
592 if (sess->digest_ctx.mech.pParameter) in session_mgr_close_session()
593 free(sess->digest_ctx.mech.pParameter); in session_mgr_close_session()
598 if (sess->sign_ctx.mech.pParameter) in session_mgr_close_session()
599 free(sess->sign_ctx.mech.pParameter); in session_mgr_close_session()
604 if (sess->verify_ctx.mech.pParameter) in session_mgr_close_session()
605 free(sess->verify_ctx.mech.pParameter); in session_mgr_close_session()
[all …]
H A Dverify_mgr.c33 CK_MECHANISM * mech, in verify_mgr_init() argument
70 switch (mech->mechanism) { in verify_mgr_init()
161 (CK_MAC_GENERAL_PARAMS *)mech->pParameter; in verify_mgr_init()
163 if (mech->ulParameterLen != in verify_mgr_init()
167 if ((mech->mechanism == CKM_MD5_HMAC_GENERAL) && in verify_mgr_init()
171 if ((mech->mechanism == CKM_SHA_1_HMAC_GENERAL) && in verify_mgr_init()
197 ctx->mech.ulParameterLen = mech->ulParameterLen; in verify_mgr_init()
198 ctx->mech.mechanism = mech->mechanism; in verify_mgr_init()
199 ctx->mech.pParameter = mech->pParameter; in verify_mgr_init()
214 ctx->mech.ulParameterLen = 0; in verify_mgr_cleanup()
[all …]
H A Ddig_mgr.c302 CK_MECHANISM *mech) in digest_mgr_init() argument
311 switch (mech->mechanism) { in digest_mgr_init()
339 ctx->mech.ulParameterLen = mech->ulParameterLen; in digest_mgr_init()
340 ctx->mech.mechanism = mech->mechanism; in digest_mgr_init()
341 ctx->mech.pParameter = mech->pParameter; in digest_mgr_init()
354 if (ctx->mech.mechanism == CKM_MD5) { in digest_mgr_cleanup()
357 } else if (ctx->mech.mechanism == CKM_SHA_1) { in digest_mgr_cleanup()
361 ctx->mech.ulParameterLen = 0; in digest_mgr_cleanup()
362 ctx->mech.pParameter = NULL; in digest_mgr_cleanup()
363 ctx->mech.mechanism = 0; in digest_mgr_cleanup()
[all …]
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/mech/
H A Dutil_token.c149 unsigned int g_token_size(mech, body_size) in g_token_size() argument
150 const gss_OID_desc * mech; in g_token_size()
154 body_size += 4 + (int) mech->length; /* NEED overflow check */
161 void g_make_token_header(mech, body_size, buf, tok_type) in g_make_token_header() argument
162 const gss_OID_desc * mech; in g_make_token_header()
169 (tok_type == -1) ? 2 : (int) (4 + mech->length + body_size));
171 *(*buf)++ = (unsigned char) mech->length;
172 TWRITE_STR(*buf, mech->elements, mech->length);
188 gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize_in, in g_verify_token_header() argument
190 const gss_OID_desc * mech; in g_verify_token_header()
[all …]
/titanic_41/usr/src/uts/common/crypto/api/
H A Dkcf_keys.c41 crypto_mechanism_t *mech, crypto_object_attribute_t *attrs, uint_t count, in crypto_key_generate() argument
52 rv = kcf_get_hardware_provider(mech->cm_type, NULL, in crypto_key_generate()
62 mech, attrs, count, handle, KCF_SWFP_RHNDL(crq)); in crypto_key_generate()
66 mech, attrs, count, handle, NULL, 0, NULL, NULL, NULL, 0); in crypto_key_generate()
78 crypto_mechanism_t *mech, crypto_object_attribute_t *pub_attrs, in crypto_key_generate_pair() argument
91 rv = kcf_get_hardware_provider(mech->cm_type, NULL, in crypto_key_generate_pair()
100 rv = KCF_PROV_KEY_GENERATE_PAIR(real_provider, sid, mech, in crypto_key_generate_pair()
106 sid, mech, pub_attrs, pub_count, pub_handle, pri_attrs, in crypto_key_generate_pair()
119 crypto_mechanism_t *mech, crypto_key_t *wrapping_key, in crypto_key_wrap() argument
131 rv = kcf_get_hardware_provider(mech->cm_type, wrapping_key, in crypto_key_wrap()
[all …]
H A Dkcf_cipher.c106 crypto_mechanism_t *mech, crypto_key_t *key, in crypto_cipher_init_prov() argument
120 error = kcf_get_hardware_provider(mech->cm_type, key, in crypto_cipher_init_prov()
124 error = kcf_get_hardware_provider(mech->cm_type, key, in crypto_cipher_init_prov()
144 lmech = *mech; in crypto_cipher_init_prov()
145 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, real_provider, &lmech); in crypto_cipher_init_prov()
164 KCF_CAN_SHARE_OPSTATE(pd, mech->cm_type)) { in crypto_cipher_init_prov()
169 if ((kcf_get_sw_prov(mech->cm_type, &tpd, &tctxp->kc_mech, in crypto_cipher_init_prov()
173 sinfo = &(KCF_TO_PROV_MECHINFO(tpd, mech->cm_type)); in crypto_cipher_init_prov()
199 mech, key, NULL, NULL, tmpl); in crypto_cipher_init_prov()
203 mech, key, NULL, NULL, tmpl); in crypto_cipher_init_prov()
[all …]
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/crypto/hash_provider/
H A Dhash_kef_generic.c24 crypto_mechanism_t mech; in k5_ef_hash() local
40 mech.cm_type = context->kef_cksum_mt; in k5_ef_hash()
41 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_hash()
47 mech.cm_param = 0; in k5_ef_hash()
48 mech.cm_param_len = 0; in k5_ef_hash()
50 rv = crypto_digest_init(&mech, &ctxp, NULL); in k5_ef_hash()
97 crypto_mechanism_t mech; in k5_ef_mac() local
116 mech.cm_type = context->kef_hash_mt; in k5_ef_mac()
117 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_mac()
124 mech.cm_param = ivec->data; in k5_ef_mac()
[all …]
/titanic_41/usr/src/lib/gss_mechs/mech_dh/dh_common/
H A Ddh_common.c95 gss_mechanism (*mech_init)(gss_mechanism mech); in __dh_generic_initialize()
96 gss_mechanism mech; in __dh_generic_initialize() local
116 if ((mech = mech_init(dhmech)) == NULL) { in __dh_generic_initialize()
121 mech->mech_type = mech_type; in __dh_generic_initialize()
124 context = (dh_context_t)mech->context; in __dh_generic_initialize()
130 context->mech = &mech->mech_type; in __dh_generic_initialize()
132 return (mech); in __dh_generic_initialize()
/titanic_41/usr/src/lib/gss_mechs/mech_dh/backend/mech/
H A Ddhmech.c82 __dh_gss_initialize(gss_mechanism mech) in __dh_gss_initialize() argument
84 if (mech->context != NULL) in __dh_gss_initialize()
85 return (mech); /* already initialized */ in __dh_gss_initialize()
88 *mech = dh_mechanism; in __dh_gss_initialize()
91 mech->context = New(dh_context_desc, 1); in __dh_gss_initialize()
92 if (mech->context == NULL) in __dh_gss_initialize()
96 return (mech); in __dh_gss_initialize()
/titanic_41/usr/src/uts/common/gssapi/mechs/krb5/crypto/des/
H A Def_crypto.c22 crypto_mechanism_t mech; in k5_ef_crypto() local
45 mech.cm_type = key->kef_mt; in k5_ef_crypto()
46 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_crypto()
54 mech.cm_param_len = ivec->length; in k5_ef_crypto()
55 mech.cm_param = (char *)ivec->data; in k5_ef_crypto()
57 mech.cm_param_len = 0; in k5_ef_crypto()
58 mech.cm_param = NULL; in k5_ef_crypto()
62 rv = crypto_encrypt(&mech, &d1, in k5_ef_crypto()
68 rv = crypto_decrypt(&mech, &d1, in k5_ef_crypto()
/titanic_41/usr/src/uts/common/gssapi/mechs/dummy/
H A Ddmech.c71 static int g_token_size(gss_OID mech, unsigned int body_size);
72 static void g_make_token_header(gss_OID mech, int body_size,
74 static int g_verify_token_header(gss_OID mech, int *body_size,
143 gss_mechanism mech, tmp; in _init() local
145 mech = gss_mech_initialize(); in _init()
148 tmp = __kgss_get_mechanism(&mech->mech_type); in _init()
162 __kgss_add_mechanism(mech); in _init()
163 ASSERT(__kgss_get_mechanism(&mech->mech_type) == mech); in _init()
484 g_token_size(mech, body_size) in g_token_size() argument
485 gss_OID mech; in g_token_size()
[all …]

12345678