Skip to content
Permalink
Browse files

8242865: Usability problems using mac signing in jpackage

Reviewed-by: asemenyuk, almatvee
  • Loading branch information
Andy Herrick
Andy Herrick committed May 3, 2020
1 parent 0efacb3 commit 14ae7cf7692de8c8d5978ffe7a3e0d6cfa13c99a
@@ -167,12 +167,14 @@ public static String findKey(String key, String keychainName,
Pattern p = Pattern.compile("\"alis\"<blob>=\"([^\"]+)\"");
Matcher m = p.matcher(baos.toString());
if (!m.find()) {
Log.error("Did not find a key matching '" + key + "'");
Log.error(MessageFormat.format(I18N.getString(
"error.cert.not.found"), key, keychainName));
return null;
}
String matchedKey = m.group(1);
if (m.find()) {
Log.error("Found more than one key matching '" + key + "'");
Log.error(MessageFormat.format(I18N.getString(
"error.multiple.certs.found"), key, keychainName));
return null;
}
Log.verbose("Using key '" + matchedKey + "'");
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,18 +31,19 @@ pkg.bundler.name=Mac PKG Package

error.invalid-cfbundle-version=Invalid CFBundleVersion: [{0}]
error.invalid-cfbundle-version.advice=Set a compatible 'appVersion' or set a 'mac.CFBundleVersion'. Valid versions are one to three integers separated by dots.
error.explicit-sign-no-cert=Signature explicitly requested but no signing certificate specified
error.explicit-sign-no-cert.advice=Either specify a valid cert in 'mac.signing-key-developer-id-app' or unset 'signBundle' or set 'signBundle' to false.
error.explicit-sign-no-cert=Signature explicitly requested but no signing certificate found
error.explicit-sign-no-cert.advice=Specify a valid mac-signing-key-user-name and mac-signing-keychain
error.must-sign-app-store=Mac App Store apps must be signed, and signing has been disabled by bundler configuration
error.must-sign-app-store.advice=Either unset 'signBundle' or set 'signBundle' to true
error.must-sign-app-store.advice=Use --mac-sign option with appropriate user-name and keychain
error.no-app-signing-key=No Mac App Store App Signing Key
error.no-app-signing-key.advice=Install your app signing keys into your Mac Keychain using XCode.
error.no-pkg-signing-key=No Mac App Store Installer Signing Key
error.no-pkg-signing-key.advice=Install your app signing keys into your Mac Keychain using XCode.
error.certificate.expired=Error: Certificate expired {0}
error.no.xcode.signing=Xcode with command line developer tools is required for signing
error.no.xcode.signing.advice=Install Xcode with command line developer tools.

error.cert.not.found=No certificate found matching [{0}] using keychain [{1}]
error.multiple.certs.found=Multiple certificates found matching [{0}] using keychain [{1}]
resource.bundle-config-file=Bundle config file
resource.app-info-plist=Application Info.plist
resource.runtime-info-plist=Java Runtime Info.plist
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,17 +31,19 @@ pkg.bundler.name=Mac PKG\u30D1\u30C3\u30B1\u30FC\u30B8

error.invalid-cfbundle-version=\u7121\u52B9\u306ACFBundleVersion: [{0}]
error.invalid-cfbundle-version.advice=\u4E92\u63DB\u6027\u306E\u3042\u308B'appVersion'\u3092\u8A2D\u5B9A\u3059\u308B\u304B\u3001'mac.CFBundleVersion'\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6709\u52B9\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3001\u30C9\u30C3\u30C8\u3067\u533A\u5207\u3089\u308C\u305F1\u304B\u30893\u3064\u306E\u6574\u6570\u3067\u3059\u3002
error.explicit-sign-no-cert=\u7F72\u540D\u304C\u660E\u793A\u7684\u306B\u8981\u6C42\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u7F72\u540D\u8A3C\u660E\u66F8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
error.explicit-sign-no-cert.advice=\u6709\u52B9\u306A\u8A3C\u660E\u66F8\u3092'mac.signing-key-developer-id-app'\u3067\u6307\u5B9A\u3059\u308B\u304B\u3001'signBundle'\u3092\u8A2D\u5B9A\u89E3\u9664\u3059\u308B\u304B\u3001\u307E\u305F\u306F'signBundle'\u3092false\u306B\u8A2D\u5B9A\u3057\u307E\u3059\u3002
error.explicit-sign-no-cert=Signature explicitly requested but no signing certificate found
error.explicit-sign-no-cert.advice=Specify a valid mac-signing-key-user-name and mac-signing-keychain
error.must-sign-app-store=Mac App Store\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306F\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u7F72\u540D\u306F\u30D0\u30F3\u30C9\u30E9\u69CB\u6210\u306B\u3088\u3063\u3066\u7121\u52B9\u5316\u3055\u308C\u3066\u3044\u307E\u3059
error.must-sign-app-store.advice='signBundle'\u3092\u8A2D\u5B9A\u89E3\u9664\u3059\u308B\u304B\u3001'signBundle'\u3092true\u306B\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
error.must-sign-app-store.advice=Use --mac-sign option with appropriate user-name and keychain
error.no-app-signing-key=Mac App Store\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u7F72\u540D\u30AD\u30FC\u304C\u3042\u308A\u307E\u305B\u3093
error.no-app-signing-key.advice=XCode\u3092\u4F7F\u7528\u3057\u3066\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u7F72\u540D\u30AD\u30FC\u3092Mac\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u3002
error.no-pkg-signing-key=Mac App Store\u30A4\u30F3\u30B9\u30C8\u30FC\u30E9\u306E\u7F72\u540D\u30AD\u30FC\u304C\u3042\u308A\u307E\u305B\u3093
error.no-pkg-signing-key.advice=XCode\u3092\u4F7F\u7528\u3057\u3066\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u7F72\u540D\u30AD\u30FC\u3092Mac\u30AD\u30FC\u30C1\u30A7\u30FC\u30F3\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u3002
error.certificate.expired=\u30A8\u30E9\u30FC: \u8A3C\u660E\u66F8\u306F{0}\u306B\u671F\u9650\u304C\u5207\u308C\u307E\u3057\u305F
error.no.xcode.signing=\u7F72\u540D\u306B\u306F\u3001Xcode\u3068\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30C7\u30D9\u30ED\u30C3\u30D1\u30FB\u30C4\u30FC\u30EB\u304C\u5FC5\u8981\u3067\u3059
error.no.xcode.signing.advice=Xcode\u3068\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30C7\u30D9\u30ED\u30C3\u30D1\u30FB\u30C4\u30FC\u30EB\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
error.cert.not.found=No certificate found matching [{0}] using keychain [{1}]
error.multiple.certs.found=Multiple certificates found matching [{0}] using keychain [{1}]

resource.bundle-config-file=\u30D0\u30F3\u30C9\u30EB\u69CB\u6210\u30D5\u30A1\u30A4\u30EB
resource.app-info-plist=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306EInfo.plist
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -31,17 +31,19 @@ pkg.bundler.name=Mac PKG \u7A0B\u5E8F\u5305

error.invalid-cfbundle-version=\u65E0\u6548\u7684 CFBundleVersion\uFF1A[{0}]
error.invalid-cfbundle-version.advice=\u8BBE\u7F6E\u517C\u5BB9\u7684 'appVersion' \u6216\u8005\u8BBE\u7F6E 'mac.CFBundleVersion'\u3002\u6709\u6548\u7248\u672C\u5305\u542B\u4E00\u5230\u4E09\u4E2A\u7528\u70B9\u5206\u9694\u7684\u6574\u6570\u3002
error.explicit-sign-no-cert=\u5DF2\u660E\u786E\u8BF7\u6C42\u7B7E\u540D, \u4F46\u672A\u6307\u5B9A\u7B7E\u540D\u8BC1\u4E66
error.explicit-sign-no-cert.advice=\u5728 'mac.signing-key-developer-id-app' \u4E2D\u6307\u5B9A\u6709\u6548\u7684\u8BC1\u4E66, \u6216\u8005\u53D6\u6D88\u8BBE\u7F6E 'signBundle', \u6216\u8005\u5C06 'signBundle' \u8BBE\u7F6E\u4E3A\u201C\u5047\u201D\u3002
error.explicit-sign-no-cert=Signature explicitly requested but no signing certificate found
error.explicit-sign-no-cert.advice=Specify a valid mac-signing-key-user-name and mac-signing-keychain
error.must-sign-app-store=Mac App Store \u5E94\u7528\u7A0B\u5E8F\u5FC5\u987B\u7B7E\u540D, \u800C\u6253\u5305\u7A0B\u5E8F\u914D\u7F6E\u5DF2\u7981\u7528\u7B7E\u540D
error.must-sign-app-store.advice=\u53D6\u6D88\u8BBE\u7F6E 'signBundle' \u6216\u8005\u5C06 'signBundle' \u8BBE\u7F6E\u4E3A true
error.must-sign-app-store.advice=Use --mac-sign option with appropriate user-name and keychain
error.no-app-signing-key=\u65E0 Mac App Store \u5E94\u7528\u7A0B\u5E8F\u7B7E\u540D\u5BC6\u94A5
error.no-app-signing-key.advice=\u4F7F\u7528 XCode \u5C06\u5E94\u7528\u7A0B\u5E8F\u7B7E\u540D\u5BC6\u94A5\u5B89\u88C5\u5230 Mac \u5BC6\u94A5\u94FE\u4E2D\u3002
error.no-pkg-signing-key=\u65E0 Mac App Store \u5B89\u88C5\u7A0B\u5E8F\u7B7E\u540D\u5BC6\u94A5
error.no-pkg-signing-key.advice=\u4F7F\u7528 XCode \u5C06\u5E94\u7528\u7A0B\u5E8F\u7B7E\u540D\u5BC6\u94A5\u5B89\u88C5\u5230 Mac \u5BC6\u94A5\u94FE\u4E2D\u3002
error.certificate.expired=\u9519\u8BEF: \u8BC1\u4E66\u5DF2\u5931\u6548 {0}
error.no.xcode.signing=\u9700\u8981\u4F7F\u7528\u5E26\u547D\u4EE4\u884C\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177\u7684 Xcode \u8FDB\u884C\u7B7E\u540D
error.no.xcode.signing.advice=\u5B89\u88C5\u5E26\u547D\u4EE4\u884C\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177\u7684 Xcode\u3002
error.cert.not.found=No certificate found matching [{0}] using keychain [{1}]
error.multiple.certs.found=Multiple certificates found matching [{0}] using keychain [{1}]

resource.bundle-config-file=\u5305\u914D\u7F6E\u6587\u4EF6
resource.app-info-plist=\u5E94\u7528\u7A0B\u5E8F Info.plist

0 comments on commit 14ae7cf

Please sign in to comment.