I am trying to configure custom security provider in Java. I would like to verify that SSL connections are handled by this new security provider (connections are created by accepting new connection from server socket created by default ssl socket factory). My problem is that I cannot find out how to get security provider associated with given SSLSocket.
There is provider accessible through SSLContext class, but I cannot get SSLContext from SSLSocket.
Maybe there is a better way how I can verify that?
Since the default
SSLSocketFactorywill use the defaultSSLContext, you can useSSLContext.getDefault().getProvider().Since
(SSL)Socketinstances are not necessarily created by a(SSL)SocketFactory, they provide no public API to access the factory, from which they may have been created.