This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/master by this push:
     new 6fa5685  Unable to GET an https URL with netty-http client #695
     new 05d6a41  Merge pull request #1352 from JiriOndrusek/695_netty-https
6fa5685 is described below

commit 6fa5685de2baa8a071475018ff0c44c7f90564e0
Author: JiriOndrusek <ondrusek.j...@gmail.com>
AuthorDate: Thu Jun 11 11:18:28 2020 +0200

    Unable to GET an https URL with netty-http client #695
---
 integration-tests/http/README.adoc                       |   5 +++++
 .../camel/quarkus/component/http/it/HttpResource.java    |   2 +-
 .../http/src/main/resources/application.properties       |   2 ++
 .../http/src/main/resources/jsse/keystore.p12            | Bin 0 -> 2421 bytes
 .../apache/camel/quarkus/component/http/it/HttpTest.java |   2 +-
 5 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/integration-tests/http/README.adoc 
b/integration-tests/http/README.adoc
new file mode 100644
index 0000000..3bb970a
--- /dev/null
+++ b/integration-tests/http/README.adoc
@@ -0,0 +1,5 @@
+== Certificate for netty-http test
+
+Server keystore has to contain server certificate. It is possible to use 
self-signed certificate created by following command:
+
+`keytool -genkeypair -keystore keystore.p12 -storetype PKCS12 -storepass 
changeit -alias localhost -keyalg RSA -keysize 2048 -validity 99999 -dname 
"CN=localhost"'
\ No newline at end of file
diff --git 
a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
 
b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
index 732a8e1..181930b 100644
--- 
a/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
+++ 
b/integration-tests/http/src/main/java/org/apache/camel/quarkus/component/http/it/HttpResource.java
@@ -156,7 +156,7 @@ public class HttpResource {
     @Produces(MediaType.TEXT_PLAIN)
     public String nettyHttpGetHttps() {
         return producerTemplate
-                .to("netty-http:https://restcountries.eu/rest/v2/alpha/cz";)
+                
.to("netty-http:https://restcountries.eu/rest/v2/alpha/cz?ssl=true&passphrase=changeit&keyStoreResource=classpath:jsse/keystore.p12&trustStoreResource=file:{{javax.net.ssl.trustStore}}";)
                 .withHeader(Exchange.HTTP_METHOD, "GET")
                 .request(String.class);
     }
diff --git a/integration-tests/http/src/main/resources/application.properties 
b/integration-tests/http/src/main/resources/application.properties
index 936eeb8..17e37ec 100644
--- a/integration-tests/http/src/main/resources/application.properties
+++ b/integration-tests/http/src/main/resources/application.properties
@@ -19,3 +19,5 @@
 # Camel
 #
 camel.context.name = quarkus-camel-example
+
+quarkus.native.additional-build-args = -H:IncludeResources=jsse/keystore.p12
diff --git a/integration-tests/http/src/main/resources/jsse/keystore.p12 
b/integration-tests/http/src/main/resources/jsse/keystore.p12
new file mode 100644
index 0000000..36cc5db
Binary files /dev/null and 
b/integration-tests/http/src/main/resources/jsse/keystore.p12 differ
diff --git 
a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
 
b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
index ab048c3..a1f7d48 100644
--- 
a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
+++ 
b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTest.java
@@ -54,7 +54,7 @@ class HttpTest {
 
     @ParameterizedTest
     @ValueSource(strings = { "ahc",
-            "http" /*, "netty-http" disabled because of 
https://github.com/apache/camel-quarkus/issues/695 */ })
+            "http", "netty-http" })
     public void httpsProducer(String component) {
         RestAssured
                 .given()

Reply via email to