Lines Matching refs:key

38 update_key_template(krb5_keyblock *key)
45 if (key == NULL)
52 kef_mech.cm_type = key->kef_mt;
59 &key->kef_key,
60 &key->key_tmpl,
68 key->key_tmpl = NULL;
81 init_key_kef(crypto_mech_type_t mech_type, krb5_keyblock *key)
86 if (key == NULL)
89 if (key->kef_key.ck_data == NULL) {
90 key->kef_key.ck_data = key->contents;
94 key->kef_key.ck_length = key->length * 8;
95 key->kef_key.ck_format = CRYPTO_KEY_RAW;
96 key->kef_mt = mech_type;
98 if (key->key_tmpl == NULL && mech_type != CRYPTO_MECH_INVALID) {
99 rv = update_key_template(key);
108 * key block.
111 init_key_uef(CK_SESSION_HANDLE hSession, krb5_keyblock *key)
122 * fork safety: if the key->pid != __krb5_current_pid then a fork has
123 * taken place and the pkcs11 key handle must be re-acquired.
125 if ((key->hKey != CK_INVALID_HANDLE) &&
126 (key->pid == __krb5_current_pid))
130 key->pid = __krb5_current_pid;
132 if ((rv = get_key_type(key->enctype, &keyType)) != CKR_OK) {
133 KRB5_LOG0(KRB5_ERR, "failure to get key type in function "
154 template[5].pValue = key->contents;
155 template[5].ulValueLen = key->length;
157 /* Create an object handle for the key */
160 &key->hKey)) != CKR_OK) {
175 krb5_c_encrypt(krb5_context context, const krb5_keyblock *key,
182 KRB5_LOG(KRB5_INFO, "krb5_c_encrypt start etype = %d", key->enctype);
184 if (krb5_enctypes_list[i].etype == key->enctype)
193 output->enctype = key->enctype;
198 if (key->kef_key.ck_data == NULL) {
200 (krb5_keyblock *)key)))
204 if ((ret = init_key_uef(krb_ctx_hSession(context), (krb5_keyblock *)key)))
212 key, usage, ivec, input, &output->ciphertext));