Re: RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end [v2]

2023-05-18 Thread Sean Mullan
On Thu, 18 May 2023 14:48:58 GMT, Weijun Wang wrote: >> When parsing a byte array to a private or public key, it's now converted to >> a `ByteArrayInputStream` and the parser does not report an error if there >> are extra bytes at the end. > > Weijun Wang has updated the pull request incrementa

Re: RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end [v2]

2023-05-18 Thread Weijun Wang
> When parsing a byte array to a private or public key, it's now converted to a > `ByteArrayInputStream` and the parser does not report an error if there are > extra bytes at the end. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: a

Re: RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end

2023-05-17 Thread Weijun Wang
On Wed, 17 May 2023 18:14:38 GMT, Sean Mullan wrote: >> When parsing a byte array to a private or public key, it's now converted to >> a `ByteArrayInputStream` and the parser does not report an error if there >> are extra bytes at the end. > > src/java.base/share/classes/sun/security/pkcs/PKCS8

Re: RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end

2023-05-17 Thread Sean Mullan
On Wed, 17 May 2023 18:51:11 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/pkcs/PKCS8Key.java line 99: >> >>> 97: } catch (IOException e) { >>> 98: throw new InvalidKeyException("IOException: " + >>> 99: e.getMessage()); >> >> How ab

Re: RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end

2023-05-17 Thread Sean Mullan
On Fri, 12 May 2023 16:23:53 GMT, Weijun Wang wrote: > When parsing a byte array to a private or public key, it's now converted to a > `ByteArrayInputStream` and the parser does not report an error if there are > extra bytes at the end. src/java.base/share/classes/sun/security/pkcs/PKCS8Key.ja

RFR: 8308010: X509Key and PKCS8Key allows garbage bytes at the end

2023-05-12 Thread Weijun Wang
When parsing a byte array to a private or public key, it's now converted to a `ByteArrayInputStream` and the parser does not report an error if there are extra bytes at the end. - Commit messages: - the fix Changes: https://git.openjdk.org/jdk/pull/13958/files Webrev: https://web