Lines Matching refs:dane
170 static void dane_final(SSL_DANE *dane)
172 sk_danetls_record_pop_free(dane->trecs, tlsa_free);
173 dane->trecs = NULL;
175 sk_X509_pop_free(dane->certs, X509_free);
176 dane->certs = NULL;
178 X509_free(dane->mcert);
179 dane->mcert = NULL;
180 dane->mtlsa = NULL;
181 dane->mdpth = -1;
182 dane->pdpth = -1;
186 * dane_copy - Copy dane configuration, sans verification state.
193 if (!DANETLS_ENABLED(&from->dane))
196 num = sk_danetls_record_num(from->dane.trecs);
197 dane_final(&to->dane);
198 to->dane.flags = from->dane.flags;
199 to->dane.dctx = &to->ctx->dane;
200 to->dane.trecs = sk_danetls_record_new_reserve(NULL, num);
202 if (to->dane.trecs == NULL) {
208 danetls_record *t = sk_danetls_record_value(from->dane.trecs, i);
262 static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)
264 if (mtype > dane->dctx->mdmax)
266 return dane->dctx->mdevp[mtype];
269 static int dane_tlsa_add(SSL_DANE *dane,
280 if (dane->trecs == NULL) {
301 md = tlsa_md_get(dane, mtype);
369 if ((dane->certs == NULL &&
370 (dane->certs = sk_X509_new_null()) == NULL) ||
371 !sk_X509_push(dane->certs, cert)) {
415 num = sk_danetls_record_num(dane->trecs);
417 danetls_record *rec = sk_danetls_record_value(dane->trecs, i);
427 if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype])
432 if (!sk_danetls_record_insert(dane->trecs, t, i)) {
437 dane->umask |= DANETLS_USAGE_BIT(usage);
618 s->dane.mdpth = -1;
619 s->dane.pdpth = -1;
620 X509_free(s->dane.mcert);
621 s->dane.mcert = NULL;
622 s->dane.mtlsa = NULL;
704 s->dane.flags = ctx->dane.flags;
1019 return dane_ctx_enable(&ctx->dane);
1024 unsigned long orig = ctx->dane.flags;
1026 ctx->dane.flags |= flags;
1032 unsigned long orig = ctx->dane.flags;
1034 ctx->dane.flags &= ~flags;
1040 SSL_DANE *dane = &s->dane;
1042 if (s->ctx->dane.mdmax == 0) {
1046 if (dane->trecs != NULL) {
1069 dane->mdpth = -1;
1070 dane->pdpth = -1;
1071 dane->dctx = &s->ctx->dane;
1072 dane->trecs = sk_danetls_record_new_null();
1074 if (dane->trecs == NULL) {
1083 unsigned long orig = ssl->dane.flags;
1085 ssl->dane.flags |= flags;
1091 unsigned long orig = ssl->dane.flags;
1093 ssl->dane.flags &= ~flags;
1099 SSL_DANE *dane = &s->dane;
1101 if (!DANETLS_ENABLED(dane) || s->verify_result != X509_V_OK)
1103 if (dane->mtlsa) {
1105 *mcert = dane->mcert;
1107 *mspki = (dane->mcert == NULL) ? dane->mtlsa->spki : NULL;
1109 return dane->mdpth;
1115 SSL_DANE *dane = &s->dane;
1117 if (!DANETLS_ENABLED(dane) || s->verify_result != X509_V_OK)
1119 if (dane->mtlsa) {
1121 *usage = dane->mtlsa->usage;
1123 *selector = dane->mtlsa->selector;
1125 *mtype = dane->mtlsa->mtype;
1127 *data = dane->mtlsa->data;
1129 *dlen = dane->mtlsa->dlen;
1131 return dane->mdpth;
1136 return &s->dane;
1142 return dane_tlsa_add(&s->dane, usage, selector, mtype, data, dlen);
1148 return dane_mtype_set(&ctx->dane, md, mtype, ord);
1189 dane_final(&s->dane);
3465 dane_ctx_final(&a->dane);
5231 SSL_DANE *dane = &s->dane;
5255 if (DANETLS_ENABLED(dane) && dane->mtlsa != NULL) {
5256 switch (dane->mtlsa->usage) {