Proposal: Extend Windows KeyStore support to include access to the local machine location

2022-03-31 Thread Mat Carter
": .Default "Windows-ROOT": .Default.AuthRoot, .GroupPolicy, .Enterprise, .SmartCard Please let me know if there are any existing efforts to bring this functionality to Java, or references to prior decisions on this subject Thanks in advance Mat Carter [1] https://docs.microsoft.

Re: Proposal: Extend Windows KeyStore support to include access to the local machine location

2022-04-05 Thread Mat Carter
like to introduce/discuss: this is to allow developers to access the key stores with read only permissions, thus allowing enumeration and reading without requiring administrative permissions be granted to the application (thus increasing security) Thanks in advance Mat Sent from Outlook From

Re: Proposal: Extend Windows KeyStore support to include access to the local machine location

2022-04-11 Thread Mat Carter
ess any of the Keystores? like “Windows-ROOT/ADdressbook”? Gruss Bernd -- http://bernd.eckenfels.net Von: security-dev im Auftrag von Mat Carter Gesendet: Dienstag, April 5, 2022 5:22 PM An: Wei-Jun Wang Cc: security-dev@openjdk.java.net Betreff: Re: Propo

Re: Proposal: Extend Windows KeyStore support to include access to the local machine location

2022-04-11 Thread Mat Carter
happy for me to make the changes then please ack here and re-assign the issue to me [1] https://bugs.openjdk.java.net/browse/JDK-6782021 Thanks Mat Sent from Outlook<http://aka.ms/weboutlook> From: Wei-Jun Wang Sent: Monday, April 11, 2022 11:45 AM To:

RFR: 6782021: add support for localmachine keystores on windows

2022-04-12 Thread Mat Carter
On Windows you can now access the local machine keystores using the strings "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the application requires admin privileges. "Windows-MY" and "Windows-ROOT" remain unchanged, however given these original keystore strings mapped to the cu

Withdrawn: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-12 Thread Mat Carter
On Tue, 12 Apr 2022 16:55:28 GMT, Mat Carter wrote: > On Windows you can now access the local machine keystores using the strings > "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the > application requires admin privileges. > > "Windows

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-04-12 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter has r

RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-12 Thread Mat Carter
On Windows you can now access the local machine keystores using the strings "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the application requires admin privileges. "Windows-MY" and "Windows-ROOT" remain unchanged, however given these original keystore strings mapped to the cu

Re: Proposal: Extend Windows KeyStore support to include access to the local machine location

2022-04-12 Thread Mat Carter
Weijun Here's a PR [1] if you would like to review and consider sponsoring [1] https://github.com/openjdk/jdk/pull/8211 Cheers Mat Sent from Outlook<http://aka.ms/weboutlook> From: Wei-Jun Wang Sent: Monday, April 11, 2022 3:33 PM To: Mat Carter

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-26 Thread Mat Carter
On Tue, 12 Apr 2022 19:03:40 GMT, Mat Carter wrote: > On Windows you can now access the local machine keystores using the strings > "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the > application requires admin privileges. > > "Windows

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-27 Thread Mat Carter
On Wed, 27 Apr 2022 02:33:24 GMT, Bernd wrote: >> src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp line 419: >> >>> 417: __leave; >>> 418: } >>> 419: if ((pszCertStoreLocation = >>> env->GetStringUTFChars(jCertStoreLocation, NULL)) >> >> Would it be ea

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-27 Thread Mat Carter
On Wed, 27 Apr 2022 19:33:10 GMT, Weijun Wang wrote: >> src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp line 487: >> >>> 485: // Check if private key available - client authentication >>> certificate >>> 486: // must have private key available. >>> 487:

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-04-27 Thread Mat Carter
On Wed, 27 Apr 2022 19:33:37 GMT, Mat Carter wrote: >> And also, is there a ReleaseString missing? > > Thanks for the feedback, I'm going to incorporate that into the PR > And also, is there a ReleaseString missing? Yes an error when I "patched" my repo, but based

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-05-03 Thread Mat Carter
On Wed, 27 Apr 2022 21:41:30 GMT, Mat Carter wrote: >> Same question. Does a new type name automagically add support for CNG? > > Correct, it does enable access to certificates and keys that require next > (second) generation cryptographic providers, that were previously > i

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-03 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter has

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-03 Thread Mat Carter
On Wed, 27 Apr 2022 21:47:15 GMT, Mat Carter wrote: >> Thanks for the feedback, I'm going to incorporate that into the PR > >> And also, is there a ReleaseString missing? > > Yes an error when I "patched" my repo, but based on the feedback there will

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-03 Thread Mat Carter
On Tue, 3 May 2022 22:52:49 GMT, Mat Carter wrote: >> On Windows you can now access the local machine keystores using the strings >> "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the >> application requires admin privileges. >>

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-04 Thread Mat Carter
On Wed, 4 May 2022 03:18:43 GMT, Weijun Wang wrote: >> Mat Carter has updated the pull request incrementally with one additional >> commit since the last revision: >> >> replace string parameter with int and supporting constants > > Also, please remove trailing

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-04 Thread Mat Carter
On Tue, 3 May 2022 22:52:49 GMT, Mat Carter wrote: >> On Windows you can now access the local machine keystores using the strings >> "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the >> application requires admin privileges. >>

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v2]

