*/
private X509Certificate getClientCert(ServerRequestInfo ri)
{
ServerRequest request = ((ServerRequestInfoImpl) ri).request;
GIOPConnection connection = request.getConnection();
// lookup for context
if (connection == null)
{
if (logger.isWarnEnabled())
logger.warn("target has no connection!");
return null;
}
if( !connection.isSSL() )
{
return null;
}
ServerIIOPConnection transport =
(ServerIIOPConnection) connection.getTransport();
SSLSocket sslSocket = (SSLSocket) transport.getSocket();
try
{
return (X509Certificate)sslSocket.getSession().getPeerCertificates()[0];