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

ClientAuthType.DisabledAll should only control local cert validation #157

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.  Set TLS_CLIENT_AUTH_TYPE=DisabledAll to disable cert validation on a sip app
2.  Configure the app with keystore containing valid certificate and key. 
3.  Leave cert validation enabled on remote peer.
4.  Test mutual TLS between the two.

What is the expected output? What do you see instead?
Expect certificate validation at the remote peer to fail or succeed based only 
on the validity of certificate provided in step 2.  Instead, validation fails 
at remote peer due to "null certificate chain".

What version of the product are you using? On what operating system?
1.2.231

Please provide any additional information below.
In SslNetworkLayer.java, ClientAuthType.DisabledAll appears to assume the 
remote peer will also be set to DisabledAll.  Instead, it should only impact 
local cert validation decisions and allow the remote peer config to do its own 
thing.

--- a/src/gov/nist/core/net/SslNetworkLayer.java
+++ b/src/gov/nist/core/net/SslNetworkLayer.java
@@ -122,7 +122,7 @@ public class SslNetworkLayer implements NetworkLayer {
                 logger.logDebug(
                         "ClientAuth " + sipStack.getClientAuth()  +  " bypassing all cert validations");
             }
-               sslContext.init(null, trustAllCerts, secureRandom);
+               sslContext.init(kmFactory.getKeyManagers(), trustAllCerts, 
secureRandom);^M
         } else {
                if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
                 logger.logDebug(

Original issue reported on code.google.com by [email protected] on 10 Mar 2015 at 1:40

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

1 participant