Lines Matching defs:pkey

221  * or it should point to a valid STACK_OF(X509) structure. pkey and cert can
235 * pkey - Points to location pointing to the private key returned.
272 int keyid_len, char *name_str, EVP_PKEY **pkey, X509 **cert,
285 if (pkey)
286 *pkey = NULL;
328 name_str, pkey, cert, ca);
336 if (pkey && *pkey) {
337 sunw_evp_pkey_free(*pkey);
387 STACK_OF(EVP_PKEY) **pkey, STACK_OF(X509) **certs)
413 retval = set_results(pkey, &work_kl, certs, &work_ca, NULL, NULL, NULL,
450 sunw_PKCS12_contents(PKCS12 *p12, const char *pass, STACK_OF(EVP_PKEY) **pkey,
479 retval = set_results(pkey, &work_kl, certs, &work_ca, NULL,
641 EVP_PKEY *pkey = NULL;
788 pkey = sk_EVP_PKEY_value(pkeys, i);
791 if ((p8 = EVP_PKEY2PKCS8(pkey)) == NULL) {
806 len = sunw_get_pkey_fname(GETDO_COPY, pkey,
818 len = sunw_get_pkey_localkeyid(GETDO_COPY, pkey,
916 * pkey - Entry which potentially has attributes to be freed.
922 sunw_evp_pkey_free(EVP_PKEY *pkey)
924 if (pkey != NULL) {
925 if (pkey->attributes != NULL) {
926 sk_X509_ATTRIBUTE_pop_free(pkey->attributes,
928 pkey->attributes = NULL;
930 EVP_PKEY_free(pkey);
941 * pkey - Points to a private key to set the keyidstr in.
954 sunw_set_localkeyid(const char *keyid_str, int keyid_len, EVP_PKEY *pkey,
970 if (pkey != NULL) {
991 if (pkey->attributes == NULL) {
992 pkey->attributes = sk_X509_ATTRIBUTE_new_null();
993 if (pkey->attributes == NULL) {
999 i = find_attr_by_nid(pkey->attributes, NID_localKeyID);
1001 sk_X509_ATTRIBUTE_delete(pkey->attributes, i);
1003 if (sk_X509_ATTRIBUTE_push(pkey->attributes, attr) == 0) {
1028 * pkey - Points to a private key to set the keyidstr in.
1041 sunw_get_pkey_localkeyid(getdo_actions_t dowhat, EVP_PKEY *pkey,
1055 if (pkey == NULL || pkey->attributes == NULL) {
1059 if ((i = find_attr_by_nid(pkey->attributes, NID_localKeyID)) < 0) {
1062 attr = sk_X509_ATTRIBUTE_value(pkey->attributes, i);
1070 attr = sk_X509_ATTRIBUTE_delete(pkey->attributes, i);
1095 * pkey - Points to a private key to get the frientlyname from
1106 sunw_get_pkey_fname(getdo_actions_t dowhat, EVP_PKEY *pkey, char **fname)
1117 if (pkey == NULL || pkey->attributes == NULL) {
1121 if ((i = find_attr_by_nid(pkey->attributes, NID_friendlyName)) < 0) {
1124 attr = sk_X509_ATTRIBUTE_value(pkey->attributes, i);
1132 attr = sk_X509_ATTRIBUTE_delete(pkey->attributes, i);
1171 * - Pointer to receive address of first matching pkey found.
1247 * - Pointer to receive address of first matching pkey found.
1357 * pkey - Points to a private key to set the fname in.
1370 sunw_set_fname(const char *ascname, EVP_PKEY *pkey, X509 *cert)
1400 if (pkey != NULL) {
1418 if (pkey->attributes == NULL) {
1419 pkey->attributes = sk_X509_ATTRIBUTE_new_null();
1420 if (pkey->attributes == NULL) {
1425 } else if ((i = find_attr_by_nid(pkey->attributes,
1427 (void) sk_X509_ATTRIBUTE_delete(pkey->attributes, i);
1430 if (sk_X509_ATTRIBUTE_push(pkey->attributes, attr) == 0) {
1458 * pkey - Points to a private key.
1465 sunw_check_keys(X509 *cert, EVP_PKEY *pkey)
1469 if (pkey != NULL && cert != NULL)
1470 retval = X509_check_private_key(cert, pkey);
1518 * pkey - Points to location pointing to the private key returned.
1537 int kstr_len, char *name_str, EVP_PKEY **pkey, X509 **cert,
1580 work_kl, work_cl, pkey, cert);
1598 pkey, cert);
1610 retval = get_key_cert(0, work_kl, pkey, work_cl, cert);
1629 retval = get_key_cert(n, work_kl, pkey, work_cl, cert);
1649 retval = get_key_cert(0, tmpk, pkey, tmpc, cert);
1669 if (pkey != NULL && *pkey != NULL) {
1670 sunw_evp_pkey_free(*pkey);
1671 *pkey = NULL;
1802 EVP_PKEY *pkey = NULL;
1813 if ((pkey = EVP_PKCS82PKEY(bag->value.keybag)) == NULL) {
1830 pkey = EVP_PKCS82PKEY(p8);
1832 if (pkey == NULL) {
1926 if (pkey != NULL) {
1928 pkey->attributes == NULL) {
1929 pkey->attributes = sk_X509_ATTRIBUTE_new_null();
1930 if (pkey->attributes == NULL) {
1946 if (sk_X509_ATTRIBUTE_push(pkey->attributes,
1966 if (sk_X509_ATTRIBUTE_push(pkey->attributes,
1979 if (sk_EVP_PKEY_push(kl, pkey) == 0) {
1984 pkey = NULL;
1989 if (pkey != NULL) {
1990 sunw_evp_pkey_free(pkey);
2102 pp = &(x->x_pkey->dec_pkey->pkey.rsa);
2114 pp = &(x->x_pkey->dec_pkey->pkey.dsa);
2229 * pkey - Points at location where the address of the matching private
2249 get_key_cert(int n, STACK_OF(EVP_PKEY) *kl, EVP_PKEY **pkey, STACK_OF(X509) *cl,
2259 if (pkey != NULL && *pkey == NULL) {
2261 *pkey = sk_EVP_PKEY_delete(kl, n);
2262 if (*pkey != NULL)
2553 * pkey - Points at a location where the address of the matching private
2564 * A pkey structure has a stack of attributes.
2580 * A pointer to cert and/or pkey which matches the name or keyid is stored
2589 find_attr(int nid, ASN1_STRING *str, STACK_OF(EVP_PKEY) *kl, EVP_PKEY **pkey,
2605 chkcerts = (cert != NULL || pkey != NULL) && cl != NULL;
2662 if (pkey != NULL && kl != NULL) {
2664 * Looking for pkey to match a cert? If so, assume that
2673 if (pkey != NULL)
2674 *pkey = sk_EVP_PKEY_delete(kl, k);
2689 if (pkey != NULL)
2690 *pkey = sk_EVP_PKEY_delete(kl, k);