RFR: JDK-8032573

Wang Weijun weijun.wang at oracle.com
Tue Sep 30 00:39:15 UTC 2014


X509Factory.java:

502                 data = readOneBlock(is);

Should it be pbis?

Actually I would suggest reusing the variable name "is" to prevent any such error.

Also, I am not sure if using a PushbackInputStream will hurt the performance. The readOneBlock() method already includes the read-first-byte logic inside so maybe we can change it a little to cover the fix. For example, I can think of renaming it to readOneBlock(firstByte, is) so inside your fix you can call readOneBlock(perkByte, is) and in other cases call readOneBlock(is.read(), is). This might look a little strange but hopefully you can find a more concise one.

Thanks
Max

On Sep 30, 2014, at 5:11, Jamil Nimeh <jamil.j.nimeh at oracle.com> wrote:

> Hello all,
> 
> This review fixes a small regression in the generateCertificates() and generateCRLs() methods for the CertificateFactory class.  At some point, input consisting entirely of non-certificate data ceased to throw CertificateException or CRLException and instead returned an empty collection.  This restores the exception-throwing behavior, but only when the entire stream is non-cert data.  Cases where there is leading/trailing text around a valid PEM-encoded certificate or CRL will still ignore the leading/trailing data and parse the certificate/CRL properly as before.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8032573
> Review: http://cr.openjdk.java.net/~ascarpino/8032573/webrev.01/
> 
> Thank you,
> --Jamil
> 




More information about the security-dev mailing list