Re: RFR: 8286908: ECDSA signature should not return parameters [v2]

2022-05-18 Thread Hai-May Chao
On Wed, 18 May 2022 22:27:18 GMT, Weijun Wang  wrote:

>> Let ECDSA's `engineGetParameters()` always return null. At the same time, 
>> remove the remembered `sigParams` field. One behavior change is that after 
>> calling `setParameter()`, one can call `init()` again with a key using 
>> different parameters. I think this should be allowed since we are reusing 
>> the signature object with a brand new key.
>> 
>> `setParameter` is kept unchanged to be able to deal with certificates still 
>> having parameters after the signature algorithm object identifier. See 
>> https://bugs.openjdk.java.net/browse/JDK-8225745.
>> 
>> Also added SHA1withECDSA to the no-NULL list in `KnownOIDs`.
>> 
>> All security-related tests passed.
>
> Weijun Wang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   will not read params for ECDSA

src/java.base/share/classes/sun/security/util/SignatureUtil.java line 156:

> 154: // Some certificates have params in an ECDSA algorithmID,
> 155: // they are useless and should be ignored.
> 156: return null;

Suggest adding the RFC reference for this change.

-

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


Re: RFR: 8286908: ECDSA signature should not return parameters [v2]

2022-05-18 Thread Valerie Peng
On Wed, 18 May 2022 22:27:18 GMT, Weijun Wang  wrote:

>> Let ECDSA's `engineGetParameters()` always return null. At the same time, 
>> remove the remembered `sigParams` field. One behavior change is that after 
>> calling `setParameter()`, one can call `init()` again with a key using 
>> different parameters. I think this should be allowed since we are reusing 
>> the signature object with a brand new key.
>> 
>> `setParameter` is kept unchanged to be able to deal with certificates still 
>> having parameters after the signature algorithm object identifier. See 
>> https://bugs.openjdk.java.net/browse/JDK-8225745.
>> 
>> Also added SHA1withECDSA to the no-NULL list in `KnownOIDs`.
>> 
>> All security-related tests passed.
>
> Weijun Wang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   will not read params for ECDSA

Looks fine.

-

Marked as reviewed by valeriep (Reviewer).

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


Re: RFR: 8286908: ECDSA signature should not return parameters [v2]

2022-05-18 Thread Weijun Wang
> Let ECDSA's `engineGetParameters()` always return null. At the same time, 
> remove the remembered `sigParams` field. One behavior change is that after 
> calling `setParameter()`, one can call `init()` again with a key using 
> different parameters. I think this should be allowed since we are reusing the 
> signature object with a brand new key.
> 
> `setParameter` is kept unchanged to be able to deal with certificates still 
> having parameters after the signature algorithm object identifier. See 
> https://bugs.openjdk.java.net/browse/JDK-8225745.
> 
> Also added SHA1withECDSA to the no-NULL list in `KnownOIDs`.
> 
> All security-related tests passed.

Weijun Wang has updated the pull request incrementally with one additional 
commit since the last revision:

  will not read params for ECDSA

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8758/files
  - new: https://git.openjdk.java.net/jdk/pull/8758/files/b13de5a9..aceeb4a7

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8758=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8758=00-01

  Stats: 13 lines in 2 files changed: 1 ins; 8 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8758.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8758/head:pull/8758

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