Assume ssl confjg object will not be null.
package com.quorum.tessera.config.builder;
import com.quorum.tessera.config.*;
-
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
@@ -34,7 +33,6 @@ public class ConfigBuilder {
final SslConfig sslConfig = config.getServerConfig().getSslConfig();
- if (Objects.nonNull(sslConfig)) {
configBuilder.sslAuthenticationMode(sslConfig.getTls())
.sslClientTrustMode(sslConfig.getClientTrustMode())
.sslClientKeyStorePath(Objects.toString(sslConfig.getClientKeyStore()))
@@ -48,17 +46,12 @@ public class ConfigBuilder {
.sslServerTrustStorePassword(sslConfig.getServerTrustStorePassword())
.sslKnownClientsFile(Objects.toString(sslConfig.getKnownClientsFile()))
.sslKnownServersFile(Objects.toString(sslConfig.getKnownServersFile()))
-
.sslClientTlsCertificatePath(Objects.toString(sslConfig.getClientTlsCertificatePath()))
.sslServerTlsCertificatePath(Objects.toString(sslConfig.getServerTlsCertificatePath()))
-
.keyData(config.getKeys())
-
.sslClientTlsKeyPath(Objects.toString(sslConfig.getClientTlsKeyPath()))
.sslServerTlsKeyPath(Objects.toString(sslConfig.getServerTlsKeyPath()));
- }
-
return configBuilder;
}
