Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct a further regression in the fix to enable the use of Java key stores that contain multiple keys that do not all have the same password. The regression broke support for some FIPS compliant key stores.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1809263 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Sep 22, 2017
1 parent e69fbc0 commit 700c1f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion java/org/apache/tomcat/util/net/jsse/JSSEUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ public KeyManager[] getKeyManagers() throws Exception {
Key k = ks.getKey(keyAlias, keyPassArray);
if (k != null && "PKCS#8".equalsIgnoreCase(k.getFormat())) {
// Switch to in-memory key store
ksUsed = KeyStore.getInstance("JKS");
String provider = certificate.getCertificateKeystoreProvider();
if (provider == null) {
ksUsed = KeyStore.getInstance(certificate.getCertificateKeystoreType());
} else {
ksUsed = KeyStore.getInstance(certificate.getCertificateKeystoreType(),
provider);
}
ksUsed.load(null, null);
ksUsed.setKeyEntry(keyAlias, k, keyPassArray, ks.getCertificateChain(keyAlias));
}
Expand Down
6 changes: 6 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@
<update>
Add a way to set the property source in embedded mode. (remm)
</update>
<fix>
<bug>61557</bug>: Correct a further regression in the fix to enable the
use of Java key stores that contain multiple keys that do not all have
the same password. The regression broke support for some FIPS compliant
key stores. (markt)
</fix>
</changelog>
</subsection>
<subsection name="Other">
Expand Down

0 comments on commit 700c1f4

Please sign in to comment.