diff --git a/remoting/src/test/java/org/apache/rocketmq/remoting/RemotingServerTest.java b/remoting/src/test/java/org/apache/rocketmq/remoting/RemotingServerTest.java index 31c26473e57f09af58a8f6db785f98192d52cc7a..0ecfaaa5aa007c661637b80e14a3a00ffb10aa06 100644 --- a/remoting/src/test/java/org/apache/rocketmq/remoting/RemotingServerTest.java +++ b/remoting/src/test/java/org/apache/rocketmq/remoting/RemotingServerTest.java @@ -67,8 +67,11 @@ public class RemotingServerTest { } public static RemotingClient createRemotingClient() { - NettyClientConfig config = new NettyClientConfig(); - RemotingClient client = new NettyRemotingClient(config); + return createRemotingClient(new NettyClientConfig()); + } + + public static RemotingClient createRemotingClient(NettyClientConfig nettyClientConfig) { + RemotingClient client = new NettyRemotingClient(nettyClientConfig); client.start(); return client; } diff --git a/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleClient.java b/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleClient.java new file mode 100644 index 0000000000000000000000000000000000000000..8ffbc36a8b62d3d6aca46889d774c3d582522655 --- /dev/null +++ b/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleClient.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.rocketmq.remoting; + +import org.apache.rocketmq.remoting.exception.RemotingConnectException; +import org.apache.rocketmq.remoting.exception.RemotingSendRequestException; +import org.apache.rocketmq.remoting.exception.RemotingTimeoutException; +import org.apache.rocketmq.remoting.netty.NettyClientConfig; +import org.apache.rocketmq.remoting.protocol.RemotingCommand; + +import static org.apache.rocketmq.remoting.TlsTest.getCertsPath; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_AUTHSERVER; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_AUTHCLIENT; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_MODE; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_NEED_CLIENT_AUTH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_TEST_MODE_ENABLE; + +public class SimpleClient { + public static void main(String[] args) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException { + System.setProperty(TLS_SERVER_MODE, "enforcing"); + System.setProperty(TLS_TEST_MODE_ENABLE, "false"); + System.setProperty(TLS_SERVER_NEED_CLIENT_AUTH, "require"); + + System.setProperty(TLS_SERVER_KEYPATH, getCertsPath("server.key")); + System.setProperty(TLS_SERVER_CERTPATH, getCertsPath("server.pem")); + System.setProperty(TLS_SERVER_AUTHCLIENT, "true"); + System.setProperty(TLS_SERVER_TRUSTCERTPATH, getCertsPath("ca.pem")); + + System.setProperty(TLS_CLIENT_KEYPATH, getCertsPath("client.key")); + System.setProperty(TLS_CLIENT_CERTPATH, getCertsPath("client.pem")); + System.setProperty(TLS_CLIENT_AUTHSERVER, "true"); + System.setProperty(TLS_CLIENT_TRUSTCERTPATH, getCertsPath("ca.pem")); + NettyClientConfig clientConfig = new NettyClientConfig(); + clientConfig.setUseTLS(true); + RemotingClient remotingClient = RemotingServerTest.createRemotingClient(clientConfig); + + RequestHeader requestHeader = new RequestHeader(); + requestHeader.setCount(1); + requestHeader.setMessageTitle("Welcome"); + RemotingCommand request = RemotingCommand.createRequestCommand(0, requestHeader); + RemotingCommand response = remotingClient.invokeSync("localhost:8888", request, 1000 * 3); + System.out.println(response); + } +} diff --git a/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleServer.java b/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleServer.java new file mode 100644 index 0000000000000000000000000000000000000000..cc993efb337ea847953a1721fc82a0336c1c6b4d --- /dev/null +++ b/remoting/src/test/java/org/apache/rocketmq/remoting/SimpleServer.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.rocketmq.remoting; + +import static org.apache.rocketmq.remoting.TlsTest.getCertsPath; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_AUTHSERVER; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_AUTHCLIENT; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_MODE; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_NEED_CLIENT_AUTH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_TEST_MODE_ENABLE; + +public class SimpleServer { + public static void main(String[] args) throws InterruptedException { + System.setProperty(TLS_SERVER_MODE, "enforcing"); + System.setProperty(TLS_TEST_MODE_ENABLE, "false"); + System.setProperty(TLS_SERVER_NEED_CLIENT_AUTH, "require"); + + System.setProperty(TLS_SERVER_KEYPATH, getCertsPath("server.key")); + System.setProperty(TLS_SERVER_CERTPATH, getCertsPath("server.pem")); + System.setProperty(TLS_SERVER_AUTHCLIENT, "true"); + System.setProperty(TLS_SERVER_TRUSTCERTPATH, getCertsPath("ca.pem")); + + System.setProperty(TLS_CLIENT_KEYPATH, getCertsPath("client.key")); + System.setProperty(TLS_CLIENT_CERTPATH, getCertsPath("client.pem")); + System.setProperty(TLS_CLIENT_AUTHSERVER, "true"); + System.setProperty(TLS_CLIENT_TRUSTCERTPATH, getCertsPath("ca.pem")); + + RemotingServer remotingServer = RemotingServerTest.createRemotingServer(); + + } +} diff --git a/remoting/src/test/java/org/apache/rocketmq/remoting/TlsTest.java b/remoting/src/test/java/org/apache/rocketmq/remoting/TlsTest.java new file mode 100644 index 0000000000000000000000000000000000000000..8dc11bf35bd950806c3fbc1f8bf51ea79a7fd909 --- /dev/null +++ b/remoting/src/test/java/org/apache/rocketmq/remoting/TlsTest.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.rocketmq.remoting; + +import java.io.File; +import org.apache.rocketmq.remoting.exception.RemotingConnectException; +import org.apache.rocketmq.remoting.exception.RemotingSendRequestException; +import org.apache.rocketmq.remoting.exception.RemotingTimeoutException; +import org.apache.rocketmq.remoting.netty.NettyClientConfig; +import org.apache.rocketmq.remoting.protocol.LanguageCode; +import org.apache.rocketmq.remoting.protocol.RemotingCommand; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.junit.MockitoJUnitRunner; + +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_AUTHSERVER; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_CLIENT_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_AUTHCLIENT; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_CERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_KEYPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_MODE; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_NEED_CLIENT_AUTH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_SERVER_TRUSTCERTPATH; +import static org.apache.rocketmq.remoting.netty.TlsSystemConfig.TLS_TEST_MODE_ENABLE; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertTrue; + +@RunWith(MockitoJUnitRunner.class) +public class TlsTest { + private static RemotingServer remotingServer; + private static RemotingClient remotingClient; + + @BeforeClass + public static void setUp() throws InterruptedException { + System.setProperty(TLS_SERVER_MODE, "enforcing"); + System.setProperty(TLS_TEST_MODE_ENABLE, "false"); + System.setProperty(TLS_SERVER_NEED_CLIENT_AUTH, "require"); + + System.setProperty(TLS_SERVER_KEYPATH, getCertsPath("server.key")); + System.setProperty(TLS_SERVER_CERTPATH, getCertsPath("server.pem")); + System.setProperty(TLS_SERVER_AUTHCLIENT, "true"); + System.setProperty(TLS_SERVER_TRUSTCERTPATH, getCertsPath("ca.pem")); + + System.setProperty(TLS_CLIENT_KEYPATH, getCertsPath("client.key")); + System.setProperty(TLS_CLIENT_CERTPATH, getCertsPath("client.pem")); + System.setProperty(TLS_CLIENT_AUTHSERVER, "true"); + System.setProperty(TLS_CLIENT_TRUSTCERTPATH, getCertsPath("ca.pem")); + remotingServer = RemotingServerTest.createRemotingServer(); + NettyClientConfig clientConfig = new NettyClientConfig(); + clientConfig.setUseTLS(true); + remotingClient = RemotingServerTest.createRemotingClient(clientConfig); + } + + @AfterClass + public static void tearDown() { + remotingClient.shutdown(); + remotingServer.shutdown(); + } + + /** + * public static final String TLS_SERVER_MODE = "tls.server.mode"; + public static final String TLS_ENABLE = "tls.enable"; + public static final String TLS_CONFIG_FILE = "tls.config.file"; + public static final String TLS_TEST_MODE_ENABLE = "tls.test.mode.enable"; + + public static final String TLS_SERVER_NEED_CLIENT_AUTH = "tls.server.need.client.auth"; + public static final String TLS_SERVER_KEYPATH = "tls.server.keyPath"; + public static final String TLS_SERVER_KEYPASSWORD = "tls.server.keyPassword"; + public static final String TLS_SERVER_CERTPATH = "tls.server.certPath"; + public static final String TLS_SERVER_AUTHCLIENT = "tls.server.authClient"; + public static final String TLS_SERVER_TRUSTCERTPATH = "tls.server.trustCertPath"; + + public static final String TLS_CLIENT_KEYPATH = "tls.client.keyPath"; + public static final String TLS_CLIENT_KEYPASSWORD = "tls.client.keyPassword"; + public static final String TLS_CLIENT_CERTPATH = "tls.client.certPath"; + public static final String TLS_CLIENT_AUTHSERVER = "tls.client.authServer"; + public static final String TLS_CLIENT_TRUSTCERTPATH = "tls.client.trustCertPath"; + */ + @Test + public void basicClientServerIntegrationTest() throws InterruptedException, RemotingTimeoutException, RemotingConnectException, RemotingSendRequestException { + RequestHeader requestHeader = new RequestHeader(); + requestHeader.setCount(1); + requestHeader.setMessageTitle("Welcome"); + RemotingCommand request = RemotingCommand.createRequestCommand(0, requestHeader); + RemotingCommand response = remotingClient.invokeSync("localhost:8888", request, 1000 * 3); + System.out.println(response); + assertTrue(response != null); + assertThat(response.getLanguage()).isEqualTo(LanguageCode.JAVA); + assertThat(response.getExtFields()).hasSize(2); + + remotingClient.shutdown(); + remotingServer.shutdown(); + } + + static String getCertsPath(String fileName) { + //File resourcesDirectory = new File("src/test/resources/certs"); + File resourcesDirectory = new File("/Users/zhouxinyu/apache-space/incubator-rocketmq/remoting/src/test/resources/certs/"); + return resourcesDirectory.getAbsolutePath() + "/" + fileName; + } +} diff --git a/remoting/src/test/resources/certs/ca.pem b/remoting/src/test/resources/certs/ca.pem new file mode 100644 index 0000000000000000000000000000000000000000..d75a2af0d7f80856acd194ecb5920d7a380a9906 --- /dev/null +++ b/remoting/src/test/resources/certs/ca.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID6TCCAtGgAwIBAgIJAOvs64b60b2jMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYD +VQQGEwJ6aDELMAkGA1UECAwCemoxCzAJBgNVBAcMAmh6MQ8wDQYDVQQKDAZhcGFj +aGUxETAPBgNVBAsMCHJvY2tldG1xMRwwGgYDVQQDDBNyb2NrZXRtcS5hcGFjaGUu +b3JnMR8wHQYJKoZIhvcNAQkBFhB5dWtvbkBhcGFjaGUub3JnMB4XDTE3MTIxMDEz +NDUwM1oXDTE4MDEwOTEzNDUwM1owgYoxCzAJBgNVBAYTAnpoMQswCQYDVQQIDAJ6 +ajELMAkGA1UEBwwCaHoxDzANBgNVBAoMBmFwYWNoZTERMA8GA1UECwwIcm9ja2V0 +bXExHDAaBgNVBAMME3JvY2tldG1xLmFwYWNoZS5vcmcxHzAdBgkqhkiG9w0BCQEW +EHl1a29uQGFwYWNoZS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +AQDWQF779Mr00/KOYI7jqpUSdhbz8Pf+mose4wAd8+WPz3TdWCShsyHCZplUY18+ +xneEMB8zE5KHnXRejw/eM4PZtS6ptd9XD744EvKo/VvoD0/lRXsmpny4ZODvhuOz +QkOlsYGweq5vlQooUHraqYrn6IgR/ibGopFE7oqxsMPFmkV/Y83Z8KMlTf4sj+hM +LsrhZuenpBoSST/DK5D+W2byKhhZvw8hxHRIA6aNggEdOZvDnS8TCougiQ5vfrdY +fYUayG9QGt44dbhfJoxGnINckzuWcWUZHDZk/rYKyMpqsDCaLDRk9RQJg9b6KvS6 +adw3fgIRUMMZXTGBPokihhV7AgMBAAGjUDBOMB0GA1UdDgQWBBQl6kKtdAjyc4eW +vCm+WfHBNuhdXzAfBgNVHSMEGDAWgBQl6kKtdAjyc4eWvCm+WfHBNuhdXzAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBrKwdIlyBDWWidESRJO2fw4nHy +Rq27YZIrO2Ip/EglngAYBPwlqHFyNawzz2Ik6CJLGhbNTknJcqED6fp7vmeh2SVT +XbRXJ8Ok/qq0KZhK84cUP3SE54nJZYnXNXbXZcq1fJFEs3YY7vpq9pPvZ3GPK8PU +Li/ZwqKhHVujwiMEaL1P/TOm8P0rhK2bpULLzl/WLHUce+oTljH2wmBTZBLf0PHd +MnYibG+4vClDqUQcU2SwSRRIrr8rLwHOEqvcGBqrYVue+kU6E64e4nos+4zDnqyu +fpHsGXUzxJzpM36mlnG/PBad1N/2QQcRWYRT4uRpvSHedoIhWc2PSgg1Bbmg +-----END CERTIFICATE----- diff --git a/remoting/src/test/resources/certs/client.key b/remoting/src/test/resources/certs/client.key new file mode 100644 index 0000000000000000000000000000000000000000..01c947f2d237cbb148656d124616095bf1b34163 --- /dev/null +++ b/remoting/src/test/resources/certs/client.key @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJhhmOCebk9a4Uvc +JYVf1vdpOrRNXb5H6RnGzRTZfzhtcrYIRKWnJwr3O5ZZ4TkdpH8H+fKHM5ytFk26 +EUbYa7mTkpdlplbe8O7Bk7ZRDvdMPsz2CSrhfjHfD96L2X2xGn0Es3gOwE2U7EWz +UVJTQVxjC4FUCIQU8Gxt39tundqTAgMBAAECgYBGLTxgxdX7idkUPLCy+e5gRwAY +JUE07p01l86++WOTsyQPHUOwHojmjfHNTlthGHu3XQ8JWKa2UyhgZ36pZ+ZD/Ppv +LHRMQ/WobYIiZ9foJ2PvhBJkanffAIWpXiy9PCbtRyaKMnwRvhS7AEXP7XYMbJuE +LzqSd9CuXPo5qt2iwQJBAMd4xyW2rY0xtD+FGbbJ6OLtOdRHdkRtta2H01CUlOTE +lsqUmvKuNOTnMTnVoeMNwlXgd0Qbax2qpW/I2QJbv+MCQQDDkIHwAeiGKmb6I4MF +frdTUN8cyXzdA+tjNm6j9/MnzX+lhQZkB1boyyO7wO79ZB57XXuYI4C62tpvluBz +wxmRAkB4TOImX58ZyYFA0eApOmqG+bVnzlWIfXYVmxYZwhJuShX7RVaRx/jEmJ46 +mBoTWsf6jO7BF5wpfzJZUZN3dagrAkEAiH1W8teiHeGCNZqLW05xTKjozwKhLvAJ +XRkkZzQqdOEr8a3CJBYrRhZhPi0Nn7Q8wgUgubItqjwMsE0xIhpMwQJBAJt8fOdZ +rzNBh1mq0ZHGr02P4KB++q1NouqenkBdnlUIBe3UjH5miy/HkPWvcqTTKtADTnGI +4f4a3Gu5NUW9xkQ= +-----END PRIVATE KEY----- diff --git a/remoting/src/test/resources/certs/client.pem b/remoting/src/test/resources/certs/client.pem new file mode 100644 index 0000000000000000000000000000000000000000..8b46470402f197e7674a6d6ac988670abfc9b7b1 --- /dev/null +++ b/remoting/src/test/resources/certs/client.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC8DCCAdgCAQIwDQYJKoZIhvcNAQEFBQAwgYoxCzAJBgNVBAYTAnpoMQswCQYD +VQQIDAJ6ajELMAkGA1UEBwwCaHoxDzANBgNVBAoMBmFwYWNoZTERMA8GA1UECwwI +cm9ja2V0bXExHDAaBgNVBAMME3JvY2tldG1xLmFwYWNoZS5vcmcxHzAdBgkqhkiG +9w0BCQEWEHl1a29uQGFwYWNoZS5vcmcwHhcNMTcxMjEwMTM1MTA0WhcNMTgwMTA5 +MTM1MTA0WjB1MQswCQYDVQQGEwJ6aDELMAkGA1UECAwCemoxCzAJBgNVBAcMAmh6 +MQwwCgYDVQQKDANmb28xDDAKBgNVBAsMA2JhcjEUMBIGA1UEAwwLZm9vQGJhci5j +b20xGjAYBgkqhkiG9w0BCQEWC2Zvb0BiYXIuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQCeXhOsBqy7Ij2WswfrhGKhs6w6kAB10PO5TEflXo3ocntfNHK/ +s9i0dNyzfQCpqxVw2bo4X+DhDjrGzd2aX0k2IrgoMiCsYTemgpKwUn86A8Cwwqm+ +kv6vsIgw9maVIHwRJAR8Z3k74yAD7OmJ87FGLFyBpqkG2+amHJk3mxLeXQIDAQAB +MA0GCSqGSIb3DQEBBQUAA4IBAQCWjvZ2VvfPco3vb8VDqffY+LIm4vM6uwgbaEal +v28pUEhrsaBnhL4AB1oDKAfLd9eBosvoGGqQKqBzPr6cvOBTbR8K734FH5jd5+hX +40gUzRhBn2OaSjWCjBFplsZKHmocnlpogOHHmCVqrofpzcvep6t2xAXS7rr1qN63 +CQUPYGeFPo4GnPRUtyirg2QFFS/PHnjKeyGNs0SuVWYR6a0aiy/AGH8LKgnpoFNu +pWQFlKBJ15SywH7W0ew4I29/zaPfkrGR98OXNt3+9JhYL4j953slw6NnNZwnUgUY +sqhmYKF1VTFqiZMVyrHCKIgMKROpLv+tx1xDWb9o/dnPnVOf +-----END CERTIFICATE----- diff --git a/remoting/src/test/resources/certs/privkey.pem b/remoting/src/test/resources/certs/privkey.pem new file mode 100644 index 0000000000000000000000000000000000000000..9698e2eb592a7eedc936100e069c8214629a85e5 --- /dev/null +++ b/remoting/src/test/resources/certs/privkey.pem @@ -0,0 +1,30 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIJsho4sqLH9YCAggA +MBQGCCqGSIb3DQMHBAiy71jmvceeywSCBMgal02N4c3kK/p+mYR6C+I6SJcnTRFX +cKfkr/8ILSBQrjEVs/wKDbiGX27Qm9A7+T5SDmeuUMsY6N4DJYKiCeeCETTnY0M3 +k66P7ylVHHBYUd41PKt1GH9PVP8/nAX3+nO6O2KrzsZrxIYJwSGo8uXr19HKdtrm +KDhj9WcPJ9F3FC/ND0gAbJnJ/bBffn0XxL6214meoSqkq3sdRKWLAZcWIyNp6lpo +Ud7kINW2LDla5WQ2dkAnQ4W+F1F2n2OnP82knP5u0oBkatuiOCYTeZiRaiGPzKda +hKUa/wrYfsb4TAWgahHUvWjBY05IchxayEw3x4V96cphn2/OMQcdbKgWXH1Wvzvx +RnnvmurtEcwDjylyGtzaf40okTSxgz9eSzBnZAJQ4VPrZSrNnqRtNcl5GMBAxqjh +xRlk2yKeawH7fEjCzy7jg4cZ8smDSyDk4WYZIpMu2TrrTuq/vMy9rolUGAmqZo7J +vQB7chu9YT0JfXVDFfWUOtO/3VdpfG0dPxr4KJwsRDTNah/Dcfle04VtSstaEDU6 +n/8Yw04wa39BkwHiE5pdY/hyV8CmNyyFXR8rcqgFuDjRkm3TyiFdtpl1G7Cnm8t/ +jkDPDtS8JG9hhB+L34pepI8zceW9s2OMOoOYxyjZIeo9GSYUT/4lCuuqQPbqHmRM +No8qMT1dGkX9U7MIOh+lUaUGrF51m8dyWUuGqRuonr7hWUbYugPm5ojV47oYh23G +yNviK3cRfBh3WeC4Tz8OA2FnVqPPW2RBDN3E7BNevOSv+kMeihNKZITgHSu/h7zD +O8l5PoPpy5VL17Yar1KlpSCmrHaKCVkQnflDpPnno5Kan0J8SUODG8+cVHK5uAQP +T9vsrLNR+1kOmKUrwGe8TDg58dn1yJ5ZmyJ7AWgGo0wsUZzpyCY+ygmaO0JHv700 +qKbNwsr5OLWRKhJ7AGQS1T8DcOKNisiXDHczoVS/9igaycLirrnKzgsVme/gzKHm +YT7ZXf6r43vQAZoI8jG+EWbSgNG5nVi1Q8SmKOJVPQ/XwooozjyoMRriiceVY8uz +DUwpQ05nR+zmgBd7FXxJzxlp7P+ZXt5aibULxEtcStQUyDcaTBEmaFuod4XAdwe8 +1moIUHnRZbJn50otYJ6sVBrgZ3NC2AAEgO0aUSay1QqUnKToiUtXjchQ+V6X5dH2 +VLFVk7VIkWslJ5YsA7ecH2KJKnNtWRKs0kVsOnn4XTEe1SIzV2fJwEvxwX3CtPCd +rBybE11r9gzsKJLLrdDiqCk14auVF6xzORsre+8VW5XN7OLzYNIhfHC8Xp7G8o4h +5pEWtvT06YXAS6oypLP/JD5eUuPqovYRixHxu9nh3LiBy8GIOZAZ1NPjKuHf7cMW +8q93WbV50HJXXfTzs8noup87SA6u/Qf9pcqQs1PuLrB3UoigIurCUT9RASNdudXB +YiXZcXcsNcgv8cUXnNfJStH00NEmj9SDPmoK+8vZfjkgu0CcuqyCXRLP4X9Z14MC +UuMP2MoJV9svMuqlXTkOGGZZhN/KOsrSkvvxarKd9Dw7/yXHyaw5qDMbKSrINpzQ +/UEcJL/H016L9WTh+49ntv1vJDBLRIQt4KDUy8VTQ1m7+sAJoEFfKEKDNdDhLUWg +QQE= +-----END ENCRYPTED PRIVATE KEY----- diff --git a/remoting/src/test/resources/certs/server.key b/remoting/src/test/resources/certs/server.key new file mode 100644 index 0000000000000000000000000000000000000000..01c947f2d237cbb148656d124616095bf1b34163 --- /dev/null +++ b/remoting/src/test/resources/certs/server.key @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJhhmOCebk9a4Uvc +JYVf1vdpOrRNXb5H6RnGzRTZfzhtcrYIRKWnJwr3O5ZZ4TkdpH8H+fKHM5ytFk26 +EUbYa7mTkpdlplbe8O7Bk7ZRDvdMPsz2CSrhfjHfD96L2X2xGn0Es3gOwE2U7EWz +UVJTQVxjC4FUCIQU8Gxt39tundqTAgMBAAECgYBGLTxgxdX7idkUPLCy+e5gRwAY +JUE07p01l86++WOTsyQPHUOwHojmjfHNTlthGHu3XQ8JWKa2UyhgZ36pZ+ZD/Ppv +LHRMQ/WobYIiZ9foJ2PvhBJkanffAIWpXiy9PCbtRyaKMnwRvhS7AEXP7XYMbJuE +LzqSd9CuXPo5qt2iwQJBAMd4xyW2rY0xtD+FGbbJ6OLtOdRHdkRtta2H01CUlOTE +lsqUmvKuNOTnMTnVoeMNwlXgd0Qbax2qpW/I2QJbv+MCQQDDkIHwAeiGKmb6I4MF +frdTUN8cyXzdA+tjNm6j9/MnzX+lhQZkB1boyyO7wO79ZB57XXuYI4C62tpvluBz +wxmRAkB4TOImX58ZyYFA0eApOmqG+bVnzlWIfXYVmxYZwhJuShX7RVaRx/jEmJ46 +mBoTWsf6jO7BF5wpfzJZUZN3dagrAkEAiH1W8teiHeGCNZqLW05xTKjozwKhLvAJ +XRkkZzQqdOEr8a3CJBYrRhZhPi0Nn7Q8wgUgubItqjwMsE0xIhpMwQJBAJt8fOdZ +rzNBh1mq0ZHGr02P4KB++q1NouqenkBdnlUIBe3UjH5miy/HkPWvcqTTKtADTnGI +4f4a3Gu5NUW9xkQ= +-----END PRIVATE KEY----- diff --git a/remoting/src/test/resources/certs/server.pem b/remoting/src/test/resources/certs/server.pem new file mode 100644 index 0000000000000000000000000000000000000000..81458b85e66f9251b40056eb143aa73ec1a80c53 --- /dev/null +++ b/remoting/src/test/resources/certs/server.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC8DCCAdgCAQEwDQYJKoZIhvcNAQEFBQAwgYoxCzAJBgNVBAYTAnpoMQswCQYD +VQQIDAJ6ajELMAkGA1UEBwwCaHoxDzANBgNVBAoMBmFwYWNoZTERMA8GA1UECwwI +cm9ja2V0bXExHDAaBgNVBAMME3JvY2tldG1xLmFwYWNoZS5vcmcxHzAdBgkqhkiG +9w0BCQEWEHl1a29uQGFwYWNoZS5vcmcwHhcNMTcxMjEwMTM0NzQ5WhcNMTgwMTA5 +MTM0NzQ5WjB1MQswCQYDVQQGEwJ6aDELMAkGA1UECAwCemoxCzAJBgNVBAcMAmh6 +MQwwCgYDVQQKDANmb28xDDAKBgNVBAsMA2JhcjEUMBIGA1UEAwwLZm9vQGJhci5j +b20xGjAYBgkqhkiG9w0BCQEWC2Zvb0BiYXIuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQCYYZjgnm5PWuFL3CWFX9b3aTq0TV2+R+kZxs0U2X84bXK2CESl +pycK9zuWWeE5HaR/B/nyhzOcrRZNuhFG2Gu5k5KXZaZW3vDuwZO2UQ73TD7M9gkq +4X4x3w/ei9l9sRp9BLN4DsBNlOxFs1FSU0FcYwuBVAiEFPBsbd/bbp3akwIDAQAB +MA0GCSqGSIb3DQEBBQUAA4IBAQA9b/BrjGimboFJBk4I/LheTYRnC+0nYcyqA2BH +mF5ednGnK76lMl/iXB4iy7yYSn3nES5pWwNrwZPyu0SCD5tTNpRkVmzNkL6Mv/PE ++Dip6OIprV0NDrubAi5baX8jzPSKquvz7ULlnPwhFQBXlE9zm1GheChOfioGS9ob +Y7Bwdu/NDGh6JouWSKXRlXArWBMF8sdQ4WSnJgswEO8Kk0Om5bfGJ+NNEeBxbXPd +VxjA+C4N2JT83SzHFJI/AlUJOo0H3dTzwkOGpdykMDBxS9ajoQIfzjrn6N1dRD4a +Xyye5YyQnJ2sgAfYdK0kpHlfnqWus1M1ZDoDMLxjImRrO91y +-----END CERTIFICATE-----