On Tue, 15 Jun 2021 22:37:29 GMT, Valerie Peng <valer...@openjdk.org> wrote:

> Could someone please help review this trivial fix? The real changes are the 
> two PKCS11 cipher impl classes under 
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/. The rest of 
> classes are just cleanups, e.g. dead code or unused code. The 
> test/jdk/javax/crypto/Cipher/TestCipherMode.java is updated to cover more 
> cipher impls for completeness sake. It passes without this fix, so I only add 
> the bug id to the the other test, i.e. 
> test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java, which verifies the 
> PKCS#11 cipher impls.
> 
> Thanks,
> Valerie

Looks good to me.

Marked as reviewed by xuelei (Reviewer).

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java 
line 365:

> 363:             default:
> 364:                 // should never happen; checked by Cipher.init()
> 365:                 throw new AssertionError("Unknown mode: " + opmode);

This update looks good to me.  But there is a potential issues, maybe for all 
switch statements.  If the cipher modes is extended to support more items, we 
may have to look for and update all the switch uses and make sure there is no 
broken.  Anyway, for my personal understanding, there is nothing we could do 
right now.

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

PR: https://git.openjdk.java.net/jdk17/pull/69

Reply via email to