Re: RFR 8201867: Kerberos keytabs with holes in certain places are parsed incorrectly

2018-05-16 Thread Weijun Wang
> On May 17, 2018, at 6:43 AM, Valerie Peng wrote: > > > Looking at the BufferedInputStream impl, it looks like its skip(...) method > should trigger the internal array to be refilled when the internal bytes are > used up. Maybe something like below would also work?

Re: RFR 8202299: Java Keystore fails to load PKCS12/PFX certificates created in WindowsServer2016

2018-05-16 Thread Weijun Wang
> On May 17, 2018, at 2:42 AM, Sean Mullan wrote: > > The while(true) in PKCS12KeyStore.java seems like it isn't really necessary, > since you are calling the code inside it at most twice. I think a better > approach would be to move lines 2134-2146 into a utility

Re: RFR 8201867: Kerberos keytabs with holes in certain places are parsed incorrectly

2018-05-16 Thread Valerie Peng
Looking at the BufferedInputStream impl, it looks like its skip(...) method should trigger the internal array to be refilled when the internal bytes are used up. Maybe something like below would also work?     while (n > 0) { int n2 = skip(n); if (n2 == 0) {throw new

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-05-16 Thread Jamil Nimeh
Round 6. This brings ChaCha20/ChaCha20-Poly1305 into conformance with Cipher's specification when forms of init that take AlgorithmParameters or AlgorithmParameterSpec are used. Previously, a non-null AP or APS object was required.  In order to better conform to the specification, if a null

Re: RFR 8202299: Java Keystore fails to load PKCS12/PFX certificates created in WindowsServer2016

2018-05-16 Thread Sean Mullan
The while(true) in PKCS12KeyStore.java seems like it isn't really necessary, since you are calling the code inside it at most twice. I think a better approach would be to move lines 2134-2146 into a utility method and call it again if you get an Exception and the password is empty. Looks fine