Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11

2023-03-14 Thread Valerie Peng
On Fri, 3 Feb 2023 01:41:41 GMT, Martin Balao wrote: > We would like to propose an implementation for the [JDK-8301553: Support > Password-Based Cryptography in > SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement > requirement. > > In addition to pursuing the requirement goa

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown

2023-03-14 Thread Bradford Wetmore
On Thu, 23 Feb 2023 18:15:35 GMT, Ahmed Muhsin wrote: > This change will move the instantiation of BadPaddingException into the > branch of the if statement where it is thrown. This will decrease the > overhead of calling `unpadV15` and `unpadOAEP`. Please see the associated > work item for p

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11

2023-03-14 Thread Valerie Peng
On Fri, 3 Feb 2023 01:41:41 GMT, Martin Balao wrote: > We would like to propose an implementation for the [JDK-8301553: Support > Password-Based Cryptography in > SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement > requirement. > > In addition to pursuing the requirement goa

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown

2023-03-14 Thread Xue-Lei Andrew Fan
On Tue, 14 Mar 2023 21:23:02 GMT, Xue-Lei Andrew Fan wrote: > May I get a chance to review it before the integration? I may need more time > to dig into time-constant issue. If I read the Bleichenbacher's Attack[1][2] right, the attack works if it can tell the difference between good condition

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown

2023-03-14 Thread Xue-Lei Andrew Fan
On Thu, 23 Feb 2023 18:15:35 GMT, Ahmed Muhsin wrote: > This change will move the instantiation of BadPaddingException into the > branch of the if statement where it is thrown. This will decrease the > overhead of calling `unpadV15` and `unpadOAEP`. Please see the associated > work item for p

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown

2023-03-14 Thread Bradford Wetmore
On Thu, 23 Feb 2023 18:15:35 GMT, Ahmed Muhsin wrote: > This change will move the instantiation of BadPaddingException into the > branch of the if statement where it is thrown. This will decrease the > overhead of calling `unpadV15` and `unpadOAEP`. Please see the associated > work item for p

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown

2023-03-14 Thread Valerie Peng
On Thu, 23 Feb 2023 18:15:35 GMT, Ahmed Muhsin wrote: > This change will move the instantiation of BadPaddingException into the > branch of the if statement where it is thrown. This will decrease the > overhead of calling `unpadV15` and `unpadOAEP`. Please see the associated > work item for p

Re: RFR: 8304136: Match allocation and free in sspi.cpp

2023-03-14 Thread Daniel Jeliński
On Tue, 14 Mar 2023 14:02:43 GMT, Weijun Wang wrote: > After this change, `gss_buffer_t` always uses `malloc` and `free`. All others > use `new` and `delete`. It also initializes several `SecBuffer` to zeroes so > it's safe to check for null when trying to free them. LGTM. Thanks! ---

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v5]

2023-03-14 Thread Rajan Halade
On Tue, 14 Mar 2023 18:46:29 GMT, Matthew Donovan wrote: >> * Refactored SSLContextTemplate and SSLSocketTemplate to put common code in >> one base class (SSLContextTemplate) >> * Updated TLS/SSL tests to extend SSLSocketTemplate where possible. >> * Updated SSLEngineTemplate to accommodate chan

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v3]

2023-03-14 Thread Matthew Donovan
On Tue, 14 Mar 2023 17:56:07 GMT, Rajan Halade wrote: > Updated review looks good to me except few minor code cleanup comments. I went through all the changed files and added @Override where necessary and cleaned up imports. I think I got them all. - PR: https://git.openjdk.org/jd

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v5]

2023-03-14 Thread Matthew Donovan
> * Refactored SSLContextTemplate and SSLSocketTemplate to put common code in > one base class (SSLContextTemplate) > * Updated TLS/SSL tests to extend SSLSocketTemplate where possible. > * Updated SSLEngineTemplate to accommodate changes in SSLContextTemplate. To > keep this changeset to a reaso

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v3]

