Skip to content

Commit d16b607

Browse files
authored
Merge pull request #2496 from cescoffier/vertx-4.5.4
Update to Vert.x 4.5.4
2 parents b6ff07e + 06801da commit d16b607

File tree

9 files changed

+26
-5
lines changed

9 files changed

+26
-5
lines changed

documentation/src/main/java/amqp/customization/ClientProducers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public AmqpClientOptions getNamedOptions() {
2424
.setPemKeyCertOptions(keycert)
2525
.setPemTrustOptions(trust)
2626
.addEnabledSaslMechanism("EXTERNAL")
27-
.setHostnameVerificationAlgorithm("")
27+
.setHostnameVerificationAlgorithm("") // Disable hostname verification
2828
.setConnectTimeout(30000)
2929
.setReconnectInterval(5000)
3030
.setContainerId("my-container");

documentation/src/main/java/mqtt/customization/ClientProducers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public MqttClientSessionOptions getOptions() {
2323
.setSsl(true)
2424
.setPemKeyCertOptions(keycert)
2525
.setPemTrustOptions(trust)
26-
.setHostnameVerificationAlgorithm("")
26+
.setHostnameVerificationAlgorithm("HTTPS")
2727
.setConnectTimeout(30000)
2828
.setReconnectInterval(5000);
2929
}

documentation/src/main/java/rabbitmq/customization/RabbitMQProducers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public RabbitMQOptions getNamedOptions() {
2525
.setSsl(true)
2626
.setPemKeyCertOptions(keycert)
2727
.setPemTrustOptions(trust)
28-
.setHostnameVerificationAlgorithm("")
28+
.setHostnameVerificationAlgorithm("HTTPS")
2929
.setConnectTimeout(30000)
3030
.setReconnectInterval(5000);
3131
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<maven.compiler.source>11</maven.compiler.source>
6262
<maven.compiler.target>11</maven.compiler.target>
6363

64-
<vertx.version>4.5.3</vertx.version>
64+
<vertx.version>4.5.4</vertx.version>
6565
<rxjava.version>2.2.21</rxjava.version>
6666
<cloudevent.version>1.1.0</cloudevent.version>
6767
<weld.version>5.1.2.Final</weld.version>

smallrye-reactive-messaging-mqtt/src/main/java/io/smallrye/reactive/messaging/mqtt/MqttConnector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
@ConnectorAttribute(name = "auto-keep-alive", type = "boolean", direction = INCOMING_AND_OUTGOING, description = "Set if the MQTT client must handle `PINGREQ` automatically", defaultValue = "true")
3535
@ConnectorAttribute(name = "health-enabled", type = "boolean", direction = INCOMING_AND_OUTGOING, description = "Whether health reporting is enabled (default) or disabled", defaultValue = "true")
3636
@ConnectorAttribute(name = "ssl", type = "boolean", direction = INCOMING_AND_OUTGOING, description = "Set whether SSL/TLS is enabled", defaultValue = "false")
37+
@ConnectorAttribute(name = "ssl.hostname-verification-algorithm", type = "string", direction = INCOMING_AND_OUTGOING, description = "Set the hostname verifier algorithm for the TLS connection.Accepted values are `HTTPS`, `LDAPS`, and `NONE` (defaults). `NONE` disables the hostname verification.", defaultValue = "NONE")
3738
@ConnectorAttribute(name = "ssl.keystore.type", type = "string", direction = INCOMING_AND_OUTGOING, description = "Set the keystore type [`pkcs12`, `jks`, `pem`]", defaultValue = "pkcs12")
3839
@ConnectorAttribute(name = "ssl.keystore.location", type = "string", direction = INCOMING_AND_OUTGOING, description = "Set the keystore location. In case of `pem` type this is the server ca cert path")
3940
@ConnectorAttribute(name = "ssl.keystore.password", type = "string", direction = INCOMING_AND_OUTGOING, description = "Set the keystore password. In case of `pem` type this is the key path")

smallrye-reactive-messaging-mqtt/src/main/java/io/smallrye/reactive/messaging/mqtt/internal/MqttHelpers.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ private static MqttClientSessionOptions createMqttClientOptions(MqttConnectorCom
4343
options.setPort(config.getPort().orElseGet(() -> config.getSsl() ? 8883 : 1883));
4444
options.setReconnectDelay(getReconnectDelayOptions(config));
4545
options.setSsl(config.getSsl());
46+
47+
String algorithm = config.getSslHostnameVerificationAlgorithm();
48+
if ("NONE".equalsIgnoreCase(algorithm)) {
49+
options.setHostnameVerificationAlgorithm("");
50+
} else {
51+
options.setHostnameVerificationAlgorithm(algorithm);
52+
}
53+
4654
options.setKeyCertOptions(getKeyCertOptions(config));
4755
options.setServerName(config.getServerName());
4856
options.setTrustOptions(getTrustOptions(config));
@@ -53,6 +61,7 @@ private static MqttClientSessionOptions createMqttClientOptions(MqttConnectorCom
5361
options.setWillRetain(config.getWillRetain());
5462
options.setUnsubscribeOnDisconnect(config.getUnsubscribeOnDisconnection());
5563
options.setMetricsName("mqtt|" + config.getChannel());
64+
5665
return options;
5766
}
5867

smallrye-reactive-messaging-mqtt/src/main/java/io/smallrye/reactive/messaging/mqtt/session/MqttClientSessionOptions.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,11 @@ public MqttClientSessionOptions setReconnectInterval(long interval) {
428428

429429
@Override
430430
public MqttClientSessionOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm) {
431-
super.setHostnameVerificationAlgorithm(hostnameVerificationAlgorithm);
431+
if ("NONE".equalsIgnoreCase(hostnameVerificationAlgorithm)) {
432+
super.setHostnameVerificationAlgorithm("");
433+
} else {
434+
super.setHostnameVerificationAlgorithm(hostnameVerificationAlgorithm);
435+
}
432436
return this;
433437
}
434438

smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/RabbitMQConnector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
@ConnectorAttribute(name = "port", direction = INCOMING_AND_OUTGOING, description = "The broker port", type = "int", alias = "rabbitmq-port", defaultValue = "5672")
5151
@ConnectorAttribute(name = "addresses", direction = INCOMING_AND_OUTGOING, description = "The multiple addresses for cluster mode, when given overrides the host and port", type = "string", alias = "rabbitmq-addresses")
5252
@ConnectorAttribute(name = "ssl", direction = INCOMING_AND_OUTGOING, description = "Whether or not the connection should use SSL", type = "boolean", alias = "rabbitmq-ssl", defaultValue = "false")
53+
@ConnectorAttribute(name = "ssl.hostname-verification-algorithm", type = "string", direction = INCOMING_AND_OUTGOING, description = "Set the hostname verifier algorithm for the TLS connection. Accepted values are `HTTPS`, and `NONE` (defaults). `NONE` disables the hostname verification.", defaultValue = "NONE")
5354
@ConnectorAttribute(name = "trust-all", direction = INCOMING_AND_OUTGOING, description = "Whether to skip trust certificate verification", type = "boolean", alias = "rabbitmq-trust-all", defaultValue = "false")
5455
@ConnectorAttribute(name = "trust-store-path", direction = INCOMING_AND_OUTGOING, description = "The path to a JKS trust store", type = "string", alias = "rabbitmq-trust-store-path")
5556
@ConnectorAttribute(name = "trust-store-password", direction = INCOMING_AND_OUTGOING, description = "The password of the JKS trust store", type = "string", alias = "rabbitmq-trust-store-password")

smallrye-reactive-messaging-rabbitmq/src/main/java/io/smallrye/reactive/messaging/rabbitmq/internals/RabbitMQClientHelper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ static RabbitMQOptions getClientOptions(Vertx vertx, RabbitMQConnectorCommonConf
107107
.setUseNio(config.getUseNio())
108108
.setVirtualHost(config.getVirtualHost());
109109

110+
if ("NONE".equals(config.getSslHostnameVerificationAlgorithm())) {
111+
options.setHostnameVerificationAlgorithm("");
112+
} else {
113+
options.setHostnameVerificationAlgorithm(config.getSslHostnameVerificationAlgorithm());
114+
}
115+
110116
// JKS TrustStore
111117
Optional<String> trustStorePath = config.getTrustStorePath();
112118
if (trustStorePath.isPresent()) {

0 commit comments

Comments
 (0)