Java applet with self-signed certificate on OS X Mountain Lion

↘锁芯ラ 提交于 2019-11-30 11:42:10

It is new security feature in Mac OS X, by default only apps from Mac Store & from trusted developers are allowed to run there. Fortunatelly, it is easy to change, you have to allow this in Mac OS X preferences.

Go to Preferences -> Security & Privacy and click on padlock to allow changes.

Then in "Allow appications downloaded from" select "Anywhere".

After that, the button in Java dialog will be enabled.

user3220190

If you get the "Application Blocked by Security Settings" message, you need to go into System Preferences: Java: Security and either add your site to the exception list or reduce the security level to Medium.

OS X Lion you can manually add the certificate as a trusted root certificate using the built-in Keychain Access tool. I don't have access to OS X Mountain Lion yet so I don't know if it will work in Mountain Lion, but it seems worth a try. The steps in Lion are:

  • Open Keychain Access (located in /Applications/Utilities)
  • Click File | Import Items...
  • Change the Destination Keychain to System
  • Find your certificate file and click Open
  • It will say "Do you want your computer to trust certificates sign by [...] from now on?". Click Always Trust.

If you generated your certificate directly in a Java keystore then you might not have a standalone certificate file. You can easily export one using this guide from Oracle.

I note that your screenshot says "This certificate is marked as trusted for this account", which is curious because I'd expect that to be acceptable. Maybe in OS X Mountain Lion user-added root certificates somehow have a lower status than official ones distributed by Apple? If you find that the above steps don't work, you could try adding your certificate to the official root keychain. Keychain Access won't let you do that, but I believe you can use the builtin certtool to manually edit the keychain located at /System/Library/Keychains/SystemRootCertificates.keychain to achieve that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!