public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static X509Certificate[] getCertsFromConnection(RemotingConnection remotingConnection) { X509Certificate[] certificates = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { certificates = org.apache.activemq.artemis.utils.CertificateUtil.getCertsFromChannel(((NettyConnection) transportConnection).getChannel()); } } return certificates; }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
public static Principal getPeerPrincipalFromConnection(RemotingConnection remotingConnection) { Principal result = null; if (remotingConnection != null) { Connection transportConnection = remotingConnection.getTransportConnection(); if (transportConnection instanceof NettyConnection) { NettyConnection nettyConnection = (NettyConnection) transportConnection; ChannelHandler channelHandler = nettyConnection.getChannel().pipeline().get("ssl"); if (channelHandler != null && channelHandler instanceof SslHandler) { SslHandler sslHandler = (SslHandler) channelHandler; try { result = sslHandler.engine().getSession().getPeerPrincipal(); } catch (SSLPeerUnverifiedException ignored) { } } } } return result; } }
@Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { try { if (connection.getTransportConnection() instanceof NettyConnection) { System.out.println("Passed through...."); NettyConnection nettyConnection = (NettyConnection) connection.getTransportConnection(); SslHandler sslHandler = (SslHandler) nettyConnection.getChannel().pipeline().get("ssl"); Assert.assertNotNull(sslHandler); Assert.assertNotNull(sslHandler.engine().getSession()); Assert.assertNotNull(sslHandler.engine().getSession().getPeerCertificateChain()); } } catch (SSLPeerUnverifiedException e) { Assert.fail(e.getMessage()); } } return true; } }
@Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { try { if (connection.getTransportConnection() instanceof NettyConnection) { System.out.println("Passed through...."); NettyConnection nettyConnection = (NettyConnection) connection.getTransportConnection(); SslHandler sslHandler = (SslHandler) nettyConnection.getChannel().pipeline().get("ssl"); Assert.assertNotNull(sslHandler); Assert.assertNotNull(sslHandler.engine().getSession()); Assert.assertNotNull(sslHandler.engine().getSession().getPeerCertificateChain()); } } catch (SSLPeerUnverifiedException e) { Assert.fail(e.getMessage()); } } return true; } }
@Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { try { if (connection.getTransportConnection() instanceof NettyConnection) { System.out.println("Passed through...."); NettyConnection nettyConnection = (NettyConnection) connection.getTransportConnection(); SslHandler sslHandler = (SslHandler) nettyConnection.getChannel().pipeline().get("ssl"); Assert.assertNotNull(sslHandler); Assert.assertNotNull(sslHandler.engine().getSession()); Assert.assertNotNull(sslHandler.engine().getSession().getPeerCertificateChain()); } } catch (SSLPeerUnverifiedException e) { Assert.fail(e.getMessage()); } } return true; } }