Lines Matching refs:key

1040 			 * The EC_POINT is to be used as the subject pub key.
1956 KMF_KEY_HANDLE *key;
1966 key = kmf_get_attr_ptr(KMF_KEY_HANDLE_ATTR, attrlist, numattr);
1967 if (key == NULL || key->keyp == NULL)
1970 if (key->keyclass != KMF_ASYM_PUB &&
1971 key->keyclass != KMF_ASYM_PRI &&
1972 key->keyclass != KMF_SYMMETRIC)
1991 if (!key->israw && destroy)
1993 (CK_OBJECT_HANDLE)key->keyp);
2039 /* Get the PKCS11 signing key type and mechtype */
2070 * private key.
2213 KMF_KEY_HANDLE *key = NULL;
2219 /* Get the key handle */
2220 key = kmf_get_attr_ptr(KMF_KEY_HANDLE_ATTR, attrlist, numattr);
2221 if (key == NULL)
2237 /* Get the public key info from the signer certificate */
2282 key->kstype = KMF_KEYSTORE_PK11TOKEN;
2283 key->keyclass = KMF_ASYM_PRI;
2284 key->keyp = (void *)pri_obj;
2285 key->israw = FALSE;
2289 ckrv = getObjectLabel(handle, (CK_OBJECT_HANDLE)key->keyp,
2290 &key->keylabel);
2299 * The key->keyalg value is needed if we need to convert the key
2300 * to raw key. However, the key->keyalg value will not be set if
2303 * the key object and set key->keyalg value here.
2305 ckrv = getObjectKeytype(handle, (CK_OBJECT_HANDLE)key->keyp,
2315 key->keyalg = KMF_RSA;
2317 key->keyalg = KMF_DSA;
2319 key->keyalg = KMF_ECDSA;
2328 rv = keyObj2RawKey(handle, key, &rkey);
2330 key->keyp = rkey;
2331 key->israw = TRUE;
2347 KMFPK11_DecryptData(KMF_HANDLE_T handle, KMF_KEY_HANDLE *key,
2369 if (key == NULL || algOID == NULL ||
2390 (CK_OBJECT_HANDLE)key->keyp, ckTemplate, 1);
2408 (CK_OBJECT_HANDLE)key->keyp);
2497 /* Tell the caller know why the key data cannot be retrieved. */
2579 * base and private key values of a DSA key.
2657 /* Tell the caller know why the key data cannot be retrieved. */
2718 /* Tell the caller know why the key data cannot be retrieved. */
2753 /* Compute the public key value and store it */
2776 /* find the key length first */
2799 /* get the key data */
3065 * a private or secred key, or if the user passed in credentials.
3268 * If the caller did not specify a label, see if the raw key
3546 * For AES, RC4, DES and 3DES, call C_GenerateKey() to create a key.
3548 * For a generic secret key, because it may not be supported in
3587 * If keydata was not given, key length must be
3606 * Only set CKA_VALUE_LEN if the key data was not given and
3607 * we are creating an RC4 or AES key.
3689 /* If the key data was given, use C_CreateObject */
3740 * If the key is already in "raw" format, copy the data
3860 int numattr, KMF_ATTRIBUTE *attrlist, CK_OBJECT_HANDLE *key)
3912 * If the key data was not given, key length must
3921 * Check the key size.
3930 * Generate a random number with the key size first.
3956 * a generic secret token key.
3997 ckrv = C_CreateObject(hSession, templ, i, key);
4029 KMF_KEY_HANDLE *key;
4051 key = kmf_get_attr_ptr(KMF_PUBKEY_HANDLE_ATTR, attlist, numattr);
4052 if (key == NULL) {
4053 key = kmf_get_attr_ptr(KMF_PRIVKEY_HANDLE_ATTR, attlist,
4055 if (key == NULL)
4059 if (key == NULL && rawkey == NULL)
4064 } else if (key && key->kstype == KMF_KEYSTORE_PK11TOKEN) {
4067 /* Copy the key object to the token */
4069 (CK_OBJECT_HANDLE)key->keyp, tokenattr, 1, &newobj);
4077 (CK_OBJECT_HANDLE)key->keyp);
4082 key->keyp = (void *)newobj;
4193 /* For each certificate, find the matching private key */
4233 /* it is OK if a key is not found */