Native code for Mac in distribution jar is unsigned

Offen
#658 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
build-system

Rechercherichtung

The affected files are the three macOS native libraries under org/xerial/snappy/native/Mac/ in the distribution jar. Start by inspecting how these binaries are produced and packaged, then check their signatures with Apple’s notarization tooling; done means each library is signed with a valid Apple Developer ID and passes notarization validation when included as a dependency.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

In the distribution jar, the files

org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib,
org/xerial/snappy/native/Mac/x86/libsnappyjava.jnilib,
and
org/xerial/snappy/native/Mac/x86_64/libsnappyjava.dylib,

are currently not properly signed with an Apple Developer ID.

While aarch64/libsnappyjava.dylib according to the signcode command (signcode -vvvvvv aarch64/libsnappyjava.dylib) does have a signature in principle, it is rejected by Apple's notarization mechanism when the jar is included as a dependency:

    { 
      "severity": "error",
      "code": null,
      "path": "[...]/lib/snappy-java-1.1.10.5.jar/org/xerial/snappy/native/Mac/aarch64/libsnappyjava.dylib",
      "message": "The binary is not signed with a valid Developer ID certificate.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "arm64"
    },

The files x86/libsnappyjava.jnilib and x86_64/libsnappyjava.dylib do not have a signature at all and are rejected as well:

    { 
      "severity": "error",
      "code": null,
      "path": "[...]/lib/snappy-java-1.1.10.5.jar/org/xerial/snappy/native/Mac/x86_64/libsnappyjava.dylib",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },

The signatures have been faulty/lacking at least since 1.1.10.5 up to the current release.

BTW: If anyone encounters this problem, a workaround is to unpack the jar, sign the files yourself, repack and sign the jar as well. For me, it worked best to use jar xf and jar cf for this. See also https://developer.apple.com/forums/thread/764017

Vorherrschende Sprache
Java
Sterne
1.1k
Forks
261
Ø Merge
2 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus xerial/snappy-java

Alle Issues in xerial/snappy-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.