Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 354/support dynamic issuer in tls cert issuer logic #365

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

soundofspace
Copy link
Collaborator

@soundofspace soundofspace commented Dec 17, 2024

Implements #354 for generic tls config and boring ssl acceptor.

@soundofspace soundofspace marked this pull request as ready for review January 12, 2025 14:33
examples/tls_boring_dynamic_certs.rs Outdated Show resolved Hide resolved
examples/tls_boring_dynamic_certs.rs Show resolved Hide resolved
examples/tls_boring_dynamic_certs.rs Outdated Show resolved Hide resolved
rama-net/src/tls/server/config.rs Outdated Show resolved Hide resolved
rama-net/src/tls/server/config.rs Outdated Show resolved Hide resolved
rama-net/src/tls/server/config.rs Show resolved Hide resolved
rama-net/src/tls/server/config.rs Outdated Show resolved Hide resolved
rama-net/src/tls/server/config.rs Outdated Show resolved Hide resolved
@@ -99,10 +99,14 @@ where
})
.or_else(|| ctx.get::<RequestContext>().map(|ctx| ctx.authority.host()));

let mut maybe_client_hello = self
.store_client_hello
.then_some(Arc::new(Mutex::new(None)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you go for an arc-mutex instead of a oneshot channel? Is it ever expected then to be set more then once? You can only do one successful handshake for a single conn, or am I missing something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly because this logic was ported from the old approach, which used arc for this. Will check if a oneshot channel makes more sense, but will need to confirm this as some of these callbacks can be called multiple times (but pretty sure that the ones we currently use are only called once)

@GlenDC
Copy link
Member

GlenDC commented Jan 12, 2025

Not ready yet still needs some cleanup all over the place

Is this still the case, or out of date PR description @soundofspace ?

@@ -83,13 +89,11 @@ impl TlsCertSource {
self,
mut builder: SslAcceptorBuilder,
server_name: Option<Host>,
maybe_client_hello: &Option<Arc<Mutex<Option<RamaClientHello>>>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be maybe_client_hello: Option<oneshot::Sender<RamaClientHello>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants