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

TLS WantClientAuth not supported (Patch) #82

Open
profhccaesar opened this issue Feb 24, 2016 · 0 comments
Open

TLS WantClientAuth not supported (Patch) #82

profhccaesar opened this issue Feb 24, 2016 · 0 comments

Comments

@profhccaesar
Copy link

SubethaSMTP currently supports only SSLSocket.setNeedClientAuth() to perform SSL client authentication.
Calling setWantClientAuth() requests a client certificate of the peer but do not insist on it; so it is possible to support clients with or without SSL authentication within the same listener.

SubethaSMTP needs only a very simple patch to allow that:

--- src/subethasmtp/org/subethamail/smtp/command/StartTLSCommand.java
+++ src/subethasmtp/org/subethamail/smtp/command/StartTLSCommand.java
@@ -63,7 +63,7 @@
            sess.resetSmtpProtocol(); // clean state
            sess.setTlsStarted(true);

-           if (s.getNeedClientAuth())
+           if (s.getNeedClientAuth() || s.getWantClientAuth())
            {
                try
                {

This patch will not have any effect as long as "setWantClientAuth()" is not called on the socket.

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

1 participant