All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.server.configuration.security.SSLConfiguration Maven / Gradle / Ivy

The newest version!
package org.infinispan.server.configuration.security;

import java.util.EnumSet;
import java.util.Properties;

import org.infinispan.server.security.ServerSecurityRealm;
import org.wildfly.security.ssl.SSLContextBuilder;

/**
 * @since 10.0
 */
public class SSLConfiguration {

   private final KeyStoreConfiguration keyStore;
   private final TrustStoreConfiguration trustStore;
   private final SSLEngineConfiguration engine;

   SSLConfiguration(KeyStoreConfiguration keyStore, TrustStoreConfiguration trustStore, SSLEngineConfiguration engine) {
      this.keyStore = keyStore;
      this.trustStore = trustStore;
      this.engine = engine;
   }

   public KeyStoreConfiguration keyStore() {
      return keyStore;
   }

   public TrustStoreConfiguration trustStore() {
      return trustStore;
   }

   public SSLEngineConfiguration engine() {
      return engine;
   }

   SSLContextBuilder build(Properties properties, EnumSet features) {
      SSLContextBuilder builder = new SSLContextBuilder().setWrap(false);
      keyStore.build(builder, properties, features);
      trustStore.build(builder, properties);
      engine.build(builder);
      return builder;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy