Skip to content

Commit 2591df8

Browse files
committed
Adapt to Quarkus 3.18.0
1 parent cf10f06 commit 2591df8

File tree

7 files changed

+31
-9
lines changed

7 files changed

+31
-9
lines changed

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ asciidoc:
88
attributes:
99

1010
# Versions
11-
quarkus-version: 3.17.7 # replace ${quarkus.version}
11+
quarkus-version: 3.18.0.CR1 # replace ${quarkus.version}
1212
quarkus-cxf-version: 3.17.3 # replace ${release.current-version}
1313

1414
# Toggle whether some page elements are rendered

docs/modules/ROOT/pages/reference/extensions/quarkus-cxf.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,13 @@ with
21692169
set to `NONE`. Otherwise, there is no way to implement custom hostname verification for Vert.x HTTP client.
21702170
====
21712171

2172+
[IMPORTANT]
2173+
====
2174+
Since {quarkus-cxf-project-name} 3.18.0, setting this option when the conduit factory of this client is set to
2175+
`HttpClientHTTPConduitFactory` is not supported and leads to an exception at runtime.
2176+
See https://github.com/quarkiverse/quarkus-cxf/issues/1687[#1687].
2177+
====
2178+
21722179
*Environment variable*: `+++QUARKUS_CXF_CLIENT__CLIENT_NAME__HOSTNAME_VERIFIER+++` +
21732180
*Since Quarkus CXF*: 2.5.0
21742181

extensions/core/deployment/src/test/java/io/quarkiverse/cxf/deployment/test/BadHostnameTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class BadHostnameTest {
4242
/* Named TLS configuration for the clients */
4343
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.p12.path", "fake-host-truststore.p12")
4444
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.p12.password", "secret")
45+
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.certificate-expiration-policy", "IGNORE")
4546

4647
/* Client with VertxHttpClientHTTPConduitFactory */
4748
.overrideConfigKey("quarkus.cxf.client.helloVertx.client-endpoint-url", "https://localhost:8444/services/hello")

extensions/core/deployment/src/test/java/io/quarkiverse/cxf/deployment/test/HostnameVerifierTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,8 @@ void customHostnameVerifierHttpClient() {
126126
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).isEmpty();
127127
customHostnameVerifier.setReturnVal(false);
128128
Assertions.assertThatThrownBy(() -> helloHttpClient.hello("Doe")).hasRootCauseMessage(
129-
"No name matching localhost found");
130-
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly("localhost", "localhost");
131-
customHostnameVerifier.setReturnVal(true);
132-
Assertions.assertThat(helloHttpClient.hello("Joe")).isEqualTo("Hello Joe");
133-
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly("localhost", "localhost",
134-
"localhost");
129+
"http-conduit-factory = HttpClientHTTPConduitFactory does not support quarkus.cxf.client.helloHttpClient.hostname-verifier - see https://github.com/quarkiverse/quarkus-cxf/issues/1687");
130+
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly();
135131
}
136132

137133
@Test

extensions/core/runtime/src/main/java/io/quarkiverse/cxf/CxfClientConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,13 @@ public interface CxfClientConfig {
612612
* set to `NONE`. Otherwise, there is no way to implement custom hostname verification for Vert.x HTTP client.
613613
* ====
614614
*
615+
* [IMPORTANT]
616+
* ====
617+
* Since {quarkus-cxf-project-name} 3.18.0, setting this option when the conduit factory of this client is set to
618+
* `HttpClientHTTPConduitFactory` is not supported and leads to an exception at runtime.
619+
* See https://github.com/quarkiverse/quarkus-cxf/issues/1687[#1687].
620+
* ====
621+
*
615622
* @asciidoclet
616623
* @since 2.5.0
617624
*/

extensions/core/runtime/src/main/java/io/quarkiverse/cxf/HTTPConduitImpl.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ public HTTPConduit createConduit(CXFClientInfo cxfClientInfo, HttpClientPool htt
7777
EndpointReferenceType target) throws IOException {
7878
return new HttpClientHTTPConduit(b, localInfo, target);
7979
}
80+
81+
@Override
82+
public TLSClientParameters createTLSClientParameters(CXFClientInfo cxfClientInfo) {
83+
if (cxfClientInfo.getHostnameVerifier() != null) {
84+
throw new IllegalStateException(
85+
getConduitDescription() + " does not support quarkus.cxf.client."
86+
+ cxfClientInfo.getConfigKey()
87+
+ ".hostname-verifier - see https://github.com/quarkiverse/quarkus-cxf/issues/1687");
88+
}
89+
return super.createTLSClientParameters(cxfClientInfo);
90+
}
8091
},
8192
@ConfigDocEnumValue("URLConnectionHTTPConduitFactory")
8293
URLConnectionHTTPConduitFactory {

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</developers>
4343
<properties>
4444
<!-- Primary dependencies -->
45-
<quarkus.version>3.17.7</quarkus.version>
45+
<quarkus.version>3.18.0.CR1</quarkus.version>
4646
<cxf.version>4.1.0</cxf.version>
4747
<quarkus-enforcer-rules.version>${quarkus.version}</quarkus-enforcer-rules.version>
4848
<quarkus-antora.version>1.0.2</quarkus-antora.version>
@@ -68,7 +68,7 @@
6868
<santuario-xmlsec.version>3.0.5</santuario-xmlsec.version>
6969

7070
<slf4j.version>2.0.6</slf4j.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.slf4j:slf4j-api -->
71-
<smallrye-certificate-generator.version>0.8.1</smallrye-certificate-generator.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
71+
<smallrye-certificate-generator.version>0.9.2</smallrye-certificate-generator.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
7272
<stax2.version>4.2.2</stax2.version><!-- @sync com.fasterxml.woodstox:woodstox-core:${woodstox-core.version} dep:org.codehaus.woodstox:stax2-api -->
7373
<woodstox-core.version>7.1.0</woodstox-core.version>
7474
<wsdl4j.version>1.6.3</wsdl4j.version><!-- Manage WSDL4J to make sure that quarkus-cxf-xjc-plugins pulls the right version via cxf-xjc-wsdlextension -->

0 commit comments

Comments
 (0)