Skip to content

Commit

Permalink
Fixed SSL being turned off in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
injectives committed Mar 17, 2021
1 parent b98b697 commit adaa5b4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@
import java.net.URI;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

import org.neo4j.driver.AuthToken;
import org.neo4j.driver.AuthTokens;
import org.neo4j.driver.Config;
import org.neo4j.driver.Logging;
import org.neo4j.driver.internal.DefaultDomainNameResolver;
import org.neo4j.driver.internal.DomainNameResolver;
import org.neo4j.driver.internal.DriverFactory;
import org.neo4j.driver.internal.SecuritySettings;
import org.neo4j.driver.internal.cluster.RoutingSettings;
import org.neo4j.driver.internal.retry.RetrySettings;
import org.neo4j.driver.internal.security.SecurityPlanImpl;
import org.neo4j.driver.internal.security.SecurityPlan;
import org.neo4j.driver.net.ServerAddressResolver;

@Setter
Expand Down Expand Up @@ -129,8 +132,11 @@ private org.neo4j.driver.Driver driver( URI uri, AuthToken authToken, Config con
{
RoutingSettings routingSettings = RoutingSettings.DEFAULT;
RetrySettings retrySettings = RetrySettings.DEFAULT;
SecuritySettings.SecuritySettingsBuilder securitySettingsBuilder = new SecuritySettings.SecuritySettingsBuilder();
SecuritySettings securitySettings = securitySettingsBuilder.build();
SecurityPlan securityPlan = securitySettings.createSecurityPlan( uri.getScheme() );
return new DriverFactoryWithDomainNameResolver( domainNameResolver )
.newInstance( uri, authToken, routingSettings, retrySettings, config, SecurityPlanImpl.insecure() );
.newInstance( uri, authToken, routingSettings, retrySettings, config, securityPlan );
}

@Setter
Expand Down

0 comments on commit adaa5b4

Please sign in to comment.