Home
last modified time | relevance | path

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

12345678

/illumos-gate/usr/src/lib/libgss/
H A Dg_glue.c310 gss_mechanism mech; local
313 if (mech) {
340 gss_mechanism mech; local
351 if (!mech)
393 mech->context,
464 gss_mechanism mech; local
467 if (mech) {
470 mech->context,
495 if (mech) {
498 mech->context,
[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
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
186 if (!mech)
189 if (mech->gss_wrap_size_limit)
190 major_status = mech->gss_wrap_size_limit(mech->context,
[all …]
H A Dg_inquire_cred.c54 gss_mechanism mech; local
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
241 if (!mech)
252 status = mech->gss_inquire_cred_by_mech(mech->context,
260 map_error(minor_status, mech);
[all …]
H A Dg_compare_name.c75 gss_mechanism mech = NULL; local
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)
204 major_status = mech->gss_compare_name(mech->context, minor_status,
[all …]
H A Dg_utils.c164 char *mech, in __gss_qop_to_num() argument
184 if ((strcasecmp(mech, qop_num_pairs[i].mech) == 0) && in __gss_qop_to_num()
196 char *mech, in __gss_num_to_qop() argument
213 if (mech == NULL) in __gss_num_to_qop()
220 if ((strcasecmp(mech, qop_num_pairs[i].mech) == 0) && in __gss_num_to_qop()
235 char *mech, in __gss_get_mech_info() argument
246 if (!mech) in __gss_get_mech_info()
253 if (strcmp(mech, qop_num_pairs[i].mech) == 0) { in __gss_get_mech_info()
270 char *mech, in __gss_mech_qops() argument
283 if (!mech) in __gss_mech_qops()
[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 …]
/illumos-gate/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()
93 if (src.mech.length) in mecherror_copy()
98 memcpy(dest->mech.elements, src.mech.elements, src.mech.length); in mecherror_copy()
167 if (value.mech.length && value.mech.elements) in free_one()
195 me.mech = *oid; in gssint_mecherrmap_map()
[all …]
/illumos-gate/usr/src/lib/smbsrv/libfksmbsrv/common/
H A Dfksmb_sign_pkcs.c48 mech->mechanism = mid; in find_mech()
49 mech->pParameter = NULL; in find_mech()
50 mech->ulParameterLen = 0; in find_mech()
63 smb_md5_getmech(smb_crypto_mech_t *mech) in smb_md5_getmech() argument
65 return (find_mech(mech, CKM_MD5)); in smb_md5_getmech()
80 rv = C_DigestInit(*ctxp, mech); in smb_md5_init()
148 rv = C_SignInit(*ctxp, mech, hkey); in smb2_hmac_init()
194 smb2_hmac_one(smb_crypto_mech_t *mech, in smb2_hmac_one() argument
216 rv = C_SignInit(hssn, mech, hkey); in smb2_hmac_one()
254 return (find_mech(mech, CKM_AES_CMAC)); in smb3_cmac_getmech()
[all …]
H A Dfksmb_preauth_pkcs.c40 mech->mechanism = mid; in getmech_sha512()
41 mech->pParameter = NULL; in getmech_sha512()
42 mech->ulParameterLen = 0; in getmech_sha512()
52 smb_crypto_mech_t *mech; in smb31_preauth_init_mech() local
60 mech = kmem_zalloc(sizeof (*mech), KM_SLEEP); in smb31_preauth_init_mech()
61 rc = getmech_sha512(mech); in smb31_preauth_init_mech()
63 kmem_free(mech, sizeof (*mech)); in smb31_preauth_init_mech()
66 s->preauth_mech = mech; in smb31_preauth_init_mech()
72 smb_crypto_mech_t *mech; in smb31_preauth_fini() local
75 kmem_free(mech, sizeof (*mech)); in smb31_preauth_fini()
[all …]
H A Dfksmb_encrypt_pkcs.c62 smb3_aes_ccm_getmech(smb_crypto_mech_t *mech) in smb3_aes_ccm_getmech() argument
70 mech->mechanism = CKM_AES_CCM; in smb3_aes_ccm_getmech()
75 smb3_aes_gcm_getmech(smb_crypto_mech_t *mech) in smb3_aes_gcm_getmech() argument
83 mech->mechanism = CKM_AES_GCM; in smb3_aes_gcm_getmech()
104 ctx->mech.pParameter = (caddr_t)&ctx->param.ccm; in smb3_crypto_init_ccm_param()
105 ctx->mech.ulParameterLen = sizeof (ctx->param.ccm); in smb3_crypto_init_ccm_param()
123 ctx->mech.pParameter = (caddr_t)&ctx->param.gcm; in smb3_crypto_init_gcm_param()
138 CK_MECHANISM *mech = &ctxp->mech; in smb3_encrypt_init() local
150 rv = C_EncryptInit(ctxp->ctx, mech, hkey); in smb3_encrypt_init()
170 CK_MECHANISM *mech = &ctxp->mech; in smb3_decrypt_init() local
[all …]
/illumos-gate/usr/src/lib/smbclnt/libfknsmb/common/
H A Dfksmb_sign_pkcs.c48 mech->mechanism = mid; in find_mech()
49 mech->pParameter = NULL; in find_mech()
50 mech->ulParameterLen = 0; in find_mech()
63 smb_md5_getmech(smb_sign_mech_t *mech) in smb_md5_getmech() argument
65 return (find_mech(mech, CKM_MD5)); in smb_md5_getmech()
80 rv = C_DigestInit(*ctxp, mech); in smb_md5_init()
124 smb2_hmac_getmech(smb_sign_mech_t *mech) in smb2_hmac_getmech() argument
148 rv = C_SignInit(*ctxp, mech, hkey); in smb2_hmac_init()
198 smb3_cmac_getmech(smb_sign_mech_t *mech) in smb3_cmac_getmech() argument
200 return (find_mech(mech, CKM_AES_CMAC)); in smb3_cmac_getmech()
[all …]
/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/
H A Dencr_mgr.c34 CK_MECHANISM * mech, in encr_mgr_init() argument
88 switch (mech->mechanism) { 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()
139 ctx->mech.ulParameterLen = 0; in encr_mgr_cleanup()
140 ctx->mech.mechanism = 0; in encr_mgr_cleanup()
145 if (ctx->mech.pParameter) { in encr_mgr_cleanup()
146 free(ctx->mech.pParameter); in encr_mgr_cleanup()
[all …]
H A Ddecr_mgr.c36 CK_MECHANISM *mech, in decr_mgr_init() argument
88 switch (mech->mechanism) { 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()
141 ctx->mech.mechanism = 0; in decr_mgr_cleanup()
146 if (ctx->mech.pParameter) { in decr_mgr_cleanup()
147 free(ctx->mech.pParameter); 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()
166 if (mech->ulParameterLen != in sign_mgr_init()
200 if (mech->ulParameterLen > 0 && mech->pParameter == NULL) in sign_mgr_init()
208 (void) memcpy(ptr, mech->pParameter, mech->ulParameterLen); in sign_mgr_init()
212 ctx->mech.ulParameterLen = mech->ulParameterLen; in sign_mgr_init()
213 ctx->mech.mechanism = mech->mechanism; in sign_mgr_init()
214 ctx->mech.pParameter = ptr; in sign_mgr_init()
230 ctx->mech.mechanism = 0; in sign_mgr_cleanup()
236 if (ctx->mech.pParameter) { in sign_mgr_cleanup()
[all …]
H A Dsess_mgr.c815 sess->encr_ctx.mech.pParameter, in session_mgr_get_op_state()
856 sess->decr_ctx.mech.pParameter, in session_mgr_get_op_state()
1040 if (ctx->mech.ulParameterLen) { in session_mgr_set_op_state()
1042 ctx->mech.ulParameterLen); in session_mgr_set_op_state()
1049 ctx->mech.ulParameterLen); in session_mgr_set_op_state()
1083 if (ctx->mech.ulParameterLen) { in session_mgr_set_op_state()
1085 ctx->mech.ulParameterLen); in session_mgr_set_op_state()
1092 ctx->mech.ulParameterLen); in session_mgr_set_op_state()
1125 if (ctx->mech.ulParameterLen) { in session_mgr_set_op_state()
1127 ctx->mech.ulParameterLen); in session_mgr_set_op_state()
[all …]
H A Dverify_mgr.c33 CK_MECHANISM * mech, in verify_mgr_init() argument
70 switch (mech->mechanism) { in verify_mgr_init()
163 if (mech->ulParameterLen != 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()
215 ctx->mech.mechanism = 0; in verify_mgr_cleanup()
220 ctx->mech.pParameter = NULL; in verify_mgr_cleanup()
255 switch (ctx->mech.mechanism) { in verify_mgr_verify()
[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()
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()
395 switch (ctx->mech.mechanism) { in digest_mgr_digest()
428 switch (ctx->mech.mechanism) { in digest_mgr_digest_update()
[all …]
/illumos-gate/usr/src/uts/common/fs/smbsrv/
H A Dsmb31_preauth.c35 smb3_sha512_getmech(smb_crypto_mech_t *mech) in smb3_sha512_getmech() argument
44 mech->cm_type = t; in smb3_sha512_getmech()
54 smb_crypto_mech_t *mech; in smb31_preauth_init_mech() local
62 mech = kmem_zalloc(sizeof (*mech), KM_SLEEP); in smb31_preauth_init_mech()
63 rc = smb3_sha512_getmech(mech); in smb31_preauth_init_mech()
65 kmem_free(mech, sizeof (*mech)); in smb31_preauth_init_mech()
68 s->preauth_mech = mech; in smb31_preauth_init_mech()
74 smb_crypto_mech_t *mech; in smb31_preauth_fini() local
76 if ((mech = s->preauth_mech) != NULL) { in smb31_preauth_fini()
77 kmem_free(mech, sizeof (*mech)); in smb31_preauth_fini()
[all …]
H A Dsmb_sign_kcf.c36 find_mech(smb_crypto_mech_t *mech, const char *name) in find_mech() argument
45 mech->cm_type = t; in find_mech()
55 smb_md5_getmech(smb_crypto_mech_t *mech) in smb_md5_getmech() argument
57 return (find_mech(mech, SUN_CKM_MD5)); in smb_md5_getmech()
68 rv = crypto_digest_init(mech, ctxp, NULL); in smb_md5_init()
124 smb2_hmac_getmech(smb_crypto_mech_t *mech) in smb2_hmac_getmech() argument
126 return (find_mech(mech, SUN_CKM_SHA256_HMAC)); in smb2_hmac_getmech()
144 rv = crypto_mac_init(mech, &ckey, NULL, ctxp, NULL); in smb2_hmac_init()
203 smb2_hmac_one(smb_crypto_mech_t *mech, in smb2_hmac_one() argument
241 smb3_cmac_getmech(smb_crypto_mech_t *mech) in smb3_cmac_getmech() argument
[all …]
/illumos-gate/usr/src/test/crypto-tests/tests/common/
H A Dcryptotest_pkcs.c133 op->mech); in get_hsession_by_mech()
145 CK_MECHANISM mech; in sign_init() local
148 mech.mechanism = op->mech; in sign_init()
232 CK_MECHANISM mech; in verify_init() local
235 mech.mechanism = op->mech; in verify_init()
292 CK_MECHANISM mech; in encrypt_init() local
295 mech.mechanism = op->mech; in encrypt_init()
356 CK_MECHANISM mech; in decrypt_init() local
359 mech.mechanism = op->mech; in decrypt_init()
420 CK_MECHANISM mech; in digest_init() local
[all …]
/illumos-gate/usr/src/uts/common/crypto/api/
H A Dkcf_keys.c52 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()
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()
158 crypto_mechanism_t *mech, crypto_key_t *unwrapping_key, in crypto_key_unwrap() argument
180 rv = KCF_PROV_KEY_UNWRAP(real_provider, sid, mech, in crypto_key_unwrap()
199 crypto_mechanism_t *mech, crypto_key_t *base_key, in crypto_key_derive() argument
[all …]
H A Dkcf_cipher.c106 crypto_mechanism_t *mech, crypto_key_t *key, in crypto_cipher_init_prov() argument
144 lmech = *mech; in crypto_cipher_init_prov()
164 KCF_CAN_SHARE_OPSTATE(pd, mech->cm_type)) { 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()
398 lmech = *mech; in crypto_encrypt()
431 crypto_mechanism_t *mech, crypto_key_t *key, in crypto_encrypt_init_prov() argument
612 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_decrypt_prov()
680 lmech = *mech; in crypto_decrypt()
[all …]
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/mech/
H A Dutil_token.c147 unsigned int g_token_size(mech, body_size) in g_token_size() argument
148 const gss_OID_desc * mech; in g_token_size()
152 body_size += 4 + (int) mech->length; /* NEED overflow check */
159 void g_make_token_header(mech, body_size, buf, tok_type) in g_make_token_header() argument
160 const gss_OID_desc * mech; in g_make_token_header()
167 (tok_type == -1) ? 2 : (int) (4 + mech->length + body_size));
169 *(*buf)++ = (unsigned char) mech->length;
170 TWRITE_STR(*buf, mech->elements, mech->length);
186 gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize_in, in g_verify_token_header() argument
188 const gss_OID_desc * mech; in g_verify_token_header()
[all …]
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/hash_provider/
H A Dhash_kef_generic.c22 crypto_mechanism_t mech; in k5_ef_hash() local
38 mech.cm_type = context->kef_cksum_mt; in k5_ef_hash()
39 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_hash()
45 mech.cm_param = 0; in k5_ef_hash()
46 mech.cm_param_len = 0; in k5_ef_hash()
48 rv = crypto_digest_init(&mech, &ctxp, NULL); in k5_ef_hash()
95 crypto_mechanism_t mech; in k5_ef_mac() local
114 mech.cm_type = context->kef_hash_mt; in k5_ef_mac()
115 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_mac()
122 mech.cm_param = ivec->data; in k5_ef_mac()
[all …]

12345678