RFR: 8243585: AlgorithmChecker::check throws confusing exception when it rejects the signer key [v3]
Weijun Wang
weijun at openjdk.java.net
Thu Oct 21 13:50:12 UTC 2021
On Thu, 21 Oct 2021 13:43:40 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> OK, but in the ctor `trustedPubKey` is also null.
>
> True, but that's because none of the fields are set yet, so it feels odd for the ctor to check if the field is null when it is always true, even if it is a different method. What if I create a separate method `setTrustAnchor(TrustAnchor)` which the ctor calls, and then change `trySetTrustAnchor` to:
>
> if (this.trustedPubKey == null) {
> setTrustAnchor(anchor);
> }
Sounds good.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5928
More information about the security-dev
mailing list