forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to verify JITServer with SSL
Add tests to the existing jitserver tests under cmdLineTest for checking /verifying SSL connections with JITServer. This is part 2 for the work done in eclipse-openj9#17985 . Closes: #eclipse-openj9#17967 Signed-off-by: SajinaKandy <[email protected]>
- Loading branch information
1 parent
676b9a4
commit 3663860
Showing
3 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
test/functional/cmdLineTests/jitserver/jitserversslconfig.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# Copyright IBM Corp. and others 2023 | ||
# | ||
# 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] https://openjdk.org/legal/assembly-exception.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0 | ||
# | ||
|
||
echo "Creating SSL certificates"; | ||
|
||
COMMON_NAME="localhost" | ||
VALID_DAYS=365 | ||
|
||
# Generate private key | ||
openssl genrsa -out key.pem 2048 | ||
|
||
# Generate self-signed certificate | ||
openssl req -new -x509 -sha256 -key key.pem -out cert.pem -days $VALID_DAYS -subj "/CN=$COMMON_NAME" | ||
|
||
# Generate another private key and self-signed certificate | ||
openssl req -nodes -newkey rsa:2048 -keyout wrongKey.pem -x509 -days 365 -out wrongCert.pem -subj "/CN=localhost" | ||
|
||
# Generate another self-signed certificate | ||
openssl req -new -x509 -sha256 -key key.pem -out nosslserverCert.pem -days $VALID_DAYS -subj "/CN=$COMMON_NAME" | ||
|
||
echo "Certificates generated"; |