Lines Matching defs:child

2122 static int x509_crt_check_signature(const mbedtls_x509_crt *child,
2130 md_info = mbedtls_md_info_from_type(child->sig_md);
2134 if (mbedtls_md(md_info, child->tbs.p, child->tbs.len, hash) != 0) {
2138 psa_algorithm_t hash_alg = mbedtls_md_psa_alg_from_type(child->sig_md);
2142 child->tbs.p,
2143 child->tbs.len,
2153 if (!mbedtls_pk_can_do(&parent->pk, child->sig_pk)) {
2158 if (rs_ctx != NULL && child->sig_pk == MBEDTLS_PK_ECDSA) {
2160 child->sig_md, hash, hash_len,
2161 child->sig.p, child->sig.len, &rs_ctx->pk);
2167 return mbedtls_pk_verify_ext(child->sig_pk, child->sig_opts, &parent->pk,
2168 child->sig_md, hash, hash_len,
2169 child->sig.p, child->sig.len);
2173 * Check if 'parent' is a suitable parent (signing CA) for 'child'.
2178 static int x509_crt_check_parent(const mbedtls_x509_crt *child,
2185 if (x509_name_cmp(&child->issuer, &parent->subject) != 0) {
2210 * Find a suitable parent for child in candidates, or return NULL.
2213 * 1. subject name matches child's issuer
2237 * - [in] child: certificate for which we're looking for a parent
2240 * - [out] r_signature_is_good: 1 if child signature by parent is valid, or 0
2253 mbedtls_x509_crt *child,
2290 if (x509_crt_check_parent(child, parent, top) != 0) {
2304 ret = x509_crt_check_signature(child, parent, rs_ctx);
2360 * - [in] child: certificate for which we're looking for a parent, followed
2365 * - [out] signature_is_good: 1 if child signature by parent is valid, or 0
2366 * - [in] path_cnt: number of links in the chain so far (EE -> ... -> child)
2376 mbedtls_x509_crt *child,
2400 search_list = *parent_is_trusted ? trust_ca : child->next;
2402 ret = x509_crt_find_parent_in(child, search_list,
2470 * such that every cert in the chain is a child of the next one,
2519 mbedtls_x509_crt *child;
2543 child = cur->crt;
2550 child = crt;
2558 cur->crt = child;
2565 if (mbedtls_x509_time_cmp(&child->valid_to, &now) < 0) {
2569 if (mbedtls_x509_time_cmp(&child->valid_from, &now) > 0) {
2580 if (x509_profile_check_md_alg(profile, child->sig_md) != 0) {
2584 if (x509_profile_check_pk_alg(profile, child->sig_pk) != 0) {
2590 x509_crt_check_ee_locally_trusted(child, trust_ca) == 0) {
2606 ret = f_ca_cb(p_ca_cb, child, &ver_chain->trust_ca_cb_result);
2621 ret = x509_crt_find_parent(child, cur_trust_ca, &parent,
2649 x509_name_cmp(&child->issuer, &child->subject) == 0) {
2673 *flags |= x509_crt_verifycrl(child, parent, ca_crl, profile, &now);
2679 child = parent;