On Mon, 14 Nov 2022 21:44:14 GMT, Weijun Wang <[email protected]> wrote:
>> test/jdk/sun/security/pkcs/pkcs9/PKCS9AttrTypeTests.java line 176: >> >>> 174: // Encoding is supported >>> 175: DerOutputStream dos = new DerOutputStream(); >>> 176: p9Attr.encode(dos); >> >> Should we check the encoding has the expected value? Otherwise, it looks >> like we only require that no exception is thrown? > > You mean comparing it with the original value? I tried that but not always > the same. For example, a string might be an IA5String at the beginning but > becomes a UTF8String after re-encoding. I see, not surprising, perhaps just checking that it's not empty? Or even that may not hold true? ------------- PR: https://git.openjdk.org/jdk/pull/11070
