Details
-
Bug
-
Resolution: Done
-
Trivial - P5
-
None
-
None
Description
The exception message suggests to set sslInvalidHostNameAllowed property to false when using java 1.6 while the code is checking for the opposite condition in https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/connection/SslSettings.java#L124
:
SslSettings(final Builder builder) { |
enabled = builder.enabled;
|
invalidHostNameAllowed = builder.invalidHostNameAllowed;
|
if (enabled && !invalidHostNameAllowed) { |
if (System.getProperty("java.version").startsWith("1.6.")) { |
throw new MongoInternalException("By default, SSL connections are only supported on Java 7 or later. If the application " |
+ "must run on Java 6, you must set the SslSettings.invalidHostNameAllowed property to " |
+ "false"); |
}
|
}
|
}
|