当前位置: 首页>>代码示例>>Java>>正文


Java SslSocketConnector.setKeyPassword方法代码示例

本文整理汇总了Java中org.eclipse.jetty.server.ssl.SslSocketConnector.setKeyPassword方法的典型用法代码示例。如果您正苦于以下问题:Java SslSocketConnector.setKeyPassword方法的具体用法?Java SslSocketConnector.setKeyPassword怎么用?Java SslSocketConnector.setKeyPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jetty.server.ssl.SslSocketConnector的用法示例。


在下文中一共展示了SslSocketConnector.setKeyPassword方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildSslListener

import org.eclipse.jetty.server.ssl.SslSocketConnector; //导入方法依赖的package包/类
/**
 * Creates a SSLListener with all the default options. The listener will use all the default options.
 * @param address - The address the listener will listen to.
 * @param port - The port the listener will listen to.
 * @return - Newly created listener
 * @throws UnknownHostException
 */
public static SslSocketConnector buildSslListener(String address, int port) throws UnknownHostException {
    int listeners = 0;
    if (_server != null) {
        listeners = _server.getConnectors().length;
    }

    SslSocketConnector ssl = new SslSocketConnector();
    ssl.setProvider(_secMan.getSecurityProvider());
    //ssl.setCipherSuites(_secMan.getSupprtedSSLCipherSuites()); Removed in Jetty 5->6 port.
    ssl.setHost(address);
    ssl.setPort(port);
    ssl.setWantClientAuth(false); // Don't care about client authentication.
    ssl.setPassword(KeyStoreProvider.DEFAULT_KEYSTORE_PASSWORD);
    ssl.setKeyPassword(KeyStoreProvider.DEFAULT_KEYSTORE_PASSWORD);
    ssl.setKeystoreType(KeyStore.getDefaultType());
    ssl.setKeystore(KeyStoreProvider.getKeyStoreLocation());
    ssl.setName("SSL Listener-" + ++listeners);

    return ssl;
}
 
开发者ID:i2p,项目名称:i2p.plugins.i2pcontrol,代码行数:28,代码来源:I2PControlController.java

示例2: getConnector

import org.eclipse.jetty.server.ssl.SslSocketConnector; //导入方法依赖的package包/类
private SocketConnector getConnector() {
  if ( sslConfig != null ) {
    log.logBasic( BaseMessages.getString( PKG, "WebServer.Log.SslModeUsing" ) );
    SslSocketConnector connector = new SslSocketConnector();
    connector.setKeystore( sslConfig.getKeyStore() );
    connector.setPassword( sslConfig.getKeyStorePassword() );
    connector.setKeyPassword( sslConfig.getKeyPassword() );
    connector.setKeystoreType( sslConfig.getKeyStoreType() );
    return connector;
  } else {
    return new SocketConnector();
  }

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:WebServer.java


注:本文中的org.eclipse.jetty.server.ssl.SslSocketConnector.setKeyPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。