Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reuse TCP-TLS session? #66

Open
Poojam-murthy opened this issue Jul 3, 2022 · 5 comments
Open

How to reuse TCP-TLS session? #66

Poojam-murthy opened this issue Jul 3, 2022 · 5 comments

Comments

@Poojam-murthy
Copy link

Poojam-murthy commented Jul 3, 2022

` We are creating the context and setting to TCPSyslogMessageSender object, How to reuse the session and port number in TCP-TLS communication using Cloudbees- TcpSyslogMessageSender. Will it be handled by Cloudbees or we have to configure any settings explicitly. Here is our code. With this code, it is using a new port everytime.

TcpSyslogMessageSender messageSendertcp = new TcpSyslogMessageSender();
messageSendertcp.setSyslogServerHostname("localhost");
messageSendertcp.setSyslogServerPort("6514");
messageSendertcp.setMessageFormat(MessageFormat.RFC_5425);
messageSendertcp.setDefaultMessageHostname(this.getHostName());
messageSendertcp.setDefaultAppName("test");
messageSendertcp.setDefaultFacility("local0"));
messageSendertcp.setDefaultSeverity("notice");
logger.info("entering getsslcontext");
SSLContext context = getSSLContext(); //SSLContext is formed using client keystore and trustores
logger.info("context object");
messageSendertcp.setSSLContext(context);
messageSendertcp.setSsl(true);
}
try {

            logger.info("sending message tcp");
            messageSendertcp.sendMessage(syslogMessage);
        
        } catch (IOException e) {
        return false;
        } finally {
            try {
                if (messageSendertcp != null)
                    messageSendertcp.close();
            } catch (IOException e) {
                return false;
            }
        } `
@Poojam-murthy
Copy link
Author

Hi @cyrille-leclerc, can you please provide solution to the above query?

@Poojam-murthy
Copy link
Author

Hi @cyrille-leclerc, any update on the above query?

@cyrille-leclerc
Copy link
Contributor

@Poojam-murthy I'm sorry but I'm no longer active on this project, I no longer have the bandwidth to contribute.

@Poojam-murthy
Copy link
Author

Hi @cowboyd /@lucaspanjer can anybody update on the query?

@Poojam-murthy
Copy link
Author

Hi @cowboyd /@lucaspanjer, any update on the above question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants