How to sign Java applet with Apple Developer ID

戏子无情 提交于 2019-12-04 05:14:08

问题


I have java applet signed with thwate certificate and need to sign it with Apple Developer ID.

As is well-known, Mac OS X 10.8 requires Java applications to be signed with Apple Developer ID. It causes some problems with running Java applets, Gatekeeper says that "The digital signature could not be verified". There are the same issues OS X 10.8 Gatekeeper and Java applets and Sign java applet so that it works on OS X 10.8 Mountain Lion and Windows

I also found this in Oracle's Mac FAQ: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/mac-faq.html#gatekeeper

So, I requested and downloaded Apple Developer ID certificate to my Mac, but I cannot find any where how to sign java applets with Apple Developer ID.

I've tried the following:

  1. Sign the applet on Mac using codesign tool.

    codesign -s "Developer ID Application: MyCompany" MyApplet.jar
    

    But the jar file was not actually be modified by this command (no date, file size, or binary content was changed).

  2. Export Apple certificate to p12 and use jarsigner. I exported Apple Root CA, Apple Timestamp Certification Authority, and Developer ID Application: MyCompany to p12 and sign my jar in a common way.

  3. Import my thawte certificate to Mac Keychain Access and export both Apple and thawte certificates to p12.

All three ways give me nothing. When I open a page with the applet, Gatekeeper still says that it could not be verified.

Could anybody provide me with step by step instructions on how to sign my applet?


回答1:


Oh, there is no way to do it =( Java applets cannot participate in the Developer ID program. The Apple's answer is here https://stackoverflow.com/a/12210534/1068878.




回答2:


This may be a bit late for you, but in case it helps anyone else: it is possible to bundle the JAR file, along with the Java Runtime Environment, into a .app . You can then sign the .app using your Apple certificate just as if you had written in with xcode. Search for 'javapackager' (which is just one of many ways to do this). In theory you can even submit such an app to the app store.



来源:https://stackoverflow.com/questions/12192382/how-to-sign-java-applet-with-apple-developer-id

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