`AlgorithmId.getName` is updated for PBES2 algorithm identifiers so it directly 
returns the standard algorithm defined by Java (Ex: 
`PBEWithHmacSHA256AndAES_256`), instead of a simple "PBES2".

Please note I specifically update the javadoc for this method to clarify that 
this name is meant to be a name that's recognized by various `getInstance()` 
methods. This is how we are actually using this method.

After this change, the `javax.crypto.EncryptedPrivateKeyInfo` API automatically 
works with PBES2 encrypted data. As the spec of its `getAlgName()` methods 
says, "Standard name is returned". This is shown by the newly include 
regression test.

Existing security-related tests run fine.

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

Commit messages:
 - typo
 - the fix

Changes: https://git.openjdk.java.net/jdk/pull/8615/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8615&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286428
  Stats: 149 lines in 3 files changed: 118 ins; 16 del; 15 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8615.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8615/head:pull/8615

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

Reply via email to