RFR: 8318096: Introduce AsymmetricKey interface with a getParams method [v5]
Sean Mullan
mullan at openjdk.org
Thu Oct 26 17:15:36 UTC 2023
On Thu, 26 Oct 2023 02:43:14 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Create a parent interface `AsymmetricKey` for `PublicKey` and `PrivateKey` and add a `getParams` method there. This makes it available to all current and future public and private keys.
>>
>> No test. Might add one.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>
> use @inheritDoc
src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java line 74:
> 72: */
> 73: @Override
> 74: default AlgorithmParameterSpec getParams() {
What is the benefit of overriding this method if it returns the same type?
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java line 902:
> 900: }
> 901:
> 902: public DSAParams getParams() {
Suggest adding an `@Override` annotation here and below to make it more clear this is an overridden method.
test/jdk/java/security/Signature/GetParams.java line 1:
> 1: /*
Why is this test in the Signature directory? Should it just be in the java/security dir?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1373486381
PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1373475664
PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1373490613
More information about the security-dev
mailing list