How to sign Java applet with Apple Developer ID

2019-03-01 03:28发布

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?

2条回答
Fickle 薄情
2楼-- · 2019-03-01 04:05

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.

查看更多
对你真心纯属浪费
3楼-- · 2019-03-01 04:06

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.

查看更多
登录 后发表回答