[PR #619] [MERGED] Reuse Rustls ClientConfig #1558

Closed
opened 2026-03-16 02:13:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/619
Author: @sticnarf
Created: 11/18/2018
Status: Merged
Merged: 11/19/2018
Merged by: @bluejekyll

Base: masterHead: reuse-rustls-client-config


📝 Commits (6)

  • 1add0ac Change TlsStreamBuilder to own an Arc and remove its add_ca function.
  • aab3dab Reuse ClientConfig in the resolver
  • 803064d Fix tests
  • dd94f39 Remove useless rustls::Certificate uses
  • 1487262 Fix integration tests
  • ec9c073 Remove TLS builders

📊 Changes

8 files changed (+156 additions, -255 deletions)

View changed files

📝 crates/resolver/src/tls/dns_over_rustls.rs (+18 -12)
📝 crates/rustls/src/lib.rs (+2 -2)
📝 crates/rustls/src/tests.rs (+6 -5)
📝 crates/rustls/src/tls_client_stream.rs (+28 -61)
📝 crates/rustls/src/tls_stream.rs (+69 -113)
📝 crates/server/tests/z_named_rustls_tests.rs (+10 -8)
📝 tests/integration-tests/src/tls_client_connection.rs (+19 -49)
📝 tests/integration-tests/tests/server_future_tests.rs (+4 -5)

📄 Description

Based on the discussions in #618

Since we cannot add CAs via TlsStreamBuilder and a TlsStream without any CA is unusable, I also remove the empty constructor of TlsStreamBuilder.

The new_tls_stream function in the resolver crate is also changed to reuse the ClientConfig.

Should we place any warnings somewhere as it breaks the API?

Closes #618


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/619 **Author:** [@sticnarf](https://github.com/sticnarf) **Created:** 11/18/2018 **Status:** ✅ Merged **Merged:** 11/19/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `reuse-rustls-client-config` --- ### 📝 Commits (6) - [`1add0ac`](https://github.com/hickory-dns/hickory-dns/commit/1add0ac5a7984ea3693045ebfe6b5e423f16fe37) Change TlsStreamBuilder to own an Arc<ClientConfig> and remove its add_ca function. - [`aab3dab`](https://github.com/hickory-dns/hickory-dns/commit/aab3dab49664c2fe6551fd48980f4206c8e3a93d) Reuse ClientConfig in the resolver - [`803064d`](https://github.com/hickory-dns/hickory-dns/commit/803064dc797f69908fb77e44af8d9f8211f3571b) Fix tests - [`dd94f39`](https://github.com/hickory-dns/hickory-dns/commit/dd94f39c9942c662e78c49f2ff966c2daa528c1b) Remove useless rustls::Certificate uses - [`1487262`](https://github.com/hickory-dns/hickory-dns/commit/14872624a1b1694a13bfd03ae0789e23e6e2b772) Fix integration tests - [`ec9c073`](https://github.com/hickory-dns/hickory-dns/commit/ec9c0736a4af95f418cf2607a889eb74348d1dfd) Remove TLS builders ### 📊 Changes **8 files changed** (+156 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/tls/dns_over_rustls.rs` (+18 -12) 📝 `crates/rustls/src/lib.rs` (+2 -2) 📝 `crates/rustls/src/tests.rs` (+6 -5) 📝 `crates/rustls/src/tls_client_stream.rs` (+28 -61) 📝 `crates/rustls/src/tls_stream.rs` (+69 -113) 📝 `crates/server/tests/z_named_rustls_tests.rs` (+10 -8) 📝 `tests/integration-tests/src/tls_client_connection.rs` (+19 -49) 📝 `tests/integration-tests/tests/server_future_tests.rs` (+4 -5) </details> ### 📄 Description Based on the discussions in #618 Since we cannot add CAs via `TlsStreamBuilder` and a `TlsStream` without any CA is unusable, I also remove the empty constructor of `TlsStreamBuilder`. The `new_tls_stream` function in the `resolver` crate is also changed to reuse the `ClientConfig`. Should we place any warnings somewhere as it breaks the API? Closes #618 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:13:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1558
No description provided.