* Fix buffer overflow in fget_token and bget_token.
* ldns-verify-zone NSEC3 checking from quadratic to linear performance.
Thanks NIC MX (nicmexico.mx)
+ * ldns-dane setup new ssl session for each new connect to prevent hangs
1.6.16 2012-11-13
* Fix Makefile to build pyldns with BSD make
}
-void
-ssl_shutdown(SSL* ssl)
-{
- while (SSL_shutdown(ssl) == 0);
-}
-
ldns_rr_list*
rr_list_filter_rr_type(ldns_rr_list* l, ldns_rr_type t)
{
SSL_CTX_use_certificate_chain_file(ctx, cert_file) != 1) {
ssl_err("error loading certificate");
}
- ssl = SSL_new(ctx);
- if (! ssl) {
- ssl_err("could not SSL_new");
- }
if (cert_file) { /* ssl load certificate */
+ ssl = SSL_new(ctx);
+ if (! ssl) {
+ ssl_err("could not SSL_new");
+ }
cert = SSL_get_certificate(ssl);
if (! cert) {
ssl_err("could not SSL_get_certificate");
break;
default: break; /* suppress warning */
}
+ SSL_free(ssl);
} else {/* No certificate file given, creation/validation via TLS. */
/* for all addresses, setup SSL and retrieve certificates */
for (i = 0; i < ldns_rr_list_rr_count(addresses); i++) {
+ ssl = SSL_new(ctx);
+ if (! ssl) {
+ ssl_err("could not SSL_new");
+ }
address = ldns_rr_a_address(
ldns_rr_list_rr(addresses, i));
assert(address != NULL);
break;
default: break; /* suppress warning */
}
- ssl_shutdown(ssl);
+ while (SSL_shutdown(ssl) == 0);
+ SSL_free(ssl);
} /* end for all addresses */
} /* end No certification file */
ldns_rr_list_deep_free(tlsas);
/* cleanup */
- SSL_free(ssl);
SSL_CTX_free(ctx);
if (store) {