jna/darwin-aarch64/libjnidispatch.jnilib and jna/darwin-x86-64/libjnidispatch.jnilib is not signed

178 views
Skip to first unread message

virag purnam

unread,
Jul 8, 2023, 1:09:51 AM7/8/23
to Java Native Access
I get below error during Notarization

"message": "The binary is not signed with a valid Developer ID certificate.",

Regards,
Virag

Neil C Smith

unread,
Jul 8, 2023, 7:06:41 AM7/8/23
to jna-...@googlegroups.com

On Sat, 8 Jul 2023, 06:09 virag purnam, <virag...@gmail.com> wrote:
I get below error during Notarization

"message": "The binary is not signed with a valid Developer ID certificate.",

You can extract, sign and ship the native libraries separately to the JAR, and/or extract, sign and repackage the JAR itself. Even if you load the libraries separately, the notarization process may still complain about the libraries in the JAR even if they're not loaded from there.

This way you can sign everything with your signature, and the hardened runtime and entitlements your application needs.

In our packages of NetBeans IDE, and various NetBeans platform applications, we're doing this, covering JNA, the JDK, and a bunch of other native things. If it's of use to you, the packaging and signing code we use is at (or called from) https://github.com/apache/netbeans-nbpackage/blob/master/src/main/java/org/apache/netbeans/nbpackage/macos/AppBundleTask.java#L262

Best wishes,

Neil


--
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : 3rd Floor Suite, 207 Regent Street, London, W1B 3HH, England

virag purnam

unread,
Jul 9, 2023, 1:53:44 AM7/9/23
to Java Native Access
Hi  Neil,

Thanks for your reply. 
I tried to sign using 'codesign' but I get error for id.

"error: The specified item could not be found in the keychain."
Why is this error and how to resolve this? 

I am using below command to sign.
codesign --force -s "Developer ID Application: <name> (xxxxx)"  file.toString()

Thanks and regards,
Virag 

Tres Finocchiaro

unread,
Jul 9, 2023, 9:59:58 PM7/9/23
to jna-...@googlegroups.com
Thanks for your reply.
I tried to sign using 'codesign' but I get error for id.
"error: The specified item could not be found in the keychain."
Why is this error and how to resolve this?
I am using below command to sign.
codesign --force -s "Developer ID Application: <name> (xxxxx)"  file.toString()

This question is a bit off-topic for the JNA mailing list, since it pertains rather generically to Apple codesigning, but here's a writeup I made struggling through this 5 years ago:


 


--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/a6119c68-bd61-41eb-8ef4-1e0280cb012dn%40googlegroups.com.

virag purnam

unread,
Jul 11, 2023, 12:27:11 AM7/11/23
to Java Native Access
Thanks.
Reply all
Reply to author
Forward
0 new messages