Home
last modified time | relevance | path

Searched refs:prikey (Results 1 – 7 of 7) sorted by relevance

/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftDH.c88 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 DsoftDSA.c464 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 DsoftRSA.c822 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 DsoftEC.c147 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()
/illumos-gate/usr/src/lib/libkmf/plugins/kmf_nss/common/
H A Dnss_spi.c2149 KMF_KEY_HANDLE *pubkey = NULL, *prikey = NULL; in NSS_StoreKey() local
2178 prikey = kmf_get_attr_ptr(KMF_PRIVKEY_HANDLE_ATTR, attrlist, in NSS_StoreKey()
2180 if (prikey == NULL) in NSS_StoreKey()
2187 if (pubkey == NULL && prikey == NULL && rawkey == NULL) in NSS_StoreKey()
2261 } else if (prikey != NULL && prikey->kstype == KMF_KEYSTORE_NSS) { in NSS_StoreKey()
2263 SECKEYPrivateKey *privKey = (SECKEYPrivateKey *) prikey->keyp; in NSS_StoreKey()
/illumos-gate/usr/src/lib/libkmf/plugins/kmf_openssl/common/
H A Dopenssl_spi.c4880 KMF_KEY_HANDLE *pubkey = NULL, *prikey = NULL; in OpenSSL_StoreKey() local
4895 prikey = kmf_get_attr_ptr(KMF_PRIVKEY_HANDLE_ATTR, attrlist, numattr); in OpenSSL_StoreKey()
4896 if (prikey != NULL) in OpenSSL_StoreKey()
4946 if (prikey != NULL && prikey->keyp != NULL) { in OpenSSL_StoreKey()
4947 if (prikey->keyalg == KMF_RSA || in OpenSSL_StoreKey()
4948 prikey->keyalg == KMF_DSA) { in OpenSSL_StoreKey()
4949 pkey = (EVP_PKEY *)prikey->keyp; in OpenSSL_StoreKey()
4954 if (rv == KMF_OK && prikey->keylabel == NULL) { in OpenSSL_StoreKey()
4955 prikey->keylabel = strdup(fullpath); in OpenSSL_StoreKey()
4956 if (prikey->keylabel == NULL) in OpenSSL_StoreKey()
/illumos-gate/usr/src/lib/libkmf/libkmf/common/
H A Dcertop.c1184 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()