JPackage : mac-signing-key-user-name?

I am trying to sign a Java application, packaged in a disk image, via jpackage, invoked via Ant (so no XCode anywhere). The packaging itself works fine, but I am having trouble figuring out the signing parameters. In particular, it seems I will have to provide a parameter

--mac-signing-key-user-name

What value should I give to this parameter? I have an Apple Developer Account (well, obviously...), I have generated a certificate and quite a few other things, but I am confused as to what the "signing-key-user-name" should be.

The error message I currently get from jpackage is:

No certificate found matching [...] using keychain []

I am on MAC OS 12.6 and JDK 17.

Any help would be greatly appreciated.

Replies

I am trying to sign a Java application, packaged in a disk image, via jpackage,

I recommend that you escalate this via the support path for the third-party tools you’re using. It’s hard to say exactly what this tool is looking for without knowing how the tool works.

Having said that, my best guess is that it’s looking for a code signing identity name. I have a couple of posts that discuss how to manually sign code for the Mac:

In the first there’s a Confirm Your Code Signing Identity section that discusses how to choose a code signing identity based on your planned distribution channel.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Did you ever find an answer to this? I'm running into the same issue.

Just figured this out myself. You need to create a specific type of certificate ("Developer ID"):

https://developer.apple.com/help/account/create-certificates/create-developer-id-certificates/

Once you have done this, download the certificate and import it into Keychain Access. You'll see it as "Developer ID Application: name (id)". The value for --mac-signing-key-user-name should be name.

  • Thanks for sharing!

Add a Comment