pivotal-jbarrett commented on a change in pull request #7315:
URL: https://github.com/apache/geode/pull/7315#discussion_r805071856



##########
File path: 
geode-core/src/upgradeTest/java/org/apache/geode/internal/net/SocketCreatorUpgradeTest.java
##########
@@ -0,0 +1,429 @@
+/*
+ * 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.geode.internal.net;
+
+import static java.lang.Integer.parseInt;
+import static java.lang.String.format;
+import static java.lang.System.getenv;
+import static java.nio.charset.Charset.defaultCharset;
+import static org.apache.commons.io.FileUtils.readFileToString;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_CLIENT_PROTOCOLS;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_ENABLED_COMPONENTS;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_ENDPOINT_IDENTIFICATION_ENABLED;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_PASSWORD;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_TYPE;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_PROTOCOLS;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_REQUIRE_AUTHENTICATION;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_SERVER_PROTOCOLS;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
+import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_TYPE;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.GeneralSecurityException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import org.apache.geode.cache.ssl.CertStores;
+import org.apache.geode.cache.ssl.CertificateBuilder;
+import org.apache.geode.cache.ssl.CertificateMaterial;
+import org.apache.geode.internal.UniquePortSupplier;
+import org.apache.geode.internal.shared.NativeCalls;
+import org.apache.geode.test.junit.rules.gfsh.GfshRule;
+import org.apache.geode.test.junit.rules.gfsh.GfshScript;
+import org.apache.geode.test.version.TestVersion;
+import org.apache.geode.test.version.VersionManager;
+
+@RunWith(Parameterized.class)
+public class SocketCreatorUpgradeTest {
+  public static final String ALGORITHM = "SHA256withRSA";
+  public static final int EXPIRATION = 1;
+  public static final String STORE_PASSWORD = "geode";
+  public static final String STORE_TYPE = "jks";
+  public static final String PROTOCOL_TLSv1_2 = "TLSv1.2";
+  public static final String PROTOCOL_TLSv1_2_SSLv2Hello = 
"TLSv1.2,SSLv2Hello";
+  public static final String PROTOCOL_ANY = "any";
+  public static final String LOCATOR_1 = "locator1";
+  public static final String LOCATOR_2 = "locator2";
+
+  private final String startLocator1;
+  private final String startLocator2;
+  private final String startLocator1New;
+  private final String startLocator2New;
+  private final String stopLocator1;
+  private final String stopLocator2;
+
+  @Rule
+  public TemporaryFolder tempFolder = new TemporaryFolder();
+
+  @Rule
+  public final GfshRule gfshOldGeodeOldJava;
+
+  @Rule
+  public final GfshRule gfshOldGeodeNewJava;
+
+  @Rule
+  public final GfshRule gfshNewGeodeOldJava;
+
+  @Rule
+  public final GfshRule gfshNewGeodeNewJava;
+
+  private final File root;
+  private final File keyStoreFile;
+  private final File trustStoreFile;
+  private final File securityPropertiesFile;
+  private final File newSecurityPropertiesFile;
+
+  @Parameters(name = "{0}")
+  public static Collection<String> data() {
+    final List<String> result = 
VersionManager.getInstance().getVersionsWithoutCurrent();
+    result.removeIf(s -> TestVersion.compare(s, "1.13.0") < 0);

Review comment:
       Yes, I am currently working on migration path from 1.12. The 1.13 and 
1.4 paths aren't compatibly with 1.12.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to