diff --git a/test/functional/Java8andUp/playlist.xml b/test/functional/Java8andUp/playlist.xml index d8a29fe6e64..e5dd306ca1b 100644 --- a/test/functional/Java8andUp/playlist.xml +++ b/test/functional/Java8andUp/playlist.xml @@ -768,6 +768,9 @@ functional + + openj9 + diff --git a/test/functional/cmdLineTests/openssl/build.xml b/test/functional/cmdLineTests/openssl/build.xml new file mode 100644 index 00000000000..cb3d8b505fd --- /dev/null +++ b/test/functional/cmdLineTests/openssl/build.xml @@ -0,0 +1,70 @@ + + + + + + + + Build cmdLineTests_OpenSSL + + + + + + + + + + + + + + + Ant version is ${ant.version} + ============COMPILER SETTINGS============ + ===fork: yes + ===executable: ${compiler.javac} + ===debug: on + ===destdir: ${DEST} + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/functional/cmdLineTests/openssl/openssl.xml b/test/functional/cmdLineTests/openssl/openssl.xml new file mode 100644 index 00000000000..f85dc302162 --- /dev/null +++ b/test/functional/cmdLineTests/openssl/openssl.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + $EXE$ -Djdk.nativeCryptoTrace=true $CLASSPATH$ org.openj9.test.openssl.CryptoTest + using Native crypto library + Crypto test COMPLETED + Native crypto library load failed + Crypto test FAILED + + diff --git a/test/functional/cmdLineTests/openssl/playlist.xml b/test/functional/cmdLineTests/openssl/playlist.xml new file mode 100644 index 00000000000..be3879860ca --- /dev/null +++ b/test/functional/cmdLineTests/openssl/playlist.xml @@ -0,0 +1,83 @@ + + + + + + + cmdLineTester_CryptoTest + + NoOptions + + $(JAVA_COMMAND) $(JVM_OPTIONS) \ + -DTEST_RESROOT=$(Q)$(TEST_RESROOT)$(D)$(Q) -DRESJAR=$(CMDLINETESTER_RESJAR) \ + -DEXE='$(JAVA_COMMAND) $(JVM_OPTIONS)' -jar $(CMDLINETESTER_JAR) -config $(Q)$(TEST_RESROOT)$(D)openssl.xml$(Q) \ + -verbose -explainExcludes -nonZeroExitWhenError; \ + $(TEST_STATUS) + + + ^os.aix,^os.osx + + sanity + + + functional + + + openj9 + + + 8 + 9 + 10 + + + + cmdLineTester_CryptoTest_11 + + NoOptions + + $(JAVA_COMMAND) $(JVM_OPTIONS) \ + -DTEST_RESROOT=$(Q)$(TEST_RESROOT)$(D)$(Q) -DRESJAR=$(CMDLINETESTER_RESJAR) \ + -DEXE='$(JAVA_COMMAND) $(JVM_OPTIONS)' -jar $(CMDLINETESTER_JAR) -config $(Q)$(TEST_RESROOT)$(D)openssl.xml$(Q) \ + -verbose -explainExcludes -nonZeroExitWhenError; \ + $(TEST_STATUS) + + + ^os.aix,^os.osx,^os.win + + sanity + + + functional + + + openj9 + + + 11 + + + \ No newline at end of file diff --git a/test/functional/cmdLineTests/openssl/src/org/openj9/test/openssl/CryptoTest.java b/test/functional/cmdLineTests/openssl/src/org/openj9/test/openssl/CryptoTest.java new file mode 100644 index 00000000000..190499ffb4f --- /dev/null +++ b/test/functional/cmdLineTests/openssl/src/org/openj9/test/openssl/CryptoTest.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2019, 2019 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this + * distribution and is available at https://www.eclipse.org/legal/epl-2.0/ + * or the Apache License, Version 2.0 which accompanies this distribution and + * is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * This Source Code may also be made available under the following + * Secondary Licenses when the conditions for such availability set + * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU + * General Public License, version 2 with the GNU Classpath + * Exception [1] and GNU General Public License, version 2 with the + * OpenJDK Assembly Exception [2]. + * + * [1] https://www.gnu.org/software/classpath/license.html + * [2] http://openjdk.java.net/legal/assembly-exception.html + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception + *******************************************************************************/ + +package org.openj9.test.openssl; + +import java.security.KeyFactory; + +public class CryptoTest { + public static void main(String[] args) { + try { + KeyFactory.getInstance("RSA"); + System.out.println("Crypto test COMPLETED"); + } catch (Exception e) { + System.out.println("Crypto test FAILED"); + e.printStackTrace(); + } + } +} \ No newline at end of file