可以使用SunMSCAPI访问MY商店中的LocalMachine证书吗? [英] Possible to access LocalMachine cetificates in MY store using SunMSCAPI?
问题描述
在某个地方是否有Oracle参考明确指出您无法使用SunMSCAPI提供程序访问MY存储中的LocalMachine证书?
Is there an Oracle reference somewhere that clearly states that you cannot access the LocalMachine certificates in the MY store using the SunMSCAPI provider?
谢谢,
Bert
Thanks, Bert
推荐答案
我们证明了这一点通过使用免费的Microsoft / Sysinternals工具PSExec.exe。
We proved this by using the free Microsoft/Sysinternals tool PSExec.exe.
通过运行与普通用户或系统用户相同的Java程序,我们可以确定普通用户可以无法获取LocalMachine证书。
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.
命令:
PsExec.exe -i -s cmd.exe
PsExec.exe -i -s cmd.exe
然后使用java.exe以常规方式在控制台中运行Java程序。您可以使用getEnv( USERNAME)在Java代码中显示当前用户。
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").
有趣的是,系统帐户也无法从Java访问当前用户的注册表设置。
Interestingly, a system account cannot access a current user's registry setting from Java either.
这篇关于可以使用SunMSCAPI访问MY商店中的LocalMachine证书吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!