/illumos-gate/usr/src/uts/common/fs/smbclnt/netsmb/ |
H A D | nsmb_sign_kcf.c | 35 find_mech(smb_sign_mech_t *mech, const char *name) in find_mech() argument 44 mech->cm_type = t; in find_mech() 54 smb_md5_getmech(smb_sign_mech_t *mech) in smb_md5_getmech() argument 56 return (find_mech(mech, SUN_CKM_MD5)); in smb_md5_getmech() 67 rv = crypto_digest_init(mech, ctxp, NULL); in smb_md5_init() 123 smb2_hmac_getmech(smb_sign_mech_t *mech) in smb2_hmac_getmech() argument 125 return (find_mech(mech, SUN_CKM_SHA256_HMAC)); in smb2_hmac_getmech() 143 rv = crypto_mac_init(mech, &ckey, NULL, ctxp, NULL); in smb2_hmac_init() 203 smb3_cmac_getmech(smb_sign_mech_t *mech) in smb3_cmac_getmech() argument 205 return (find_mech(mech, SUN_CKM_AES_CMAC)); in smb3_cmac_getmech() [all …]
|
/illumos-gate/usr/src/uts/common/gssapi/mechs/dummy/ |
H A D | dmech.c | 143 gss_mechanism mech, tmp; in _init() local 145 mech = gss_mech_initialize(); 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() 495 gss_OID mech; in g_make_token_header() 503 *(*buf)++ = (unsigned char) mech->length; 504 TWRITE_STR(*buf, mech->elements, ((int)mech->length)); 511 gss_OID mech; in g_verify_token_header() [all …]
|
/illumos-gate/usr/src/lib/libgss/ |
H A D | g_acquire_cred.c | 152 gss_mechanism mech; local 178 if (mech == NULL) 335 gss_mechanism mech; local 359 if (!mech) 391 &mech->mech_type, 426 status = mech->gss_acquire_cred(mech->context, minor_status, 447 if ((status = mech->gss_display_name(mech->context, 489 &mech->mech_type); 522 &mech->mech_type, 534 mech->gss_release_cred(mech->context, [all …]
|
H A D | g_context_time.c | 43 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 D | g_process_context.c | 44 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 D | g_accept_sec_context.c | 122 gss_mechanism mech; local 190 if (mech && mech->gss_accept_sec_context) { 192 mech->context, 214 map_error(minor_status, mech); 231 &t_minstat, mech, 235 map_error(minor_status, mech); 307 if (mech->gss_inquire_cred) { 309 mech->context, 319 map_error(minor_status, mech); 324 &t_minstat, mech, [all …]
|
H A D | g_acquire_cred_with_pw.c | 107 gss_mechanism mech; local 138 mech = __gss_get_mechanism(GSS_C_NULL_OID); 139 if (mech == NULL) 243 gss_mechanism mech; local 302 &mech->mech_type)) 306 &mech->mech_type, union_name, 334 if ((status = mech->gss_display_name(mech->context, 375 &mech->mech_type); 408 &mech->mech_type, 420 mech->gss_release_cred(mech->context, [all …]
|
H A D | g_verify.c | 47 gss_mechanism mech; local 66 mech = __gss_get_mechanism(ctx->mech_type); 68 if (mech) { 69 if (mech->gss_verify) { 70 status = mech->gss_verify( 71 mech->context, 78 map_error(minor_status, mech);
|
H A D | g_rel_cred.c | 47 gss_mechanism mech; local 76 mech = __gss_get_mechanism(&union_cred->mechs_array[j]); 80 if (mech) { 81 if (mech->gss_release_cred) { 82 temp_status = mech->gss_release_cred 83 (mech->context, minor_status, 87 map_error(minor_status, mech);
|
H A D | g_inq_context_oid.c | 46 gss_mechanism mech; in gss_inquire_sec_context_by_oid() local 60 mech = gssint_get_mechanism (ctx->mech_type); in gss_inquire_sec_context_by_oid() 62 if (mech != NULL) { in gss_inquire_sec_context_by_oid() 63 if (mech->gss_inquire_sec_context_by_oid != NULL) { in gss_inquire_sec_context_by_oid() 64 status = mech->gss_inquire_sec_context_by_oid(minor_status, in gss_inquire_sec_context_by_oid() 69 map_error(minor_status, mech); in gss_inquire_sec_context_by_oid()
|
H A D | g_unseal.c | 50 gss_mechanism mech; local 79 mech = __gss_get_mechanism(ctx->mech_type); 81 if (mech) { 82 if (mech->gss_unseal) { 83 status = mech->gss_unseal( 84 mech->context, 92 map_error(minor_status, mech);
|
H A D | g_sign.c | 83 gss_mechanism mech; local 96 mech = __gss_get_mechanism(ctx->mech_type); 98 if (mech) { 99 if (mech->gss_sign) { 100 status = mech->gss_sign( 101 mech->context, 108 map_error(minor_status, mech);
|
/illumos-gate/usr/src/lib/gss_mechs/mech_dh/dh_common/ |
H A D | dh_common.c | 93 gss_mechanism (*mech_init)(gss_mechanism mech); in __dh_generic_initialize() 94 gss_mechanism mech; in __dh_generic_initialize() local 114 if ((mech = mech_init(dhmech)) == NULL) { in __dh_generic_initialize() 119 mech->mech_type = mech_type; in __dh_generic_initialize() 122 context = (dh_context_t)mech->context; in __dh_generic_initialize() 128 context->mech = &mech->mech_type; in __dh_generic_initialize() 130 return (mech); in __dh_generic_initialize()
|
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/des/ |
H A D | ef_crypto.c | 20 crypto_mechanism_t mech; in k5_ef_crypto() local 43 mech.cm_type = key->kef_mt; in k5_ef_crypto() 44 if (mech.cm_type == CRYPTO_MECH_INVALID) { in k5_ef_crypto() 52 mech.cm_param_len = ivec->length; in k5_ef_crypto() 53 mech.cm_param = (char *)ivec->data; in k5_ef_crypto() 55 mech.cm_param_len = 0; in k5_ef_crypto() 56 mech.cm_param = NULL; in k5_ef_crypto() 60 rv = crypto_encrypt(&mech, &d1, in k5_ef_crypto() 66 rv = crypto_decrypt(&mech, &d1, in k5_ef_crypto()
|
/illumos-gate/usr/src/lib/gss_mechs/mech_dh/backend/mech/ |
H A D | dhmech.c | 82 __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()
|
/illumos-gate/usr/src/lib/rpcsec_gss/ |
H A D | rpcsec_gss_utils.c | 72 __rpc_gss_mech_to_oid(char *mech, rpc_gss_OID *oid) in __rpc_gss_mech_to_oid() argument 74 if (__gss_mech_to_oid(mech, (gss_OID*)oid) != GSS_S_COMPLETE) in __rpc_gss_mech_to_oid() 87 __rpc_gss_qop_to_num(char *qop, char *mech, OM_uint32 *num) in __rpc_gss_qop_to_num() argument 89 if (__gss_qop_to_num(qop, mech, num) != GSS_S_COMPLETE) in __rpc_gss_qop_to_num() 95 __rpc_gss_num_to_qop(char *mech, OM_uint32 num) in __rpc_gss_num_to_qop() argument 99 if (__gss_num_to_qop(mech, num, &qop) != GSS_S_COMPLETE) in __rpc_gss_num_to_qop() 156 if (!__rpc_gss_mech_to_oid(mech, (rpc_gss_OID *) &mech_oid)) { in __rpc_gss_get_principal_name() 269 if (__gss_get_mech_info(mech, l) != GSS_S_COMPLETE) { in __rpc_gss_get_mech_info() 294 __rpc_gss_is_installed(char *mech) in __rpc_gss_is_installed() argument 298 if (mech == NULL) in __rpc_gss_is_installed() [all …]
|
/illumos-gate/usr/src/uts/common/crypto/api/ |
H A D | kcf_mac.c | 107 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_mac_prov() 129 crypto_mac(crypto_mechanism_t *mech, crypto_data_t *data, in crypto_mac() argument 173 lmech = *mech; in crypto_mac() 174 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_mac() 192 pd->pd_sid, mech, key, data, mac, spi_ctx_tmpl); in crypto_mac() 231 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_mac_verify_prov() 297 lmech = *mech; in crypto_mac_verify() 298 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_mac_verify() 311 KCF_OP_MAC_VERIFY_ATOMIC, pd->pd_sid, mech, in crypto_mac_verify() 384 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_mac_init_prov() [all …]
|
H A D | kcf_sign.c | 59 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_sign_init_prov() 74 KCF_WRAP_SIGN_OPS_PARAMS(¶ms, KCF_OP_INIT, sid, mech, in crypto_sign_init_prov() 91 crypto_sign_init(crypto_mechanism_t *mech, crypto_key_t *key, in crypto_sign_init() argument 103 if ((pd = kcf_get_mech_provider(mech->cm_type, key, &me, &error, in crypto_sign_init() 240 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_sign_prov() 247 KCF_WRAP_SIGN_OPS_PARAMS(¶ms, KCF_OP_ATOMIC, sid, mech, in crypto_sign_prov() 301 lmech = *mech; in sign_sr_atomic_common() 302 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in sign_sr_atomic_common() 317 mech, key, data, signature, spi_ctx_tmpl); in sign_sr_atomic_common() 360 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_sign_recover_prov() [all …]
|
H A D | kcf_verify.c | 59 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_verify_init_prov() 74 KCF_WRAP_VERIFY_OPS_PARAMS(¶ms, KCF_OP_INIT, sid, mech, in crypto_verify_init_prov() 92 crypto_verify_init(crypto_mechanism_t *mech, crypto_key_t *key, in crypto_verify_init() argument 242 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_verify_prov() 303 lmech = *mech; in verify_vr_atomic_common() 304 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in verify_vr_atomic_common() 320 mech, key, data, signature, spi_ctx_tmpl); in verify_vr_atomic_common() 362 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_verify_recover_prov() 370 sid, mech, key, data, signature, tmpl); in crypto_verify_recover_prov() 401 rv = kcf_get_hardware_provider(mech->cm_type, key, in crypto_verify_recover_init_prov() [all …]
|
H A D | kcf_digest.c | 107 rv = kcf_get_hardware_provider(mech->cm_type, NULL, in crypto_digest_prov() 130 crypto_digest(crypto_mechanism_t *mech, crypto_data_t *data, in crypto_digest() argument 140 if ((pd = kcf_get_mech_provider(mech->cm_type, NULL, NULL, &error, in crypto_digest() 151 lmech = *mech; in crypto_digest() 152 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_digest() 163 pd->pd_sid, mech, NULL, data, digest); in crypto_digest() 221 error = kcf_get_hardware_provider(mech->cm_type, NULL, in crypto_digest_init_prov() 240 lmech = *mech; in crypto_digest_init_prov() 241 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, real_provider, &lmech); in crypto_digest_init_prov() 247 mech, NULL, NULL, NULL); in crypto_digest_init_prov() [all …]
|
/illumos-gate/usr/src/uts/common/fs/smbsrv/ |
H A D | smb3_encrypt_kcf.c | 39 find_mech(smb_crypto_mech_t *mech, const char *name) in find_mech() argument 48 mech->cm_type = t; in find_mech() 58 smb3_aes_ccm_getmech(smb_crypto_mech_t *mech) in smb3_aes_ccm_getmech() argument 60 return (find_mech(mech, SUN_CKM_AES_CCM)); in smb3_aes_ccm_getmech() 64 smb3_aes_gcm_getmech(smb_crypto_mech_t *mech) in smb3_aes_gcm_getmech() argument 66 return (find_mech(mech, SUN_CKM_AES_GCM)); in smb3_aes_gcm_getmech() 85 ctx->mech.cm_param = (caddr_t)&ctx->param.ccm; in smb3_crypto_init_ccm_param() 86 ctx->mech.cm_param_len = sizeof (ctx->param.ccm); in smb3_crypto_init_ccm_param() 103 ctx->mech.cm_param = (caddr_t)&ctx->param.gcm; in smb3_crypto_init_gcm_param() 160 rv = crypto_encrypt(&ctxp->mech, &in_cd, in smb3_encrypt_uio() [all …]
|
/illumos-gate/usr/src/lib/libsasl/lib/ |
H A D | server.c | 270 if (s_conn->mech in server_dispose() 487 if (! mech) { 1428 if(! mech || ! mech->plug) { 1474 if(cur->mech == mech) { 1530 cur->mech = mech; 1548 cur->mech = mech; 2226 mech = mlist; 2237 while (*mech && !isspace((int) *mech)) mech++; 2238 while (*mech && isspace((int) *mech)) mech++; 2412 while (*mech && !isspace((int) *mech)) mech++; [all …]
|
H A D | client.c | 207 cmechanism_t *mech; local 286 if (! mech) { 300 sasl_FREE(mech); 510 if (c_conn->mech && c_conn->mech->plug->mech_dispose) { 620 conn->mech = NULL; 738 const char **mech) argument 778 c_conn->mech = NULL; 915 if (mech) { 957 c_conn->mech = bestm; 961 result = c_conn->mech->plug->mech_new(c_conn->mech->glob_context, [all …]
|
/illumos-gate/usr/src/uts/common/fs/zfs/ |
H A D | hkdf.c | 31 crypto_mechanism_t mech; in hkdf_sha512_extract() local 36 mech.cm_type = crypto_mech2id(SUN_CKM_SHA512_HMAC); in hkdf_sha512_extract() 37 mech.cm_param = NULL; in hkdf_sha512_extract() 38 mech.cm_param_len = 0; in hkdf_sha512_extract() 58 ret = crypto_mac(&mech, &input_cd, &key, NULL, &output_cd, NULL); in hkdf_sha512_extract() 70 crypto_mechanism_t mech; in hkdf_sha512_expand() local 83 mech.cm_type = crypto_mech2id(SUN_CKM_SHA512_HMAC); in hkdf_sha512_expand() 84 mech.cm_param = NULL; in hkdf_sha512_expand() 85 mech.cm_param_len = 0; in hkdf_sha512_expand() 115 ret = crypto_mac_init(&mech, &key, NULL, &ctx, NULL); in hkdf_sha512_expand()
|
/illumos-gate/usr/src/lib/gss_mechs/mech_dh/backend/ |
H A D | Makefile | 28 PROTOCOL_DIR = mech 32 DERIVED_FILES = mech/dhmech_prot.h mech/xdr_token.c 61 mech/xdr_token.c: $(PROTOCOL_DIR)/dhmech_prot.x 65 mech/dhmech_prot.h: mech/dhmech_prot.x 81 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext mech/*.[ch]`
|