On Wed, 2 Dec 2020 17:34:11 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:

>> I need a code review for this small code change.  The code did not run the 
>> data through the DER decoding class before setting it to the point when the 
>> SunPKCS11 configuration had UseEcX963Encoding set to false.
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11ECKeyFactory.java
>  line 303:
> 
>> 301:                 } else {
>> 302:                     point = decodePoint(attributes[0].getByteArray(), 
>> params.getCurve());
>> 303:                 }
> 
> You could save a "!" operation in 299 if switch line 302 and line 300.

I only used "!" for consistency with existing usage in PK11Key.java:1080.    Is 
there a reason to avoid "!" other than maybe readability?

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

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

Reply via email to