Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8308042

[macOS] Developer ID Application Certificate not picked up by jpackage if it contains UNICODE characters

XMLWordPrintable

    • b12
    • x86_64
    • os_x

        ADDITIONAL SYSTEM INFORMATION :
        OSX Ventura 13.3.1

        A DESCRIPTION OF THE PROBLEM :
        I use jpackage to create a signed pkg installer. The name of our Developer ID Application Certificate contains special characters and is not found by jpackage. The signature step stops with error message "The 'Developer ID Application: ' did not match the name of my certificate."

        The reason for this is that the structure of the certificates "alis" property is different. In our case the alis property contains a hex representation of its name:
        "alis"<blob>=0x446576656C6F706572204944204170706C69636174696F6E3A20475A494D202[..] "Developer ID Application: GZIM - Gesellschaft zur F\303\266rderung der Impfmedizin mbH (Team-ID)"

        JPackage parses the alis property with this regex: "\"alis\"<blob>=\"([^\"]+)\" and therefore missing this certificate.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Run jpackage with an Developer ID Application Certificate containing special characters:

        jpackage --input target/ \
          --name JPackageDemoApp \
          --main-jar JPackageDemoApp.jar \
          --main-class de.gzim.Starter \
          --type pkg \
        --mac-sign \
        --mac-package-signing-prefix de.gzim \
        --mac-signing-key-user-name "GZIM - Gesellschaft zur Förderung der Impfmedizin mbH [TEAM-ID]" \


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Successful generation of signed pkg installer.
        ACTUAL -
        The signature step stops with error message "The 'Developer ID Application: ' did not match the name of my certificate."

        CUSTOMER SUBMITTED WORKAROUND :
        There is no workaround, since we cannot change the company name and the certificate is generated by Apple,

              almatvee Alexander Matveev
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: