> Please review this fix for SunMSCAPI storing and removing certs in 
> `CURRENTUSER` even when a `LOCALMACHINE` keystore is selected.
> 
> The native `storeCertificate` and `removeCertificate` methods currently use 
> `CertOpenSystemStore`, which opens the `CURRENTUSER` store.
> This fix passes the store location through JNI and uses `CertOpenStore` with 
> `CERT_SYSTEM_STORE_LOCAL_MACHINE` for `LOCALMACHINE` keystores.
> 
> The manual regression test `LocalMachineStore` verifies certificate placement 
> and deletion; the test requires administrator privileges.
> 
> Testing:
> - `LocalMachineStore`
> - manual `keytool -genkeypair`, `-list` and `-delete`
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Daisuke Yamazaki has updated the pull request incrementally with two additional 
commits since the last revision:

 - Preserve private keys on deleting from a different  location
 - tests with ffmapi

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/33785/files
  - new: https://git.openjdk.org/jdk/pull/33785/files/26b8a0ca..6d70085f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=33785&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33785&range=02-03

  Stats: 302 lines in 5 files changed: 280 ins; 9 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/33785.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33785/head:pull/33785

PR: https://git.openjdk.org/jdk/pull/33785

Reply via email to