2022-05-04 Thread Mat Carter
On Wed, 4 May 2022 03:10:10 GMT, Weijun Wang wrote: >> Mat Carter has updated the pull request incrementally with one additional >> commit since the last revision: >> >> replace string parameter with int and supporting constants > > src/jdk.crypto.mscapi/windo

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v3]

2022-05-04 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter has

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v3]

2022-05-05 Thread Mat Carter
On Thu, 5 May 2022 14:32:14 GMT, Weijun Wang wrote: >> Mat Carter has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed whitespace and simply passing ints between java and C++ > > I'd like to con

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v4]

2022-05-10 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter ha

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v5]

2022-05-10 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter has u

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v3]

2022-05-10 Thread Mat Carter
On Tue, 10 May 2022 13:07:02 GMT, Weijun Wang wrote: >> @wangweij - regarding the two tests for localmachine, these will throw a >> KeyStore exception "Access denied" if the test is not run as admin, is there >> anyway in the test to make that a requirement? If so we could split into >> two t

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v5]

2022-05-10 Thread Mat Carter
On Tue, 10 May 2022 22:01:16 GMT, Weijun Wang wrote: >> Mat Carter has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add test from wangweij > > test/jdk/sun/security/mscapi/AllTypes.java line 60: > >

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v6]

2022-05-11 Thread Mat Carter
the original two strings, i.e. no duplication of code paths etc > > No new tests added, keystore functionality and API remains unchanged, the > local machine keystore types would require the tests to run in admin mode > > Tested on windows, passes tier1 and tier2 tests Mat Carter has updat

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v5]

2022-05-11 Thread Mat Carter
On Tue, 10 May 2022 23:17:54 GMT, Mat Carter wrote: >> test/jdk/sun/security/mscapi/AllTypes.java line 60: >> >>> 58: return true; >>> 59: } catch (IOException ioe) { >>> 60: if >>> (ioe.getMessage().trim().e

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v5]

2022-05-11 Thread Mat Carter
On Tue, 10 May 2022 18:55:50 GMT, Mat Carter wrote: >> On Windows you can now access the local machine keystores using the strings >> "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the >> application requires admin privileges. >>

Re: RFR: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider [v5]

2022-05-16 Thread Mat Carter
On Mon, 16 May 2022 16:59:02 GMT, Weijun Wang wrote: >> @christophbrejla - my goal is to backport to latest (18 or 19), 17 and 11 > > @macarte I think Sean's comment on your CSR about the scope is correct. The > "algorithm" name should be at the JDK level so user knows what to write in > their

Integrated: JDK-6782021: It is not possible to read local computer certificates with the SunMSCAPI provider

2022-05-16 Thread Mat Carter
On Tue, 12 Apr 2022 19:03:40 GMT, Mat Carter wrote: > On Windows you can now access the local machine keystores using the strings > "Windows-MY-LOCALMACHINE" and "Windows-ROOT-LOCALMACHINE"; note the > application requires admin privileges. > > "Windows