Lines Matching refs:pkey

230 sunw_evp_pkey_free(EVP_PKEY *pkey)  in sunw_evp_pkey_free()  argument
232 if (pkey != NULL) { in sunw_evp_pkey_free()
233 if (pkey->attributes != NULL) { in sunw_evp_pkey_free()
234 sk_X509_ATTRIBUTE_pop_free(pkey->attributes, in sunw_evp_pkey_free()
236 pkey->attributes = NULL; in sunw_evp_pkey_free()
238 EVP_PKEY_free(pkey); in sunw_evp_pkey_free()
262 sunw_set_localkeyid(const char *keyid_str, int keyid_len, EVP_PKEY *pkey, in sunw_set_localkeyid() argument
278 if (pkey != NULL) { in sunw_set_localkeyid()
299 if (pkey->attributes == NULL) { in sunw_set_localkeyid()
300 pkey->attributes = sk_X509_ATTRIBUTE_new_null(); in sunw_set_localkeyid()
301 if (pkey->attributes == NULL) { in sunw_set_localkeyid()
307 i = find_attr_by_nid(pkey->attributes, NID_localKeyID); in sunw_set_localkeyid()
309 sk_X509_ATTRIBUTE_delete(pkey->attributes, i); in sunw_set_localkeyid()
311 if (sk_X509_ATTRIBUTE_push(pkey->attributes, attr) == 0) { in sunw_set_localkeyid()
349 sunw_get_pkey_localkeyid(getdo_actions_t dowhat, EVP_PKEY *pkey, in sunw_get_pkey_localkeyid() argument
363 if (pkey == NULL || pkey->attributes == NULL) { in sunw_get_pkey_localkeyid()
367 if ((i = find_attr_by_nid(pkey->attributes, NID_localKeyID)) < 0) { in sunw_get_pkey_localkeyid()
370 attr = sk_X509_ATTRIBUTE_value(pkey->attributes, i); in sunw_get_pkey_localkeyid()
378 attr = sk_X509_ATTRIBUTE_delete(pkey->attributes, i); in sunw_get_pkey_localkeyid()
414 sunw_get_pkey_fname(getdo_actions_t dowhat, EVP_PKEY *pkey, char **fname) in sunw_get_pkey_fname() argument
425 if (pkey == NULL || pkey->attributes == NULL) { in sunw_get_pkey_fname()
429 if ((i = find_attr_by_nid(pkey->attributes, NID_friendlyName)) < 0) { in sunw_get_pkey_fname()
432 attr = sk_X509_ATTRIBUTE_value(pkey->attributes, i); in sunw_get_pkey_fname()
440 attr = sk_X509_ATTRIBUTE_delete(pkey->attributes, i); in sunw_get_pkey_fname()
671 sunw_check_keys(X509 *cert, EVP_PKEY *pkey) in sunw_check_keys() argument
675 if (pkey != NULL && cert != NULL) in sunw_check_keys()
676 retval = X509_check_private_key(cert, pkey); in sunw_check_keys()