Lines Matching defs:certs
225 * other (CA) certs. Note either ca should be NULL, *ca should be NULL,
233 * matchty - Info about which certs/keys to return if many are in the file.
243 * authority' certs/trust anchors.
246 * and/or 'name_str', as appropriate. Go through the lists of certs and
260 * Append to the CA list, the certs which do not have matching private
263 * If none of the bits are set, no client certs or private keys will be
264 * returned. CA (aka trust anchor) certs can be.
266 * Notes: If #3 is selected, then #4 will never occur. CA certs will be
357 * Parse and decrypt a PEM file, returning any user keys and certs.
373 * certs - Points to address of a stack of client certs to return.
380 * Note: Client certs and and their matching private keys will be in any
383 * Certs which have no matching private key are assumed to be ca certs.
392 STACK_OF(EVP_PKEY) **pkey, STACK_OF(X509) **certs)
400 * ca certs.
418 retval = set_results(pkey, &work_kl, certs, &work_ca, NULL, NULL, NULL,
436 * various certs. Note these should either be NULL, *whatever should
444 * certs - Points to address of a stack of client certs return.
446 * Note: The certs and keys being returned are in random order.
456 STACK_OF(X509) **certs)
464 * ca certs.
484 retval = set_results(pkey, &work_kl, certs, &work_ca, NULL,
498 * sunw_split_certs() - Given a list of certs and a list of private keys,
499 * moves certs which match one of the keys to a different stack.
503 * allcerts - Points to a stack of certs to be searched.
504 * keycerts - Points to address of a stack of certs with matching private
509 * certs. Keys are moved from 'allkeys' here when they have no
510 * matching certs. If this is NULL, matchless keys will be
513 * Notes: If an error occurs while moving certs, the cert being move may be
514 * lost. 'keycerts' may only contain part of the matching certs. The number
515 * of certs successfully moved can be found by checking sk_X509_num(keycerts).
520 * If all certs are removed from 'certs' and/or 'pkeys', it will be the
526 * >= 0 - The number of certs moved from 'cert' to 'pkcerts'.
616 * Given one or more of user private key, user cert and/or other (CA) certs,
625 * certs - Points to stack of client (public ke) certs
626 * cacerts - Points to stack of 'certificate authority' certs (or trust
638 STACK_OF(X509) *certs, STACK_OF(X509) *cacerts)
667 if (certs != NULL && sk_X509_num(certs) > 0) {
669 for (i = 0; i < sk_X509_num(certs); i++) {
670 cert = sk_X509_value(certs, i);
718 /* Put all certs in structure */
765 if (certs != NULL || cacerts != NULL && certs_there) {
1160 * sunw_find_localkeyid() searches stacks of certs and private keys,
1163 * Look for a keyid in a stack of certs. if 'certs' is NULL and 'pkeys' is
1171 * pkeys - Points to a stack of private keys which match the certs.
1173 * certs - Points to a stack of certs to search. If NULL, search the
1192 STACK_OF(X509) *certs, EVP_PKEY **matching_pkey, X509 **matching_cert)
1201 (pkeys == NULL || certs == NULL) ||
1203 (certs != NULL && matching_cert == NULL)) {
1220 retval = find_attr(NID_localKeyID, cmpstr, pkeys, &tmp_pkey, certs,
1236 * sunw_find_fname() searches stacks of certs and private keys for one with
1240 * Look for a friendlyname in a stack of certs. if 'certs' is NULL and 'pkeys'
1247 * pkeys - Points to a stack of private keys which match the certs.
1249 * certs - Points to a stack of certs to search. If NULL, search the
1263 sunw_find_fname(char *fname, STACK_OF(EVP_PKEY) *pkeys, STACK_OF(X509) *certs,
1273 (pkeys == NULL && certs == NULL) ||
1275 (certs != NULL && matching_cert == NULL)) {
1293 retval = find_attr(NID_friendlyName, cmpstr, pkeys, &tmp_pkey, certs,
1516 * matchty - Info about which certs/keys to return if many are in the file.
1526 * authority' certs/trust anchors.
1571 * Go through the lists of certs and private keys which were
1628 * them. Since keys which don't have matching client certs
1630 * client certs to compute the position of the last private
1698 * individual bags. Return stacks of certs, private keys found and
1699 * CA certs found.
1707 * 1 - PKCS12 data object was parsed and lists of certs and private keys
1762 * 1 - Stack of safebags was parsed and lists of certs and private keys
1788 * cl - Stack of certs found so far. New certificates will be
1795 * was added to the stack of certs or private keys found, respectively.
2022 * certs). Other interfaces that read files require that the application
2033 STACK_OF(EVP_PKEY) **pkeys, STACK_OF(X509) **certs)
2148 retval = set_results(pkeys, &work_kl, certs, &work_cl, NULL, NULL,
2196 * move_certs - Given two stacks of certs, remove the certs from
2200 * dst - the stack to receive the certs from 'src'
2201 * src - the stack whose certs are to be moved.
2205 * >= 0 - The number of certs that were copied.
2227 * get_key_cert - Get a cert and its matching key from the stacks of certs
2233 * certs below.
2236 * cl - Points to a stack of client certs with matching private keys.
2240 * The assumption is that the stacks of keys and certs contain key/cert pairs,
2245 * A stack of certs can be passed in without a stack of private keys, and vise
2560 * cl - Points to a stack of client certs with matching private keys.
2564 * This function is designed to process lists of certs and private keys.
2566 * for certs and for keys. For certs, only a few attributes are retained.
2572 * - If there there is no stack of certs but a stack of private keys exists,
2574 * of certs and no private keys, search the certs.
2576 * - If there are both certs and keys, assume that the matching certs and
2578 * order. Search for the name or keyid in the stack of certs. If it is
2670 * lists of certs and their matching pkeys are in the same
2705 * set_results - Given two pointers to stacks of private keys, certs or CA
2706 * CA certs, either copy the second stack to the first, or append the
2712 * certs - Points to stack of certs
2713 * work_cl - Points to working stack of certs
2714 * cacerts - Points to stack of CA certs
2715 * work_ca - Points to working stack of CA certs
2720 * of keys or certs. The second of the pair points at a 'working stack'
2740 STACK_OF(X509) **certs, STACK_OF(X509) **work_cl,
2758 if (certs != NULL && work_cl != NULL && *work_cl != NULL &&
2760 if (*certs == NULL) {
2761 *certs = *work_cl;
2764 if (move_certs(*certs, *work_cl) < 0) {