Skip to content

Commit

Permalink
adding global args
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwdv committed Dec 3, 2024
1 parent a1d7275 commit d789de2
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ public ProgramOutput startServerWithArgs(boolean preClean, boolean cleanStart,
if (isFIPS140_3EnabledAndSupported()) {
Log.info(c, "startServerWithArgs",
"Liberty server is running JDK version: " + info.majorVersion() + " and vendor: " + info.VENDOR);
Map<String, String> fipsOpts = getFipsJvmOptions(info);
Map<String, String> fipsOpts = getFipsJvmOptions(info, false);
StringJoiner joiner = new StringJoiner(" ", " ", "");
for (String key : fipsOpts.keySet()) {
if (fipsOpts.get(key) != null) {
Expand Down Expand Up @@ -8055,10 +8055,10 @@ public void configureLTPAKeys() throws IOException, InterruptedException {
}

public Map<String, String> getFipsJvmOptions() throws IOException {
return getFipsJvmOptions(JavaInfo.forServer(this));
return getFipsJvmOptions(JavaInfo.forServer(this), true);
}

public Map<String, String> getFipsJvmOptions(JavaInfo info) throws IOException {
public Map<String, String> getFipsJvmOptions(JavaInfo info, boolean includeGlobalArgs) throws IOException {
Map<String, String> opts = new HashMap<>();
if (isFIPS140_3EnabledAndSupported()) {
Log.info(c, "getFipsJvmOptions",
Expand All @@ -8071,8 +8071,6 @@ public Map<String, String> getFipsJvmOptions(JavaInfo info) throws IOException {
opts.put("-Dsemeru.fips", "true");
opts.put("-Dsemeru.customprofile", "OpenJCEPlusFIPS.FIPS140-3-withPKCS12");
opts.put("-Dcom.ibm.fips.mode", "140-3");
// JVM_ARGS += " -Djavax.net.debug=all"; // Uncomment as needed for additional
// debugging
} else if (info.majorVersion() == 8) {
Log.info(c, "getFipsJvmOptions", "FIPS 140-3 global build properties is set for server "
+ getServerName()
Expand All @@ -8081,8 +8079,11 @@ public Map<String, String> getFipsJvmOptions(JavaInfo info) throws IOException {
opts.put("-Dcom.ibm.jsse2.usefipsprovider", "true");
opts.put("-Dcom.ibm.jsse2.usefipsProviderName", "IBMJCEPlusFIPS");
opts.put("-Dcom.ibm.fips.mode", "140-3");
// JVM_ARGS += " -Djavax.net.debug=all"; // Uncomment as needed for additional
// debugging

}
if (includeGlobalArgs) {
opts.put("-Dglobal.fips_140-3", "true");
opts.put("-Dcom.ibm.ws.beta.edition", "true");
}
}
return opts;
Expand Down

0 comments on commit d789de2

Please sign in to comment.