本文整理汇总了Java中io.vertx.core.net.KeyCertOptions类的典型用法代码示例。如果您正苦于以下问题:Java KeyCertOptions类的具体用法?Java KeyCertOptions怎么用?Java KeyCertOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyCertOptions类属于io.vertx.core.net包,在下文中一共展示了KeyCertOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTlsKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* Copies TLS key & certificate configuration to a given set of server options.
* <p>
* If <em>config</em> contains key & certificate configuration it is added to
* the given server options and the <em>ssl</em> flag is set to {@code true}.
*
* @param serverOptions The options to add configuration to.
*/
protected final void addTlsKeyCertOptions(final NetServerOptions serverOptions) {
KeyCertOptions keyCertOptions = getConfig().getKeyCertOptions();
if (keyCertOptions != null) {
serverOptions.setSsl(true).setKeyCertOptions(keyCertOptions);
}
}
示例2: addTlsKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
private void addTlsKeyCertOptions(final ProtonClientOptions clientOptions) {
if (clientOptions.getKeyCertOptions() == null) {
KeyCertOptions keyCertOptions = config.getKeyCertOptions();
if (keyCertOptions != null) {
clientOptions.setSsl(true).setKeyCertOptions(keyCertOptions);
clientOptions.addEnabledSaslMechanism(ProtonSaslExternalImpl.MECH_NAME);
}
}
}
示例3: testPfxConfig
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* Test a valid PFX configuration.
*/
@Test
public void testPfxConfig() {
final TestConfig cfg = new TestConfig();
cfg.setKeyStorePath(PREFIX_KEY_PATH + "honoKeyStore.p12");
cfg.setKeyStorePassword("honokeys");
final KeyCertOptions options = cfg.getKeyCertOptions();
Assert.assertNotNull(options);
Assert.assertThat(options, instanceOf(PfxOptions.class));
}
示例4: testPemConfig
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* Test a valid PEM configuration.
*/
@Test
public void testPemConfig() {
final TestConfig cfg = new TestConfig();
cfg.setKeyPath(PREFIX_KEY_PATH + "hono-messaging-key.pem");
cfg.setCertPath(PREFIX_KEY_PATH + "hono-messaging-cert.pem");
final KeyCertOptions options = cfg.getKeyCertOptions();
Assert.assertNotNull(options);
Assert.assertThat(options, instanceOf(PemKeyCertOptions.class));
}
示例5: testInvalidConfig1
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* Specify key and cert, but override type PKCS12.
*/
@Test
public void testInvalidConfig1() {
final TestConfig cfg = new TestConfig();
cfg.setKeyPath(PREFIX_KEY_PATH + "hono-messaging-key.pem");
cfg.setCertPath(PREFIX_KEY_PATH + "hono-messaging-cert.pem");
cfg.setKeyFormat(FileFormat.PKCS12);
final KeyCertOptions options = cfg.getKeyCertOptions();
Assert.assertNull(options);
}
示例6: testInvalidConfig2
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* Specify a keystore, but override type PEM.
*/
@Test
public void testInvalidConfig2() {
final TestConfig cfg = new TestConfig();
cfg.setKeyStorePath(PREFIX_KEY_PATH + "honoKeyStore.p12");
cfg.setKeyStorePassword("honokeys");
cfg.setKeyFormat(FileFormat.PEM);
final KeyCertOptions options = cfg.getKeyCertOptions();
Assert.assertNull(options);
}
示例7: clone
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public KeyCertOptions clone() {
return this; // I ask for forgiveness
}
示例8: setKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public PgConnectOptions setKeyCertOptions(KeyCertOptions options) {
return (PgConnectOptions)super.setKeyCertOptions(options);
}
示例9: TrustAndKeyProvider
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
public TrustAndKeyProvider(TrustOptions trust, KeyCertOptions keyCert) {
this.trust = trust;
this.keyCert = keyCert;
}
示例10: keyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* @return key and cert options for the wrapped provider implementation.
*/
public KeyCertOptions keyCertOptions() {
return keyCert;
}
示例11: setKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public MqttServerOptions setKeyCertOptions(KeyCertOptions options) {
super.setKeyCertOptions(options);
return this;
}
示例12: setKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public MqttClientOptions setKeyCertOptions(KeyCertOptions options) {
super.setKeyCertOptions(options);
return this;
}
示例13: getKeyPairOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
/**
* @return the key pair options
*/
@GenIgnore
public KeyCertOptions getKeyPairOptions() {
return keyPairOptions;
}
示例14: setKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public AmqpBridgeOptions setKeyCertOptions(KeyCertOptions options) {
super.setKeyCertOptions(options);
return this;
}
示例15: setKeyCertOptions
import io.vertx.core.net.KeyCertOptions; //导入依赖的package包/类
@Override
public ProtonServerOptions setKeyCertOptions(KeyCertOptions options) {
super.setKeyCertOptions(options);
return this;
}