Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Adam Petcher
New webrev: http://cr.openjdk.java.net/~apetcher/8182999/webrev.01/ Yes, this is a good idea. I made this work by printing out the value from AlgorithmParameters.toString(), so hopefully that means you should always get a useful string. At the moment (with SunEC AlgorithmParameters), the strin

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Seán Coffey
Thanks for the update! Looks fine to me. Regards, Sean. On 10/07/17 16:13, Adam Petcher wrote: New webrev: http://cr.openjdk.java.net/~apetcher/8182999/webrev.01/ Yes, this is a good idea. I made this work by printing out the value from AlgorithmParameters.toString(), so hopefully that means

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Michael StJohns
Actually - wouldn't it make a lot more sense to generalize the provider so it can take ANY set of curve data? Locking this to only what has an OID to parameters mapping doesn't seem to be actually meeting the contract for an EC key generator. I understand a number of tools (e.g. PKIX related/

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Adam Petcher
This fix addresses an issue in which the provider behaves incorrectly when initialized with parameters for a curve that is not supported by the provider. If I am interpreting your suggestion correctly, it sounds like you are requesting a change to the set of curves that is supported by the prov

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Michael StJohns
On 7/10/2017 12:59 PM, Adam Petcher wrote: This fix addresses an issue in which the provider behaves incorrectly when initialized with parameters for a curve that is not supported by the provider. If I am interpreting your suggestion correctly, it sounds like you are requesting a change to the

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Adam Petcher
On 7/10/2017 1:55 PM, Michael StJohns wrote: What I'm mostly trying to get at here is to decouple or remove the list of curves in ecdecode.c in favor of the list in the java stuff (CurveDB.java) (or elsewhere). The C code should mostly only have to deal with the math and not the housekeep

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Michael StJohns
On 7/10/2017 2:28 PM, Adam Petcher wrote: On 7/10/2017 1:55 PM, Michael StJohns wrote: What I'm mostly trying to get at here is to decouple or remove the list of curves in ecdecode.c in favor of the list in the java stuff (CurveDB.java) (or elsewhere). The C code should mostly only have

Re: RFR 8182999: SunEC throws ProviderException on invalid curves

2017-07-10 Thread Adam Petcher
I created JDK-8184122[1] to track this SunEC refactoring effort. [1] https://bugs.openjdk.java.net/browse/JDK-8184122 On 7/10/2017 2:51 PM, Michael StJohns wrote: (Hmm.. have you checked to make sure that the list of curves in ecdecode is a subset of the curves in CurveDB - if not you may st