Commit 4bf813b9 authored by Dave Cridland's avatar Dave Cridland Committed by GitHub

Merge pull request #745 from akrherz/of1282

OF-1282 properly handle setting TLS_CERTIFICATE_VERIFY of false
parents 89546906 91c02134
...@@ -331,13 +331,16 @@ public class SASLAuthentication { ...@@ -331,13 +331,16 @@ public class SASLAuthentication {
{ {
// Flag that indicates if certificates of the remote server should be validated. // Flag that indicates if certificates of the remote server should be validated.
final boolean verify = JiveGlobals.getBooleanProperty( ConnectionSettings.Server.TLS_CERTIFICATE_VERIFY, true ); final boolean verify = JiveGlobals.getBooleanProperty( ConnectionSettings.Server.TLS_CERTIFICATE_VERIFY, true );
if ( verify && verifyCertificates( session.getConnection().getPeerCertificates(), saslServer.getAuthorizationID(), true ) ) if ( verify )
{ {
( (LocalIncomingServerSession) session ).tlsAuth(); if ( verifyCertificates( session.getConnection().getPeerCertificates(), saslServer.getAuthorizationID(), true ) )
} {
else ( (LocalIncomingServerSession) session ).tlsAuth();
{ }
throw new SaslFailureException( Failure.NOT_AUTHORIZED, "Server-to-Server certificate verification failed." ); else
{
throw new SaslFailureException( Failure.NOT_AUTHORIZED, "Server-to-Server certificate verification failed." );
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment