Commit f83d604a authored by Dave Cridland's avatar Dave Cridland

Merge pull request #567 from guusdk/OF-1118

OF-1118: Don't try to use unsupported encryption settings.
parents 157b1c0b b6c5ce4d
......@@ -767,7 +767,6 @@ public class ConnectionListener
*
* @return An (ordered) set of protocols, never null but possibly empty.
*/
// TODO add setter!
public Set<String> getEncryptionProtocols()
{
final Set<String> result = new LinkedHashSet<>();
......@@ -781,6 +780,14 @@ public class ConnectionListener
} else {
result.addAll( Arrays.asList( csv.split( "\\s*,\\s*" ) ) );
}
// OF-1118: Do not return protocols that are not supported by the implementation.
try {
result.retainAll( EncryptionArtifactFactory.getSupportedProtocols() );
} catch ( Exception ex ) {
Log.error( "An error occurred while obtaining the supported encryption protocols.", ex );
}
return result;
}
......@@ -880,6 +887,14 @@ public class ConnectionListener
} else {
result.addAll( Arrays.asList( csv.split( "\\s*,\\s*" ) ) );
}
// OF-1118: Do not return cipher suites that are not supported by the implementation.
try {
result.retainAll( EncryptionArtifactFactory.getSupportedCipherSuites() );
} catch ( Exception ex ) {
Log.warn( "An error occurred while obtaining the supported encryption cipher suites.", ex );
}
return result;
}
......
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