> From what I've seen TLSSessionInfo isn't available to client
interceptors.

Correct, it's only available on the service side. What you want is to
access the HttpsURLConnectionInfo Object:

https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionInfo.java;h=c43f19ac99a2bc9de747648f349a3ae88d8a994c;hb=HEAD

This contains the local + server certificates, ciphersuite, etc.
Unfortunately the methods to access the HttpsURLConnectionInfo from the
HTTPConduit are protected. One option is to implement the
MessageTrustDecider interface. See this interceptor:

https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertConstraintsInterceptor.java;h=addfc659c0d9c5879e656276a99afe264cb7c051;hb=HEAD

This installs the HttpsMessageTrustDecider where you can get access to the
HttpsURLConnectionInfo:

https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsMessageTrustDecider.java;h=726fcacfa1fb0463c4d49c399be51ed655ca4787;hb=HEAD

Colm,

On Thu, May 28, 2015 at 4:33 PM, zosoo7 <[email protected]> wrote:

> Hello all, I'm trying to find a way to list the client and server certs
> that
> were used in the SSL handshake from a CXF client. From what I've seen
> TLSSessionInfo isn't available to client interceptors. I've also been
> unable
> to get a handle on an open connection in a client interceptor. Does anybody
> have any thoughts on how to do this? Thanks.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Read-client-and-server-certs-from-client-tp5757768.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to