On Thu, 11 Feb 2021 19:48:23 GMT, Weijun Wang <[email protected]> wrote:
>> Hai-May Chao has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> API used to get AKID
>
> src/java.base/share/classes/sun/security/tools/keytool/Main.java line 1482:
>
>> 1480: byte[] signerSubjectKeyIdExt =
>> ((X509Certificate)signerCert).getExtensionValue(
>> 1481: KnownOIDs.SubjectKeyID.value());
>> 1482:
>
> How about pass in the `KeyIdentifier` instead of `PublicKey akey` into the
> createV3Extensions method? And you can calculated with
> X509CertImpl impl;
> if (signerCert instanceof X509CertImpl) {
> impl = (X509CertImpl) signerCert;
> } else {
> impl = new X509CertImpl(signerCert.getEncoded());
> }
> impl.getSubjectKeyId();
Changed as suggested.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2343