On Tue, 29 Sep 2020 01:01:12 GMT, Valerie Peng <valer...@openjdk.org> wrote:
>> Yes, this is because `DerValue::getOctetString` allows constructed value but >> `DerInputStream::getOctetString` only >> accepts primitive value. This is for compatibility. >> All other methods will have tag checked inside the corresponding DerValue >> method. Do you prefer a fast fail? > > I just wonder why the different handling. Do you know why? Is it really > used/needed, just curious? I don't know. Both methods are called, and `DerValue::getOctetString` is actual used in reality when reading content data embedded inside PKCS #7 (which is not uncommon). All I can do now is to make them unchanged. >> There is allowBER, so BER. > > Well, allowBER may be false? How about ASN.1/DER/BER? I'll just write ASN.1 then. ------------- PR: https://git.openjdk.java.net/jdk/pull/232