RFR: 8277353: java/security/MessageDigest/ThreadSafetyTest.java test times out

2021-11-30 Thread Sibabrata Sahoo
This Test gets timeout during low cpu availability. It is modified to support extended timeout period during JTREG execution. - Commit messages: - 8277353: java/security/MessageDigest/ThreadSafetyTest.java test times out - 8277353: java/security/MessageDigest/ThreadSafetyTest.java

Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Wei-Jun Wang
My understanding is that Java's PKCS12KeyStore will fabricate an alias string if there is no friendlyName, since every entry inside a KeyStore object must have an alias. I'll take some look tomorrow. Thanks, Max > On Nov 30, 2021, at 10:01 PM, Michael StJohns wrote: > > Hi - > > Generically,

Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Michael StJohns
Hi - Generically, PKCS12 doesn't require an alias (friendlyName) for a particular Bag, but does permit it. Which means that getAttributes(String alias) could fail on a legal PKCS12.  It may be worthwhile to add a Set KeyStore::getAttributes(int bagNumber) method. Mike On 11/30/2021 8:15 PM

Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Weijun Wang
> Add `KeyStore::getAttributes` so that one can get the attributes of an entry > without retrieving the entry first. This is especially useful for a private > key entry which can only be retrieved with a password. Weijun Wang has updated the pull request with a new target base due to a merge or

Re: RFR: 8225181: KeyStore should have a getAttributes method [v4]

2021-11-30 Thread Weijun Wang
On Thu, 4 Nov 2021 19:34:50 GMT, Weijun Wang wrote: >> Add `KeyStore::getAttributes` so that one can get the attributes of an entry >> without retrieving the entry first. This is especially useful for a private >> key entry which can only be retrieved with a password. > > Weijun Wang has update

Integrated: 8231107: Allow store password to be null when saving a PKCS12 KeyStore

2021-11-30 Thread Weijun Wang
On Thu, 14 Oct 2021 14:43:32 GMT, Weijun Wang wrote: > You can create a password-less PKCS12 KeyStore file now by calling > `ks.store(outStream, null)` no matter what the default cert protection > algorithm and Mac algorithm are defined in `java.security`. > > Note: the system properties set i

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Weijun Wang
On Wed, 24 Nov 2021 21:17:34 GMT, Valerie Peng wrote: >> It is observed that when running crypto benchmark with large number of >> threads, a lot of time is spent on the synchronized block inside the >> Provider.getService() method. The cause for this is that >> Provider.getService() method fi

Integrated: 8272162: S4U2Self ticket without forwardable flag

2021-11-30 Thread Weijun Wang
On Fri, 22 Oct 2021 16:31:02 GMT, Weijun Wang wrote: > The S4U2proxy extension requires that the service ticket to the first service > has the forwardable flag set, but some versions of Windows Server do not set > the forwardable flag in a S4U2self response and accept it in a S4U2proxy > reque

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Valerie Peng
On Tue, 30 Nov 2021 20:50:53 GMT, Weijun Wang wrote: > Consider this case, two threads are changing a value at the same time. Since > the method is not synchonized, thread1 might finish the first part of the > method (`super.replace`) earlier than thread2, but it finishes the second > part (`p

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Valerie Peng
On Tue, 30 Nov 2021 13:59:16 GMT, Weijun Wang wrote: >> The serialized bytes are just the mappings, i.e. key + value pairs. There >> are no ordering info associated with the key + value pair. IIRC, the >> particular thing about SecureRandom is that the first registration of >> SecureRandom is

Re: RFR: 8272162: S4U2Self ticket without forwardable flag [v2]

2021-11-30 Thread Valerie Peng
On Wed, 24 Nov 2021 02:45:37 GMT, Weijun Wang wrote: >> The S4U2proxy extension requires that the service ticket to the first >> service has the forwardable flag set, but some versions of Windows Server do >> not set the forwardable flag in a S4U2self response and accept it in a >> S4U2proxy r

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Weijun Wang
On Wed, 24 Nov 2021 21:17:34 GMT, Valerie Peng wrote: >> It is observed that when running crypto benchmark with large number of >> threads, a lot of time is spent on the synchronized block inside the >> Provider.getService() method. The cause for this is that >> Provider.getService() method fi

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Valerie Peng
On Mon, 29 Nov 2021 23:24:59 GMT, Weijun Wang wrote: > Some comments. I'm more concerned about the `parseLegacy()` method which is > called everywhere. Without the synchronized keyword, is it safe to call into > this method by multiple threads at the same time? Do we have tests around > this?

Re: RFR: 8271566: DSA signature length value is not accurate in P11Signature [v2]

2021-11-30 Thread Valerie Peng
On Fri, 19 Nov 2021 19:50:33 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> P11Key static inner classes refactorings. > > Hmm, thinking more about "internal"/"opaque", given this is naming for th

Re: RFR: 8271566: DSA signature length value is not accurate in P11Signature [v2]

2021-11-30 Thread Martin Balao
On Fri, 19 Nov 2021 19:50:33 GMT, Valerie Peng wrote: >> Martin Balao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> P11Key static inner classes refactorings. > > Hmm, thinking more about "internal"/"opaque", given this is naming for th

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Weijun Wang
On Tue, 30 Nov 2021 02:40:22 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/Provider.java line 832: >> >>> 830: // NOTE: may need extra mechanism for providers to indicate their >>> 831: // preferred ordering of SecureRandom algorithms since registration >>> 832:

Re: RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

2021-11-30 Thread Weijun Wang
On Tue, 30 Nov 2021 02:47:45 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/Provider.java line 979: >> >>> 977: parseLegacy(sk, sv, OPType.REPLACE); >>> 978: } >>> 979: } >> >> If you are going through all the entries, should we also cl