2023-03-14 Thread Rajan Halade
On Wed, 1 Mar 2023 15:30:19 GMT, Matthew Donovan wrote: >> * Refactored SSLContextTemplate and SSLSocketTemplate to put common code in >> one base class (SSLContextTemplate) >> * Updated TLS/SSL tests to extend SSLSocketTemplate where possible. >> * Updated SSLEngineTemplate to accommodate chang

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v4]

2023-03-14 Thread Matthew Donovan
On Tue, 14 Mar 2023 17:18:46 GMT, Rajan Halade wrote: >> removed > > Don't see this file deleted in PR. It was still being used by an "engine" test in that directory; I removed that last use and deleted the key manager class. (there is another bug to refactor the SSLEngine tests.) ---

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v4]

2023-03-14 Thread Matthew Donovan
> * Refactored SSLContextTemplate and SSLSocketTemplate to put common code in > one base class (SSLContextTemplate) > * Updated TLS/SSL tests to extend SSLSocketTemplate where possible. > * Updated SSLEngineTemplate to accommodate changes in SSLContextTemplate. To > keep this changeset to a reaso

Re: RFR: 8284047: Harmonize/Standardize the SSLSocket/SSLEngine/SSLSocketSSLEngine test templates [v3]

2023-03-14 Thread Rajan Halade
On Mon, 27 Feb 2023 19:11:29 GMT, Matthew Donovan wrote: >> test/jdk/javax/net/ssl/ALPN/SSLServerSocketAlpnTest.java line 31: >> >>> 29: * @bug 8051498 8145849 8158978 8170282 >>> 30: * @summary JEP 244: TLS Application-Layer Protocol Negotiation >>> Extension >>> 31: * @compile MyX509Extend

Re: RFR: 8301553: Support Password-Based Cryptography in SunPKCS11

