Class TLSSessionInfo


  • public class TLSSessionInfo
    extends java.lang.Object
    Used by both the server and the TPC client to determine when TLS should be activated. Automatically adds the SSLHandler to the pipeline when activate is true.
    • Constructor Detail

      • TLSSessionInfo

        public TLSSessionInfo​(TLSSessionInfo other)
        Parameters:
        other - to clone from
    • Method Detail

      • isTLSOn

        public static boolean isTLSOn​(io.netty.channel.ChannelHandlerContext ctx)
      • clientTransitionedToTLS

        public boolean clientTransitionedToTLS​(int request,
                                               io.netty.channel.ChannelHandlerContext ctx)
                                        throws XrootdException
        This method should be called by the TPC client before the relevant requests.
        Parameters:
        request - to be sent to the remote server.
        ctx - for access to pipeline.
        Returns:
        whether the SSLHandler was added the pipeline.
        Throws:
        XrootdException
      • clientUsesTls

        public boolean clientUsesTls()
      • createClientSession

        public void createClientSession​(boolean isTls)
      • isIncomingClientTLSCapable

        public boolean isIncomingClientTLSCapable()
      • setSourceServerFlags

        public void setSourceServerFlags​(int sourceServerFlags)
        Called by the TPC client.
        Parameters:
        sourceServerFlags - from the protocol response
      • getClientFlags

        public int[] getClientFlags()
      • getClientTls

        public java.lang.String getClientTls()
      • serverTransitionedToTLS

        public boolean serverTransitionedToTLS​(int request,
                                               io.netty.channel.ChannelHandlerContext ctx)
                                        throws XrootdException
        This method should be called by the server during the response to the relevant requests.
        Parameters:
        request - to which the server is responding.
        ctx - for access to pipeline.
        Returns:
        whether the SSLHandler was added the pipeline.
        Throws:
        XrootdException
      • serverUsesTls

        public boolean serverUsesTls()
      • setClientSslHandlerFactory

        public void setClientSslHandlerFactory​(SSLHandlerFactory sslHandlerFactory)
      • setLocalTlsActivation

        public void setLocalTlsActivation​(int version,
                                          int clientOptions,
                                          int clientExpect)
                                   throws XrootdException
        Used by the server side to determine response to client, depending on its own configuration and the client flags. This is called during the protocol request-response phase.
        Parameters:
        clientOptions - whether it supports or requests TLS.
        clientExpect - what the next request will be (optional).
        Throws:
        XrootdException
      • setServerSslHandlerFactory

        public void setServerSslHandlerFactory​(SSLHandlerFactory serverSslHandlerFactory)