use of org.neo4j.configuration.ssl.SslPolicyConfig in project neo4j by neo4j.
the class SslPolicyLoaderTest method shouldThrowIfPolicyNameDoesNotExist.
@Test
void shouldThrowIfPolicyNameDoesNotExist() {
// given
SslPolicyConfig policyConfig = SslPolicyConfig.forScope(TESTING);
Config config = newBuilder().set(neo4j_home, home.toAbsolutePath()).set(policyConfig.base_directory, Path.of("certificates/default")).build();
SslPolicyLoader sslPolicyLoader = SslPolicyLoader.create(config, NullLogProvider.getInstance());
// when
assertThrows(IllegalArgumentException.class, () -> sslPolicyLoader.getPolicy(BOLT));
}
use of org.neo4j.configuration.ssl.SslPolicyConfig in project neo4j by neo4j.
the class SslPolicyLoaderTest method createSslPolicyLoader.
private SslPolicyLoader createSslPolicyLoader(boolean ignoreDotfiles) {
SslPolicyConfig policyConfig = SslPolicyConfig.forScope(TESTING);
Config config = newBuilder().set(neo4j_home, home.toAbsolutePath()).set(SslSystemInternalSettings.ignore_dotfiles, ignoreDotfiles).set(policyConfig.enabled, Boolean.TRUE).set(policyConfig.base_directory, Path.of("certificates/default")).build();
return SslPolicyLoader.create(config, NullLogProvider.getInstance());
}
Aggregations