Re: RFR: 8289572: InputStream wrapping with BufferedInputStream is redundant in HttpTimestamper

2022-07-21 Thread Jaikiran Pai
On Fri, 1 Jul 2022 08:06:10 GMT, Сергей Цыпанов wrote: > In case we read all bytes from an `InputStream` we don't need wrapping with > `BufferedInputStream` as the bytes are not written into internal buffer. With > removal of redundant buffer we save 8 kB of allocated memory. I see that Sean h

Re: RFR: 8290775: Some doc errors in DerOutputStream.java

2022-07-21 Thread Xue-Lei Andrew Fan
On Fri, 22 Jul 2022 01:43:06 GMT, jquanC wrote: > On the second point, I have some doubts. 1) Here don't need to add > ***@***.*** charset" because it's clear to everyone? ***@***.*** enc" does > not seem to be used in the method. Shouldn't it be deleted? Sorry for the confusing. I think it i

Integrated: 8290489: Initial nroff manpage generation for JDK 20

2022-07-21 Thread David Holmes
On Thu, 21 Jul 2022 00:34:53 GMT, David Holmes wrote: > The version will be 20-ea and the copyright year 2023 (for March 2023 release > date). > > Thanks. This pull request has now been integrated. Changeset: e9f97b2e Author:David Holmes URL: https://git.openjdk.org/jdk/commit/e9f

Re: RFR: 8290775: Some doc errors in DerOutputStream.java

2022-07-21 Thread jquanC
On Thu, 21 Jul 2022 08:53:31 GMT, jquanC wrote: > There are some doc errors in sun.security.util.DerOutputStream, like the > followings, > > > /** > * Private helper routine for writing DER encoded string values. > * @param s the string to write > * @param stringTag one of the DER string ta

Re: RFR: JDK-8290532: Adjust PKCS11Exception and handle more PKCS11 error codes

2022-07-21 Thread Valerie Peng
On Tue, 19 Jul 2022 13:14:17 GMT, Matthias Baesken wrote: > The issue https://bugs.openjdk.org/browse/JDK-8282538 gave an example of the > following PKCS11 exception (see attached jtr files of that bug) : > > Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 0xCE534351 > > Unfortuna

Re: RFR: 8290775: Some doc errors in DerOutputStream.java

2022-07-21 Thread Xue-Lei Andrew Fan
On Thu, 21 Jul 2022 08:53:31 GMT, jquanC wrote: > There are some doc errors in sun.security.util.DerOutputStream, like the > followings, > > > /** > * Private helper routine for writing DER encoded string values. > * @param s the string to write > * @param stringTag one of the DER string ta

RFR: 8290775: Some doc errors in DerOutputStream.java

2022-07-21 Thread jquanC
There are some doc errors in sun.security.util.DerOutputStream, like the followings, /** * Private helper routine for writing DER encoded string values. * @param s the string to write * @param stringTag one of the DER string tags that indicate which * encoding should be used to write the str

Re: RFR: 8290824: Use InputStream.readAllBytes() instead of surrogate code

2022-07-21 Thread Mark Reinhold
On Thu, 21 Jul 2022 15:37:40 GMT, Сергей Цыпанов wrote: > We can use `InputStream.readAllBytes()` in `ModuleHashes` and `X509CertPath`. If by “surrogates” you mean “substitutes”, then this wording is confusing. At the time these explicit loops were written they weren’t surrogates for anything,

Re: RFR: 8290824: Use InputStream.readAllBytes() instead of surrogate code

2022-07-21 Thread Сергей Цыпанов
On Thu, 21 Jul 2022 15:37:40 GMT, Сергей Цыпанов wrote: > We can use `InputStream.readAllBytes()` in `ModuleHashes` and `X509CertPath`. By "surrogate code" I mean hand-written snippets reading all the bytes from an InputStream. > It means the whole content from the input stream is read into a

Integrated: 8289275: Remove incorrect __declspec(dllimport) attributes from pointers in jdk.crypto.cryptoki

2022-07-21 Thread Julian Waters
On Sat, 2 Jul 2022 02:12:15 GMT, Julian Waters wrote: > Several instances of function pointers in jdk.crypto.cryptoki are marked with > the dllimport attribute, which should only be applied to symbol declarations, > of which a typedef'd function pointer is not. This would only be useful if a >

Re: RFR: 8290824: Use InputStream.readAllBytes() instead of surrogate code

2022-07-21 Thread Weijun Wang
On Thu, 21 Jul 2022 15:37:40 GMT, Сергей Цыпанов wrote: > We can use `InputStream.readAllBytes()` in `ModuleHashes` and `X509CertPath`. The `X509CertPath.java` change looks fine, but I'm not sure about the other one. It means the whole content from the input stream is read into a single array

Re: RFR: 8290824: Use InputStream.readAllBytes() instead of surrogate code

2022-07-21 Thread Mark Reinhold
On Thu, 21 Jul 2022 15:37:40 GMT, Сергей Цыпанов wrote: > We can use `InputStream.readAllBytes()` in `ModuleHashes` and `X509CertPath`. Why do you say “instead of surrogate code”? I don’t see any Unicode surrogate processing here, but maybe you mean something else. Would “instead of explicit l

RFR: 8290824: Use InputStream.readAllBytes() instead of surrogate code

2022-07-21 Thread Сергей Цыпанов
We can use `InputStream.readAllBytes()` in `ModuleHashes` and `X509CertPath`. - Commit messages: - 8290824: Remove unused JavaDoc - 8290824: Use InputStream.readAllBytes() instead of surrogate code Changes: https://git.openjdk.org/jdk/pull/9596/files Webrev: https://webrevs.openjd

Re: RFR: JDK-8290532: Adjust PKCS11Exception and handle more PKCS11 error codes

2022-07-21 Thread Matthias Baesken
On Wed, 20 Jul 2022 22:01:18 GMT, Valerie Peng wrote: > I don't think it's worthwhile to add deprecated error codes. As for vendor > specific error codes, I think they belong in a separate collection based on > which vendor/PKCS#11 library is used. Okay makes sense then we leave the deprecated