RFR: 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files

Valerie Peng valeriep at openjdk.java.net
Mon Nov 2 18:03:56 UTC 2020


On Sat, 31 Oct 2020 03:28:24 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> 
> 
> > > The constants in PKCS11Exception are duplicated in PKCS11Constants.
> > > ```
> > >             0x00000000,
> > > ```
> > > 
> > > 
> > > vs
> > > ```
> > > public static final long  CKR_OK                 = 0x00000000L;
> > > ```
> > > 
> > > 
> > > Is there any way to simplify it?
> > 
> > 
> > One defines the value, the other defines the displayed String. I agree that the way it's currently done is a bit outdated and may be error prone. We can re-visit this after finishing other pending PKCS11 RFEs..
> 
> Since the value is already defined PKCS11Constants, we can use it in PKCSException and does not need to write 0x00000000 anymore.

Ok, I see what you are saying now. Will change it to use the PKCS11Constants constants.

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

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



More information about the security-dev mailing list