<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 13, 2015 at 6:00 PM, Brent Putman <span dir="ltr"><<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">Ideally what we would want is for the client TLS cred to be selected
in our "usual" way: via -Configuration(s) + -Resolver, producing a
-Parameters stored in the operation context. The issue is getting
that info into the JSSE layer. The only way I can see to do that is
via a ThreadLocal approach. I'm loathe to do it, b/c I really don't
like circumventing defined interfaces like that. But it's the only
way I can see at the moment to make it work. IIRC Daniel is doing
something similar in ldaptive for (?) trust eval and
X509TrustManager?<br>
<br></div></blockquote><div><br></div><div>I was forced to use ThreadLocal for LDAPS connections in JNDI. This is due to the fact that JNDI does not provide anyway to configure an SSLSocketFactory except by providing a string that is the class name. Which is used to load the class and invoke a static method. I would avoid this strategy if at all possible. Besides the code being hard to read, all sorts of interesting bugs can arise when connections need to be reopened by a different thread.</div><div><br></div><div>--Daniel Fisher</div><div><br></div></div></div></div>