Lines Matching refs:ta

40 certificate_to_trust_anchor_inner(br_x509_trust_anchor *ta,  in certificate_to_trust_anchor_inner()  argument
56 ta->dn.data = VEC_TOARRAY(vdn); in certificate_to_trust_anchor_inner()
57 ta->dn.len = VEC_LEN(vdn); in certificate_to_trust_anchor_inner()
59 ta->flags = 0; in certificate_to_trust_anchor_inner()
61 ta->flags |= BR_X509_TA_CA; in certificate_to_trust_anchor_inner()
65 ta->pkey.key_type = BR_KEYTYPE_RSA; in certificate_to_trust_anchor_inner()
66 ta->pkey.key.rsa.n = xblobdup(pk->key.rsa.n, pk->key.rsa.nlen); in certificate_to_trust_anchor_inner()
67 ta->pkey.key.rsa.nlen = pk->key.rsa.nlen; in certificate_to_trust_anchor_inner()
68 ta->pkey.key.rsa.e = xblobdup(pk->key.rsa.e, pk->key.rsa.elen); in certificate_to_trust_anchor_inner()
69 ta->pkey.key.rsa.elen = pk->key.rsa.elen; in certificate_to_trust_anchor_inner()
72 ta->pkey.key_type = BR_KEYTYPE_EC; in certificate_to_trust_anchor_inner()
73 ta->pkey.key.ec.curve = pk->key.ec.curve; in certificate_to_trust_anchor_inner()
74 ta->pkey.key.ec.q = xblobdup(pk->key.ec.q, pk->key.ec.qlen); in certificate_to_trust_anchor_inner()
75 ta->pkey.key.ec.qlen = pk->key.ec.qlen; in certificate_to_trust_anchor_inner()
79 xfree(ta->dn.data); in certificate_to_trust_anchor_inner()
89 br_x509_trust_anchor ta; in certificate_to_trust_anchor() local
91 if (certificate_to_trust_anchor_inner(&ta, xc) < 0) { in certificate_to_trust_anchor()
94 return xblobdup(&ta, sizeof ta); in certificate_to_trust_anchor()
100 free_ta_contents(br_x509_trust_anchor *ta) in free_ta_contents() argument
102 xfree(ta->dn.data); in free_ta_contents()
103 switch (ta->pkey.key_type) { in free_ta_contents()
105 xfree(ta->pkey.key.rsa.n); in free_ta_contents()
106 xfree(ta->pkey.key.rsa.e); in free_ta_contents()
109 xfree(ta->pkey.key.ec.q); in free_ta_contents()
127 br_x509_trust_anchor ta; in read_trust_anchors() local
129 if (certificate_to_trust_anchor_inner(&ta, &xcs[u]) < 0) { in read_trust_anchors()
134 VEC_ADD(tas, ta); in read_trust_anchors()