RFR: 8286024: PKCS12 keystore shows "DES/CBC" as the algorithm of a DES SecretKeyEntry

Weijun Wang weijun at openjdk.java.net
Mon May 2 21:16:49 UTC 2022


PKCS12 stores the object identifier of a SecretKey along with it, and when retrieved, translate the object identifier to an algorithm name. Unfortunately, inside `KnownOIDs.java`, "DES" is [only registered as](https://github.com/wangweij/jdk/blob/7a6cbef157b67bb4fb877617f2a23228aade9a5d/src/java.base/share/classes/sun/security/util/KnownOIDs.java#L368-L368) an alias of another name "DES/CBC". We should modify it to "DES" before returning the secret key.

-------------

Commit messages:
 - remove exe bits
 - fix

Changes: https://git.openjdk.java.net/jdk/pull/8505/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8505&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286024
  Stats: 53 lines in 2 files changed: 52 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8505.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8505/head:pull/8505

PR: https://git.openjdk.java.net/jdk/pull/8505



More information about the security-dev mailing list