Skip to content

Commit 44f4e46

Browse files
authored
Merge pull request #32242 from utle/fips-ssl-test
Revert FIPS 140-3 SSL protocol back to TLS
2 parents e367425 + 1d4c79f commit 44f4e46

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

dev/com.ibm.ws.ssl/src/com/ibm/websphere/ssl/SSLConfig.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*******************************************************************************
2-
* Copyright (c) 1997, 2020 IBM Corporation and others.
2+
* Copyright (c) 1997, 2025 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License 2.0
55
* which accompanies this distribution, and is available at
66
* http://www.eclipse.org/legal/epl-2.0/
7-
*
7+
*
88
* SPDX-License-Identifier: EPL-2.0
99
*
1010
* Contributors:
@@ -130,6 +130,9 @@ private void initializeDefaults() {
130130
}
131131

132132
JSSEProvider defaultProvider = JSSEProviderFactory.getInstance();
133+
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
134+
Tr.debug(tc, "Defafult JSSEProvider: " + defaultProvider.toString());
135+
}
133136

134137
if (getProperty(Constants.SSLPROP_KEY_MANAGER) == null)
135138
setProperty(Constants.SSLPROP_KEY_MANAGER, JSSEProviderFactory.getKeyManagerFactoryAlgorithm());
@@ -138,9 +141,10 @@ private void initializeDefaults() {
138141
&& null != defaultProvider.getKeyStoreProvider())
139142
setProperty(Constants.SSLPROP_KEY_STORE_PROVIDER, defaultProvider.getKeyStoreProvider());
140143

141-
if (getProperty(Constants.SSLPROP_PROTOCOL) == null)
144+
if (getProperty(Constants.SSLPROP_PROTOCOL) == null) {
142145
setProperty(Constants.SSLPROP_PROTOCOL, defaultProvider.getDefaultProtocol());
143-
146+
Tr.debug(tc, "Default protocol: " + defaultProvider.getDefaultProtocol());
147+
}
144148
if (getProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION) == null)
145149
setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION, Constants.FALSE);
146150

@@ -190,14 +194,16 @@ private void initializeDefaults() {
190194
// When only a trust store is specified, use it as the key store as well.
191195
if (keyStore == null && trustStore != null && trustStorePassword != null && trustStoreType != null) {
192196
setProperty(Constants.SSLPROP_KEY_STORE, trustStore);
193-
if (trustStoreName != null) setProperty(Constants.SSLPROP_KEY_STORE_NAME, trustStoreName);
197+
if (trustStoreName != null)
198+
setProperty(Constants.SSLPROP_KEY_STORE_NAME, trustStoreName);
194199
setProperty(Constants.SSLPROP_KEY_STORE_PASSWORD, trustStorePassword);
195200
setProperty(Constants.SSLPROP_KEY_STORE_TYPE, trustStoreType);
196201
}
197202
// When only a key store is specified, use it as the trust store as well.
198203
else if (trustStore == null && keyStore != null && keyStorePassword != null && keyStoreType != null) {
199204
setProperty(Constants.SSLPROP_TRUST_STORE, keyStore);
200-
if (keyStoreName != null) setProperty(Constants.SSLPROP_TRUST_STORE_NAME, keyStoreName);
205+
if (keyStoreName != null)
206+
setProperty(Constants.SSLPROP_TRUST_STORE_NAME, keyStoreName);
201207
setProperty(Constants.SSLPROP_TRUST_STORE_PASSWORD, keyStorePassword);
202208
setProperty(Constants.SSLPROP_TRUST_STORE_TYPE, keyStoreType);
203209
}
@@ -298,7 +304,7 @@ public String toString() {
298304
* Load ConfigURL from a url string that names a properties file. This
299305
* method does not check that values are in valid range,
300306
*
301-
* @param propertiesURL - the properties file to load the SSL properties
307+
* @param propertiesURL - the properties file to load the SSL properties
302308
* @param multiConfigURL
303309
* @return SSLConfig[]
304310
*/

dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/ProtocolHelper.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ public void checkProtocolValueGood(String sslProtocol) throws SSLException, Unsu
9393
} else {
9494
String protocol = protocols[0];
9595
if (!validatedProtocols.contains(protocol)) {
96-
// TODO: uncomment the following once SSL tests have been updated for FIPS 140-3
97-
// if (fips140_3Enabled && !allowedProtocols.contains(protocol)) {
98-
// Tr.error(tc, "ssl.protocol.error.CWPKI0832E", protocol);
99-
// throw new SSLException("Protocol provided is not appropriate for a protocol list.");
100-
// }
10196
checkProtocol(protocol);
10297
}
10398
}

dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/provider/IBMJSSEProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public IBMJSSEProvider() {
4242

4343
String protocol = Constants.PROTOCOL_SSL_TLS_V2;
4444
if (CryptoUtils.isFips140_3Enabled()) {
45-
protocol = Constants.PROTOCOL_TLSV1_2;
45+
protocol = Constants.PROTOCOL_TLS;
4646
}
4747

4848
initialize(JSSEProviderFactory.getKeyManagerFactoryAlgorithm(), JSSEProviderFactory.getTrustManagerFactoryAlgorithm(), Constants.IBMJSSE2_NAME, null,

dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/provider/SunJSSEProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public SunJSSEProvider() {
4040
super();
4141
String protocol = Constants.PROTOCOL_SSL;
4242
if (CryptoUtils.isFips140_3Enabled() && CryptoUtils.isSemeruFips()) {
43-
protocol = Constants.PROTOCOL_TLSV1_2;
43+
protocol = Constants.PROTOCOL_TLS;
4444
}
4545

4646
initialize(JSSEProviderFactory.getKeyManagerFactoryAlgorithm(), JSSEProviderFactory.getTrustManagerFactoryAlgorithm(), Constants.SUNJSSE_NAME, null,

0 commit comments

Comments
 (0)