From bf585170c702d406f7218481fd48e800c888e3a6 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Fri, 6 Oct 2023 11:52:53 +0530 Subject: [PATCH 01/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index a179fb5375..dbb2f22915 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.1" +version = "2.10.2" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.1" -path = "../native/build/libs/http-native-2.10.1.jar" +version = "2.10.2" +path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 9a9f5919b6..593111cffc 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.1.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 3f69e182cb..4f7246fb7a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.1" +version = "2.10.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From f17cb774e628d80706726dfd705d03bacf43b0f8 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Fri, 6 Oct 2023 16:25:26 +0530 Subject: [PATCH 02/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index dbb2f22915..39989db2b7 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.12" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.2" -path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" +version = "2.10.12" +path = "../native/build/libs/http-native-2.10.12.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 593111cffc..d0f2684740 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.12.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 4f7246fb7a..d37f655f67 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.12" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From ea0964b9c3c8ecbe6ec58c66d1d113103d0874ee Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 10:03:34 +0530 Subject: [PATCH 03/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 39989db2b7..dbb2f22915 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.10.2" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.12" -path = "../native/build/libs/http-native-2.10.12.jar" +version = "2.10.2" +path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index d0f2684740..593111cffc 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.12.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index d37f655f67..4f7246fb7a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.10.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From f99b461bb36a9fa40459cfc3182c1a1c0c825a00 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 10:04:34 +0530 Subject: [PATCH 04/11] Fix the mTLS HTTP2 failure --- .../transport/contractimpl/common/ssl/SSLHandlerFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java b/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java index b04607e8fc..921d9f9988 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java +++ b/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java @@ -353,6 +353,9 @@ public SslContext createHttp2TLSContextForClient(boolean enableOcsp) throws SSLE } else { sslContextBuilder = clientContextBuilderWithCerts(provider); } + if (sslConfig.getClientKeyFile() != null) { + sslContextBuilder = clientContextBuilderWithCerts(provider); + } setCiphers(sslContextBuilder, ciphers); setSslProtocol(sslContextBuilder); setAlpnConfigs(sslContextBuilder); From 4298bf2bfa2f5bf83caaec5ba9a239de469520ae Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 11:04:29 +0530 Subject: [PATCH 05/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index dbb2f22915..58cbabe4ca 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.3" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.2" -path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" +version = "2.10.3" +path = "../native/build/libs/http-native-2.10.3-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 593111cffc..ab38795c5d 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.3-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 4f7246fb7a..6e26ed9026 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.3" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From 153fe3d1150948ce888d8b48c7f4f0fed9c53716 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 11:16:05 +0530 Subject: [PATCH 06/11] Add test case --- .../http-advanced-tests/Ballerina.toml | 6 +++--- .../http-client-tests/Ballerina.toml | 6 +++--- .../http-dispatching-tests/Ballerina.toml | 6 +++--- .../http-interceptor-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-misc-tests/Ballerina.toml | 6 +++--- .../http-resiliency-tests/Ballerina.toml | 6 +++--- .../http-security-tests/Ballerina.toml | 6 +++--- .../http-service-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-test-common/Ballerina.toml | 2 +- .../http-test-common/Dependencies.toml | 2 +- ballerina-tests/http2-tests/Ballerina.toml | 6 +++--- gradle.properties | 2 +- ...rtsTest.java => Http2AlpnWithCertsTest.java} | 17 +++++++++++------ native/src/test/resources/testng.xml | 2 +- 14 files changed, 42 insertions(+), 37 deletions(-) rename native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/{Http2ALPNwithCertsTest.java => Http2AlpnWithCertsTest.java} (85%) diff --git a/ballerina-tests/http-advanced-tests/Ballerina.toml b/ballerina-tests/http-advanced-tests/Ballerina.toml index 3b13225e6b..e09d33e2fc 100644 --- a/ballerina-tests/http-advanced-tests/Ballerina.toml +++ b/ballerina-tests/http-advanced-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_advanced_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-client-tests/Ballerina.toml b/ballerina-tests/http-client-tests/Ballerina.toml index cabe29e627..54efb2d1e3 100644 --- a/ballerina-tests/http-client-tests/Ballerina.toml +++ b/ballerina-tests/http-client-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_client_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-dispatching-tests/Ballerina.toml b/ballerina-tests/http-dispatching-tests/Ballerina.toml index 548d300ace..d4ae9aeb01 100644 --- a/ballerina-tests/http-dispatching-tests/Ballerina.toml +++ b/ballerina-tests/http-dispatching-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_dispatching_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-interceptor-tests/Ballerina.toml b/ballerina-tests/http-interceptor-tests/Ballerina.toml index be50861458..3b973ef53b 100644 --- a/ballerina-tests/http-interceptor-tests/Ballerina.toml +++ b/ballerina-tests/http-interceptor-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_interceptor_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-misc-tests/Ballerina.toml b/ballerina-tests/http-misc-tests/Ballerina.toml index 599b58dabd..a6d326b7c4 100644 --- a/ballerina-tests/http-misc-tests/Ballerina.toml +++ b/ballerina-tests/http-misc-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_misc_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-resiliency-tests/Ballerina.toml b/ballerina-tests/http-resiliency-tests/Ballerina.toml index 228d4ae6d7..78ab9e991f 100644 --- a/ballerina-tests/http-resiliency-tests/Ballerina.toml +++ b/ballerina-tests/http-resiliency-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_resiliency_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-security-tests/Ballerina.toml b/ballerina-tests/http-security-tests/Ballerina.toml index c7a0657cb7..2e8fb8cb3e 100644 --- a/ballerina-tests/http-security-tests/Ballerina.toml +++ b/ballerina-tests/http-security-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_security_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-service-tests/Ballerina.toml b/ballerina-tests/http-service-tests/Ballerina.toml index 3b241882fd..e8cc0b2319 100644 --- a/ballerina-tests/http-service-tests/Ballerina.toml +++ b/ballerina-tests/http-service-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_service_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/ballerina-tests/http-test-common/Ballerina.toml b/ballerina-tests/http-test-common/Ballerina.toml index 1bfc4a2ff5..7f598aeb0a 100644 --- a/ballerina-tests/http-test-common/Ballerina.toml +++ b/ballerina-tests/http-test-common/Ballerina.toml @@ -1,4 +1,4 @@ [package] org = "ballerina" name = "http_test_common" -version = "2.10.1" +version = "2.10.3" diff --git a/ballerina-tests/http-test-common/Dependencies.toml b/ballerina-tests/http-test-common/Dependencies.toml index 9f4f8a4bd6..57e2c8ed56 100644 --- a/ballerina-tests/http-test-common/Dependencies.toml +++ b/ballerina-tests/http-test-common/Dependencies.toml @@ -10,7 +10,7 @@ distribution-version = "2201.8.0" [[package]] org = "ballerina" name = "http_test_common" -version = "2.10.1" +version = "2.10.3" dependencies = [ {org = "ballerina", name = "lang.string"}, {org = "ballerina", name = "mime"}, diff --git a/ballerina-tests/http2-tests/Ballerina.toml b/ballerina-tests/http2-tests/Ballerina.toml index f17403240e..7cc802f924 100644 --- a/ballerina-tests/http2-tests/Ballerina.toml +++ b/ballerina-tests/http2-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http2_tests" -version = "2.10.1" +version = "2.10.3" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.1" +version = "2.10.3" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" diff --git a/gradle.properties b/gradle.properties index 828fd093c8..81b6a3717d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.10.2-SNAPSHOT +version=2.10.3-SNAPSHOT ballerinaLangVersion=2201.8.0 ballerinaTomlParserVersion=1.2.2 commonsLang3Version=3.12.0 diff --git a/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2ALPNwithCertsTest.java b/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java similarity index 85% rename from native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2ALPNwithCertsTest.java rename to native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java index e70b0f2032..d62c456908 100644 --- a/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2ALPNwithCertsTest.java +++ b/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java @@ -1,7 +1,7 @@ /* - * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. * - * WSO2 Inc. licenses this file to you under the Apache License, + * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at @@ -38,13 +38,14 @@ import static io.ballerina.stdlib.http.transport.contract.Constants.HTTPS_SCHEME; import static io.ballerina.stdlib.http.transport.contract.Constants.HTTP_2_0; +import static io.ballerina.stdlib.http.transport.contract.Constants.REQUIRE; /** - * Test ALPN protocol negotiation for HTTP2 with Certificates and keys. + * Test mTLS with certs and keys in HTTP2. */ -public class Http2ALPNwithCertsTest { +public class Http2AlpnWithCertsTest { - private static final Logger LOG = LoggerFactory.getLogger(Http2ALPNwithCertsTest.class); + private static final Logger LOG = LoggerFactory.getLogger(Http2AlpnWithCertsTest.class); private ServerConnector serverConnector; private HttpClientConnector httpClientConnector; private HttpWsConnectorFactory connectorFactory; @@ -64,7 +65,7 @@ public void setup() throws InterruptedException { } @Test - public void testHttp2ALPNwithCerts() { + public void testHttp2AlpnWithcerts() { TestUtil.testHttpsPost(httpClientConnector, TestUtil.SERVER_PORT1); } @@ -77,12 +78,16 @@ private ListenerConfiguration getListenerConfigs() { listenerConfiguration.setSslHandshakeTimeOut(TestUtil.SSL_HANDSHAKE_TIMEOUT); listenerConfiguration.setServerKeyFile(TestUtil.getAbsolutePath(TestUtil.KEY_FILE)); listenerConfiguration.setServerCertificates(TestUtil.getAbsolutePath(TestUtil.CERT_FILE)); + listenerConfiguration.setVerifyClient(REQUIRE); + listenerConfiguration.setServerTrustCertificates(TestUtil.getAbsolutePath(TestUtil.CERT_FILE)); return listenerConfiguration; } private SenderConfiguration getSenderConfigs() { SenderConfiguration senderConfiguration = new SenderConfiguration(); senderConfiguration.setClientTrustCertificates(TestUtil.getAbsolutePath(TestUtil.CERT_FILE)); + senderConfiguration.setClientKeyFile(TestUtil.getAbsolutePath(TestUtil.KEY_FILE)); + senderConfiguration.setClientCertificates(TestUtil.getAbsolutePath(TestUtil.CERT_FILE)); senderConfiguration.setHttpVersion(HTTP_2_0); senderConfiguration.setScheme(HTTPS_SCHEME); senderConfiguration.setSslSessionTimeOut(TestUtil.SSL_SESSION_TIMEOUT); diff --git a/native/src/test/resources/testng.xml b/native/src/test/resources/testng.xml index 899f33ba7b..6f7dbcd813 100644 --- a/native/src/test/resources/testng.xml +++ b/native/src/test/resources/testng.xml @@ -174,7 +174,7 @@ - + From 0955b7227c15b86f6f48558f278adecaffe5e8d1 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 11:54:44 +0530 Subject: [PATCH 07/11] Remove unwanted changes --- ballerina-tests/http-advanced-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-client-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-dispatching-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-interceptor-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-misc-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-resiliency-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-security-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-service-tests/Ballerina.toml | 6 +++--- ballerina-tests/http-test-common/Ballerina.toml | 2 +- ballerina-tests/http-test-common/Dependencies.toml | 2 +- ballerina-tests/http2-tests/Ballerina.toml | 6 +++--- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- .../http/transport/http2/ssl/Http2AlpnWithCertsTest.java | 4 ++-- 15 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ballerina-tests/http-advanced-tests/Ballerina.toml b/ballerina-tests/http-advanced-tests/Ballerina.toml index e09d33e2fc..3b13225e6b 100644 --- a/ballerina-tests/http-advanced-tests/Ballerina.toml +++ b/ballerina-tests/http-advanced-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_advanced_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-client-tests/Ballerina.toml b/ballerina-tests/http-client-tests/Ballerina.toml index 54efb2d1e3..cabe29e627 100644 --- a/ballerina-tests/http-client-tests/Ballerina.toml +++ b/ballerina-tests/http-client-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_client_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-dispatching-tests/Ballerina.toml b/ballerina-tests/http-dispatching-tests/Ballerina.toml index d4ae9aeb01..548d300ace 100644 --- a/ballerina-tests/http-dispatching-tests/Ballerina.toml +++ b/ballerina-tests/http-dispatching-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_dispatching_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-interceptor-tests/Ballerina.toml b/ballerina-tests/http-interceptor-tests/Ballerina.toml index 3b973ef53b..be50861458 100644 --- a/ballerina-tests/http-interceptor-tests/Ballerina.toml +++ b/ballerina-tests/http-interceptor-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_interceptor_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-misc-tests/Ballerina.toml b/ballerina-tests/http-misc-tests/Ballerina.toml index a6d326b7c4..599b58dabd 100644 --- a/ballerina-tests/http-misc-tests/Ballerina.toml +++ b/ballerina-tests/http-misc-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_misc_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-resiliency-tests/Ballerina.toml b/ballerina-tests/http-resiliency-tests/Ballerina.toml index 78ab9e991f..228d4ae6d7 100644 --- a/ballerina-tests/http-resiliency-tests/Ballerina.toml +++ b/ballerina-tests/http-resiliency-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_resiliency_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-security-tests/Ballerina.toml b/ballerina-tests/http-security-tests/Ballerina.toml index 2e8fb8cb3e..c7a0657cb7 100644 --- a/ballerina-tests/http-security-tests/Ballerina.toml +++ b/ballerina-tests/http-security-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_security_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-service-tests/Ballerina.toml b/ballerina-tests/http-service-tests/Ballerina.toml index e8cc0b2319..3b241882fd 100644 --- a/ballerina-tests/http-service-tests/Ballerina.toml +++ b/ballerina-tests/http-service-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http_service_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina-tests/http-test-common/Ballerina.toml b/ballerina-tests/http-test-common/Ballerina.toml index 7f598aeb0a..1bfc4a2ff5 100644 --- a/ballerina-tests/http-test-common/Ballerina.toml +++ b/ballerina-tests/http-test-common/Ballerina.toml @@ -1,4 +1,4 @@ [package] org = "ballerina" name = "http_test_common" -version = "2.10.3" +version = "2.10.1" diff --git a/ballerina-tests/http-test-common/Dependencies.toml b/ballerina-tests/http-test-common/Dependencies.toml index 57e2c8ed56..9f4f8a4bd6 100644 --- a/ballerina-tests/http-test-common/Dependencies.toml +++ b/ballerina-tests/http-test-common/Dependencies.toml @@ -10,7 +10,7 @@ distribution-version = "2201.8.0" [[package]] org = "ballerina" name = "http_test_common" -version = "2.10.3" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "lang.string"}, {org = "ballerina", name = "mime"}, diff --git a/ballerina-tests/http2-tests/Ballerina.toml b/ballerina-tests/http2-tests/Ballerina.toml index 7cc802f924..f17403240e 100644 --- a/ballerina-tests/http2-tests/Ballerina.toml +++ b/ballerina-tests/http2-tests/Ballerina.toml @@ -1,17 +1,17 @@ [package] org = "ballerina" name = "http2_tests" -version = "2.10.3" +version = "2.10.1" [[dependency]] org = "ballerina" name = "http_test_common" repository = "local" -version = "2.10.3" +version = "2.10.1" [platform.java17] graalvmCompatible = true [[platform.java17.dependency]] scope = "testOnly" -path = "../../test-utils/build/libs/http-test-utils-2.10.3-SNAPSHOT.jar" +path = "../../test-utils/build/libs/http-test-utils-2.10.1.jar" diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 58cbabe4ca..a179fb5375 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.3" +version = "2.10.1" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.3" -path = "../native/build/libs/http-native-2.10.3-SNAPSHOT.jar" +version = "2.10.1" +path = "../native/build/libs/http-native-2.10.1.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index ab38795c5d..9a9f5919b6 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.3-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.1.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 6e26ed9026..3f69e182cb 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.3" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, diff --git a/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java b/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java index d62c456908..ad01fe98e6 100644 --- a/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java +++ b/native/src/test/java/io/ballerina/stdlib/http/transport/http2/ssl/Http2AlpnWithCertsTest.java @@ -1,7 +1,7 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * WSO2 LLC. licenses this file to you under the Apache License, + * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at From 3b7d52f000696f1c5fa5bacd29ad464cae183f22 Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 11:58:31 +0530 Subject: [PATCH 08/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- gradle.properties | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index a179fb5375..dbb2f22915 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.1" +version = "2.10.2" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.1" -path = "../native/build/libs/http-native-2.10.1.jar" +version = "2.10.2" +path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 9a9f5919b6..593111cffc 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.1.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 3f69e182cb..4f7246fb7a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.1" +version = "2.10.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, diff --git a/gradle.properties b/gradle.properties index 81b6a3717d..828fd093c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.10.3-SNAPSHOT +version=2.10.2-SNAPSHOT ballerinaLangVersion=2201.8.0 ballerinaTomlParserVersion=1.2.2 commonsLang3Version=3.12.0 From 47ad9e330f23099e15bc61140293c032188c396e Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 12:46:13 +0530 Subject: [PATCH 09/11] Update changelog --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index 51514d4e47..8d005bdfda 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,12 @@ This file contains all the notable changes done to the Ballerina HTTP package th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.10.2] - 2023-10-09 + +### Fixed + +- [Fix HTTP2 mTLS issue when certs and keys are provided](https://github.com/ballerina-platform/ballerina-standard-library/issues/4890) + ## [2.10.1] - 2023-09-27 ### Fixed From 1c40c96adc1c3f897ffae17bf1f0083cdeda445b Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 13:20:24 +0530 Subject: [PATCH 10/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index dbb2f22915..39989db2b7 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.12" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.2" -path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" +version = "2.10.12" +path = "../native/build/libs/http-native-2.10.12.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 593111cffc..d0f2684740 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.12.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 4f7246fb7a..d37f655f67 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.2" +version = "2.10.12" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, From 3bbe8b44a9912e5bd8702653a94bb086fa382a8c Mon Sep 17 00:00:00 2001 From: bhashinee Date: Mon, 9 Oct 2023 13:47:02 +0530 Subject: [PATCH 11/11] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 39989db2b7..dbb2f22915 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.10.2" authors = ["Ballerina"] keywords = ["http", "network", "service", "listener", "client"] repository = "https://github.com/ballerina-platform/module-ballerina-http" @@ -16,8 +16,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "http-native" -version = "2.10.12" -path = "../native/build/libs/http-native-2.10.12.jar" +version = "2.10.2" +path = "../native/build/libs/http-native-2.10.2-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index d0f2684740..593111cffc 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "http-compiler-plugin" class = "io.ballerina.stdlib.http.compiler.HttpCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.12.jar" +path = "../compiler-plugin/build/libs/http-compiler-plugin-2.10.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index d37f655f67..4f7246fb7a 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -76,7 +76,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.10.2" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"},