Java Code Examples for com.sun.net.httpserver.HttpsConfigurator#configure()

The following examples show how to use com.sun.net.httpserver.HttpsConfigurator#configure() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SSLStreams.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr) {
   if (cfg != null) {
      SSLStreams.Parameters params = new SSLStreams.Parameters(cfg, addr);
      cfg.configure(params);
      SSLParameters sslParams = params.getSSLParameters();
      if (sslParams != null) {
         this.engine.setSSLParameters(sslParams);
      } else {
         if (params.getCipherSuites() != null) {
            try {
               this.engine.setEnabledCipherSuites(params.getCipherSuites());
            } catch (IllegalArgumentException var7) {
               ;
            }
         }

         this.engine.setNeedClientAuth(params.getNeedClientAuth());
         this.engine.setWantClientAuth(params.getWantClientAuth());
         if (params.getProtocols() != null) {
            try {
               this.engine.setEnabledProtocols(params.getProtocols());
            } catch (IllegalArgumentException var6) {
               ;
            }
         }
      }
   }

}
 
Example 2
Source File: SSLStreams.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr) {
   if (cfg != null) {
      SSLStreams.Parameters params = new SSLStreams.Parameters(cfg, addr);
      cfg.configure(params);
      SSLParameters sslParams = params.getSSLParameters();
      if (sslParams != null) {
         this.engine.setSSLParameters(sslParams);
      } else {
         if (params.getCipherSuites() != null) {
            try {
               this.engine.setEnabledCipherSuites(params.getCipherSuites());
            } catch (IllegalArgumentException var7) {
            }
         }

         this.engine.setNeedClientAuth(params.getNeedClientAuth());
         this.engine.setWantClientAuth(params.getWantClientAuth());
         if (params.getProtocols() != null) {
            try {
               this.engine.setEnabledProtocols(params.getProtocols());
            } catch (IllegalArgumentException var6) {
            }
         }
      }
   }

}
 
Example 3
Source File: SSLStreams.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr) {
   if (cfg != null) {
      SSLStreams.Parameters params = new SSLStreams.Parameters(cfg, addr);
      cfg.configure(params);
      SSLParameters sslParams = params.getSSLParameters();
      if (sslParams != null) {
         this.engine.setSSLParameters(sslParams);
      } else {
         if (params.getCipherSuites() != null) {
            try {
               this.engine.setEnabledCipherSuites(params.getCipherSuites());
            } catch (IllegalArgumentException var7) {
               ;
            }
         }

         this.engine.setNeedClientAuth(params.getNeedClientAuth());
         this.engine.setWantClientAuth(params.getWantClientAuth());
         if (params.getProtocols() != null) {
            try {
               this.engine.setEnabledProtocols(params.getProtocols());
            } catch (IllegalArgumentException var6) {
               ;
            }
         }
      }
   }

}
 
Example 4
Source File: SSLStreams.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr) {
   if (cfg != null) {
      SSLStreams.Parameters params = new SSLStreams.Parameters(cfg, addr);
      cfg.configure(params);
      SSLParameters sslParams = params.getSSLParameters();
      if (sslParams != null) {
         this.engine.setSSLParameters(sslParams);
      } else {
         if (params.getCipherSuites() != null) {
            try {
               this.engine.setEnabledCipherSuites(params.getCipherSuites());
            } catch (IllegalArgumentException var7) {
               ;
            }
         }

         this.engine.setNeedClientAuth(params.getNeedClientAuth());
         this.engine.setWantClientAuth(params.getWantClientAuth());
         if (params.getProtocols() != null) {
            try {
               this.engine.setEnabledProtocols(params.getProtocols());
            } catch (IllegalArgumentException var6) {
               ;
            }
         }
      }
   }

}