问题
Is there an Oracle reference somewhere that clearly states that you cannot access the LocalMachine certificates in the MY store using the SunMSCAPI provider?
Thanks, Bert
回答1:
Without knowing more about your particular error, there is a bug reported here
回答2:
We proved this by using the free Microsoft/Sysinternals tool PSExec.exe.
By running the same Java program as either a regular user or a system user, we could determine the regular user could not obtain the LocalMachine certificate.
The command:
PsExec.exe -i -s cmd.exe
Then run the Java program in a console the regular way with java.exe. You can display the current user in the Java code with getEnv("USERNAME").
Interestingly, a system account cannot access a current user's registry setting from Java either.
来源:https://stackoverflow.com/questions/33788143/possible-to-access-localmachine-cetificates-in-my-store-using-sunmscapi