-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
base: main
Are you sure you want to change the base?
Issue 354/support dynamic issuer in tls cert issuer logic #365
Conversation
@@ -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))); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
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>>>>, |
There was a problem hiding this comment.
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>>
Implements #354 for generic tls config and boring ssl acceptor.