/titanic_41/usr/src/lib/pkcs11/pkcs11_softtoken/common/ |
H A D | softDH.c | 88 soft_dh_genkey_pair(soft_object_t *pubkey, soft_object_t *prikey) in soft_dh_genkey_pair() argument 106 if ((prikey->class != CKO_PRIVATE_KEY) || in soft_dh_genkey_pair() 107 (prikey->key_type != CKK_DH)) { in soft_dh_genkey_pair() 117 rv = get_ulong_attr_from_object(OBJ_PRI_DH_VAL_BITS(prikey), in soft_dh_genkey_pair() 153 k.rfunc = (IS_TOKEN_OBJECT(pubkey) || IS_TOKEN_OBJECT(prikey)) ? in soft_dh_genkey_pair() 175 if ((rv = soft_genDHkey_set_attribute(prikey, CKA_VALUE, private_x, in soft_dh_genkey_pair() 181 if ((rv = soft_genDHkey_set_attribute(prikey, CKA_PRIME, prime, in soft_dh_genkey_pair() 187 if ((rv = soft_genDHkey_set_attribute(prikey, CKA_BASE, base, in soft_dh_genkey_pair() 193 OBJ_PRI_DH_VAL_BITS(prikey) = k.value_bits; in soft_dh_genkey_pair()
|
H A D | softDSA.c | 464 soft_dsa_genkey_pair(soft_object_t *pubkey, soft_object_t *prikey) in soft_dsa_genkey_pair() argument 479 if ((pubkey == NULL) || (prikey == NULL)) { in soft_dsa_genkey_pair() 510 k.rfunc = (IS_TOKEN_OBJECT(pubkey) || IS_TOKEN_OBJECT(prikey)) ? in soft_dsa_genkey_pair() 531 if ((rv = soft_genDSAkey_set_attribute(prikey, CKA_PRIME, in soft_dsa_genkey_pair() 536 if ((rv = soft_genDSAkey_set_attribute(prikey, CKA_SUBPRIME, subprime, in soft_dsa_genkey_pair() 541 if ((rv = soft_genDSAkey_set_attribute(prikey, CKA_BASE, in soft_dsa_genkey_pair() 546 if ((rv = soft_genDSAkey_set_attribute(prikey, CKA_VALUE, privalue, in soft_dsa_genkey_pair()
|
H A D | softRSA.c | 822 soft_rsa_genkey_pair(soft_object_t *pubkey, soft_object_t *prikey) in soft_rsa_genkey_pair() argument 844 if ((pubkey == NULL) || (prikey == NULL)) { in soft_rsa_genkey_pair() 882 k.rfunc = (IS_TOKEN_OBJECT(pubkey) || IS_TOKEN_OBJECT(prikey)) ? in soft_rsa_genkey_pair() 914 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_MODULUS, in soft_rsa_genkey_pair() 919 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_PRIVATE_EXPONENT, in soft_rsa_genkey_pair() 924 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_PUBLIC_EXPONENT, in soft_rsa_genkey_pair() 929 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_PRIME_1, in soft_rsa_genkey_pair() 934 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_PRIME_2, in soft_rsa_genkey_pair() 939 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_EXPONENT_1, in soft_rsa_genkey_pair() 944 if ((rv = soft_genRSAkey_set_attribute(prikey, CKA_EXPONENT_2, in soft_rsa_genkey_pair() [all …]
|
H A D | softEC.c | 147 soft_ec_genkey_pair(soft_object_t *pubkey, soft_object_t *prikey) in soft_ec_genkey_pair() argument 162 if ((prikey->class != CKO_PRIVATE_KEY) || in soft_ec_genkey_pair() 163 (prikey->key_type != CKK_EC)) in soft_ec_genkey_pair() 176 rv = set_extra_attr_to_object(prikey, CKA_EC_PARAMS, &template); in soft_ec_genkey_pair() 200 soft_genECkey_set_attribute(prikey, &bi, CKA_VALUE); in soft_ec_genkey_pair()
|
/titanic_41/usr/src/lib/libkmf/plugins/kmf_nss/common/ |
H A D | nss_spi.c | 2148 KMF_KEY_HANDLE *pubkey = NULL, *prikey = NULL; in NSS_StoreKey() local 2177 prikey = kmf_get_attr_ptr(KMF_PRIVKEY_HANDLE_ATTR, attrlist, in NSS_StoreKey() 2179 if (prikey == NULL) in NSS_StoreKey() 2186 if (pubkey == NULL && prikey == NULL && rawkey == NULL) in NSS_StoreKey() 2260 } else if (prikey != NULL && prikey->kstype == KMF_KEYSTORE_NSS) { in NSS_StoreKey() 2262 SECKEYPrivateKey *privKey = (SECKEYPrivateKey *) prikey->keyp; in NSS_StoreKey()
|
/titanic_41/usr/src/lib/libkmf/plugins/kmf_openssl/common/ |
H A D | openssl_spi.c | 4864 KMF_KEY_HANDLE *pubkey = NULL, *prikey = NULL; in OpenSSL_StoreKey() local 4879 prikey = kmf_get_attr_ptr(KMF_PRIVKEY_HANDLE_ATTR, attrlist, numattr); in OpenSSL_StoreKey() 4880 if (prikey != NULL) in OpenSSL_StoreKey() 4930 if (prikey != NULL && prikey->keyp != NULL) { in OpenSSL_StoreKey() 4931 if (prikey->keyalg == KMF_RSA || in OpenSSL_StoreKey() 4932 prikey->keyalg == KMF_DSA) { in OpenSSL_StoreKey() 4933 pkey = (EVP_PKEY *)prikey->keyp; in OpenSSL_StoreKey() 4938 if (rv == KMF_OK && prikey->keylabel == NULL) { in OpenSSL_StoreKey() 4939 prikey->keylabel = strdup(fullpath); in OpenSSL_StoreKey() 4940 if (prikey->keylabel == NULL) in OpenSSL_StoreKey()
|
/titanic_41/usr/src/lib/libkmf/libkmf/common/ |
H A D | certop.c | 1184 KMF_KEY_HANDLE prikey; in kmf_decrypt() local 1237 &new_numattr, &prikey, cert); in kmf_decrypt() 1261 plugin = FindPlugin(handle, prikey.kstype); in kmf_decrypt() 1265 &prikey, &spki_ptr->algorithm.algorithm, in kmf_decrypt() 1275 kmf_free_kmf_key(handle, &prikey); in kmf_decrypt()
|