RFR: 8255557: Decouple GCM from CipherCore [v3]

Anthony Scarpino ascarpino at openjdk.java.net
Fri May 21 00:18:36 UTC 2021


On Tue, 18 May 2021 21:58:24 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   cleanup
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 149:
> 
>> 147:             if (spec == null) {
>> 148:                 throw new InvalidKeyException("No GCMParameterSpec specified");
>> 149:             }
> 
> This seems redundant as it's already been checked in engineInit() before calling this method. Line 154 directly calls spec.getTLen() without checking spec != null.

That does appear to be unnecessary. engineInit() make sure there is a spec exists.

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

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


More information about the security-dev mailing list