Native code for Mac in distribution jar is unsigned

Ouverte
#658 3 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
java
Domaine
build-system

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Java
Étoiles
1.1k
Forks
261
Merge moyen
2 min
PR mergées (30 j)
2

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de xerial/snappy-java

Toutes les issues de xerial/snappy-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.