RFR: 8296736: Some PKCS9Attribute can be created but cannot be encoded
Xue-Lei Andrew Fan
xuelei at openjdk.org
Thu Nov 10 02:20:42 UTC 2022
On Thu, 10 Nov 2022 02:08:54 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> src/java.base/share/classes/sun/security/pkcs/SigningCertificateInfo.java line 92:
>>
>>> 90: }
>>> 91:
>>> 92: public byte[] toByteArray() {
>>
>> Is it possible to have the method package private?
>
> The whole class is only used in the same package at the moment. Making only one method package private is not fair.
Hm, maybe making this class package private as well? The returned array is not cloned. It may not worthy of a clone as it is used just once in the package. But if it is public, a lot of time would be costed in the future to check if is a potential issue.
-------------
PR: https://git.openjdk.org/jdk/pull/11070
More information about the security-dev
mailing list