2023-03-14 Thread Valerie Peng
On Fri, 3 Feb 2023 01:41:41 GMT, Martin Balao wrote: > We would like to propose an implementation for the [JDK-8301553: Support > Password-Based Cryptography in > SunPKCS11](https://bugs.openjdk.org/browse/JDK-8301553) enhancement > requirement. > > In addition to pursuing the requirement goa

Integrated: 8303809: Dispose context in SPNEGO NegotiatorImpl

2023-03-14 Thread Alexey Bakhtin
On Wed, 8 Mar 2023 09:05:19 GMT, Alexey Bakhtin wrote: > This patch fixes a possible native memory leak in case of a custom native GSS > provider. > The actual leak was reported in production. > > sun/security/jgss, sun/security/krb5, sun/net/www/protocol/http jtreg tests > are passed This pu

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl [v5]

2023-03-14 Thread Alexey Bakhtin
On Tue, 14 Mar 2023 16:35:30 GMT, Daniel Fuchs wrote: > Thanks Alexey. Tests returned green. Good to go! Thank you a lot for review - PR: https://git.openjdk.org/jdk/pull/12920

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl [v5]

2023-03-14 Thread Daniel Fuchs
On Tue, 14 Mar 2023 15:09:04 GMT, Alexey Bakhtin wrote: >> This patch fixes a possible native memory leak in case of a custom native >> GSS provider. >> The actual leak was reported in production. >> >> sun/security/jgss, sun/security/krb5, sun/net/www/protocol/http jtreg tests >> are passed >

Integrated: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors

2023-03-14 Thread Jamil Nimeh
On Wed, 1 Feb 2023 18:10:41 GMT, Jamil Nimeh wrote: > Hello all, > > This addresses a test bug where the SimpleOCSPServer would reset the > connections made by a client CertPathValidator. I've made some minor changes > to how the network data is read and sent from OCSP HTTP GET URLs and on >

Re: RFR: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors [v3]

2023-03-14 Thread Jamil Nimeh
On Tue, 14 Mar 2023 15:01:07 GMT, Weijun Wang wrote: >> Jamil Nimeh has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 11 commits: >> >> - merge with main >> - merge with main >> - 8300939: sun/security/provider/certpath/OCSP/OCSP

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl [v4]

2023-03-14 Thread Alexey Bakhtin
On Tue, 14 Mar 2023 14:30:21 GMT, Daniel Fuchs wrote: >> Alexey Bakhtin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More space after catch > > src/java.base/share/classes/sun/net/www/protocol/http/Negotiator.java line 86: > >> 84:

Re: RFR: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors [v3]

2023-03-14 Thread Weijun Wang
On Tue, 14 Mar 2023 14:24:20 GMT, Jamil Nimeh wrote: >> Hello all, >> >> This addresses a test bug where the SimpleOCSPServer would reset the >> connections made by a client CertPathValidator. I've made some minor >> changes to how the network data is read and sent from OCSP HTTP GET URLs and

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl [v5]

2023-03-14 Thread Alexey Bakhtin
> This patch fixes a possible native memory leak in case of a custom native GSS > provider. > The actual leak was reported in production. > > sun/security/jgss, sun/security/krb5, sun/net/www/protocol/http jtreg tests > are passed Alexey Bakhtin has updated the pull request incrementally with o

Re: RFR: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors [v3]

2023-03-14 Thread Weijun Wang
On Tue, 14 Mar 2023 14:24:20 GMT, Jamil Nimeh wrote: >> Hello all, >> >> This addresses a test bug where the SimpleOCSPServer would reset the >> connections made by a client CertPathValidator. I've made some minor >> changes to how the network data is read and sent from OCSP HTTP GET URLs and

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl [v4]

2023-03-14 Thread Daniel Fuchs
On Mon, 13 Mar 2023 17:33:12 GMT, Alexey Bakhtin wrote: >> This patch fixes a possible native memory leak in case of a custom native >> GSS provider. >> The actual leak was reported in production. >> >> sun/security/jgss, sun/security/krb5, sun/net/www/protocol/http jtreg tests >> are passed >

Re: RFR: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors [v3]

2023-03-14 Thread Jamil Nimeh
> Hello all, > > This addresses a test bug where the SimpleOCSPServer would reset the > connections made by a client CertPathValidator. I've made some minor changes > to how the network data is read and sent from OCSP HTTP GET URLs and on > responses, respectively. This will take the test off

RFR: 8304136: Match allocation and free in sspi.cpp

2023-03-14 Thread Weijun Wang
After this change, `gss_buffer_t` always uses `malloc` and `free`. All others use `new` and `delete`. It also initializes several `SecBuffer` to zeroes so it's safe to check for null when trying to free them. - Commit messages: - the fix Changes: https://git.openjdk.org/jdk/pull/1

Re: RFR: 8303809: Dispose context in SPNEGO NegotiatorImpl

2023-03-14 Thread Daniel Fuchs
On Thu, 9 Mar 2023 16:02:33 GMT, Alexey Bakhtin wrote: >> This patch fixes a possible native memory leak in case of a custom native >> GSS provider. >> The actual leak was reported in production. >> >> sun/security/jgss, sun/security/krb5, sun/net/www/protocol/http jtreg tests >> are passed >

Integrated: 8303410: Remove ContentSigner APIs and jarsigner -altsigner and -altsignerpath options

2023-03-14 Thread Eirik Bjorsnos
On Tue, 28 Feb 2023 19:09:00 GMT, Eirik Bjorsnos wrote: > The `-altsigner` and `-altsignerpath` options in JarSigner with the > underlying `ContentSigner` mechanism were deprected in Java 9, for removal in > Java 15. See [JDK-8076535](https://bugs.openjdk.org/browse/JDK-8076535), > [JDK-824226

Re: RFR: 8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors [v2]

2023-03-14 Thread Daniel Jeliński
On Thu, 2 Feb 2023 18:33:23 GMT, Jamil Nimeh wrote: >> Hello all, >> >> This addresses a test bug where the SimpleOCSPServer would reset the >> connections made by a client CertPathValidator. I've made some minor >> changes to how the network data is read and sent from OCSP HTTP GET URLs and