ADDITIONAL SYSTEM INFORMATION :
openjdk-17.0.2
A DESCRIPTION OF THE PROBLEM :
When using --mac-sign flag on jpackage to sign an app-image and passing a key for certificate already installed in the keychain: "Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)" the tool is not able to find the installed certificate.
I tracked the problem to the class MacBaseInstallerBundler in the "findKey" method. The command "security find-certificate -c key -a" is executed but output contains the follow information:
"alis"<blob>=0x446576656C6F706572204944204170706C69636174696F6E3A20416E696D6174692053697374656D617320646520496E666F726DC3A174696361204C746461202D20455050202836355A3444395234505529 "Developer ID Application: Empresa de Inform\303\241tica Ltda - EPP (SOME_ID_HERE)".
The method "findKey" gets that output and uses a regex expression and try to match with the given certiticate ID:
```
Pattern p = Pattern.compile("\"alis\"<blob>=\"([^\"]+)\"");
Matcher m = p.matcher(baos.toString());
```
But, the given parameter "Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)" doesn't match with the output "Developer ID Application: Empresa de Inform\303\241tica Ltda - EPP (SOME_ID_HERE)" and returns the message:
"No certificate found matching [Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)] using keychain ..."
FREQUENCY : always
openjdk-17.0.2
A DESCRIPTION OF THE PROBLEM :
When using --mac-sign flag on jpackage to sign an app-image and passing a key for certificate already installed in the keychain: "Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)" the tool is not able to find the installed certificate.
I tracked the problem to the class MacBaseInstallerBundler in the "findKey" method. The command "security find-certificate -c key -a" is executed but output contains the follow information:
"alis"<blob>=0x446576656C6F706572204944204170706C69636174696F6E3A20416E696D6174692053697374656D617320646520496E666F726DC3A174696361204C746461202D20455050202836355A3444395234505529 "Developer ID Application: Empresa de Inform\303\241tica Ltda - EPP (SOME_ID_HERE)".
The method "findKey" gets that output and uses a regex expression and try to match with the given certiticate ID:
```
Pattern p = Pattern.compile("\"alis\"<blob>=\"([^\"]+)\"");
Matcher m = p.matcher(baos.toString());
```
But, the given parameter "Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)" doesn't match with the output "Developer ID Application: Empresa de Inform\303\241tica Ltda - EPP (SOME_ID_HERE)" and returns the message:
"No certificate found matching [Developer ID Application: Empresa de Informática Ltda - EPP (SOME_ID_HERE)] using keychain ..."
FREQUENCY : always
- duplicates
-
JDK-8308042 [macOS] Developer ID Application Certificate not picked up by jpackage if it contains UNICODE characters
- Resolved