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

Ciphersuites are not in order #91

Open
sownaRajkumar opened this issue Mar 8, 2023 · 2 comments
Open

Ciphersuites are not in order #91

sownaRajkumar opened this issue Mar 8, 2023 · 2 comments

Comments

@sownaRajkumar
Copy link

What feature do you want to see added?

In java there is an option (jdk.tls.client.cipherSuites) to provide list of ciphersuites that should be used during client hello message. But the order of ciphers are decided by JVM. This can be overridden using the method javax.net.ssl.SSLParameters.setUseCipherSuitesOrder(boolean honorOrder). This configuration we can set only during socket connection. Since Socket creation happens at the "syslog-java-client" library, there is no option for end-user to set this up.
It would be helpful to provide option or callback function to resolve this.

Upstream changes

No response

@sownaRajkumar
Copy link
Author

Just wanted to add notes.

I was trying to fork and provide the fix, but I couldnt able to setup the environment. Below is the solution which might help.

TcpSyslogMessageSender.java

  1. Add the below line to allow user to update the SSLParameter. Add Getter and Setter to allow user the callback function
    private Function<SSLParameters, SSLParameters> userDefinedSslParams = null;

  2. Add the below lines in ensureSyslogServerConnection() method, at line#164 which is before socket connection.

             if (socket instanceof SSLSocket && userDefinedSslParams != null) {
                 SSLSocket sslSocket = (SSLSocket)socket;
                 sslSocket.setSSLParameters(userDefinedSslParams.apply(sslSocket.getSSLParameters()));
             }
    

@Poojam-murthy
Copy link

@sownaRajkumar
Can you please help on below issue
#103

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

No branches or pull requests

2 participants