我创建了一个JavaFx应用程序,并创建了多平台本机包。实际上,我成功地创建了Windows和Mac OsX包。现在我想要签署我的包,以避免恼人的警报在安装期间。我购买了一个Comodo证书,在Windows中我能够正确地签名我的exe文件。
而在Mac上,我有问题。我遵循了本教程https://docs.oracle.com/javafx/2/deployment/self-continu-packaging.htm#bcgdbibb,并在我的钥匙串中导入了Comodo证书。
我创建了一个post图像脚本:
echo "Signing application bundle"
#Move to the folder containing application bundle
cd ../images/dmg.image
#do sign
codesign -s "CN_OF_COMODO_CERTIFICATE" *.app
echo "Done with signing"
但在编译过程中,我会收到以下消息:
do-deploy:
[copy] Copying 47 files to /Users/Utente/Documents/workspaceServer
/app/javafx/target/dist/libs
Using base JDK at: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
Using base JDK at: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Creating app bundle: /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk.app
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler309272187389884092/macosx. Use them to customize package.
Building DMG package for appDesk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx. Use them to customize package.
Using default package resource [dmg background] (add package/macosx/appDesk-background.png to the class path to customize)
Using default package resource [volume icon] (add package/macosx/appDesk-volume.icns to the class path to customize)
Using custom package resource [script to run after application image is populated] (loaded from package/macosx/appDesk-post-image.sh)
Using default package resource [License setup] (add package/macosx/appDesk-license.plist to the class path to customize)
Using default package resource [DMG setup script] (add package/macosx/appDesk-dmg-setup.scpt to the class path to customize)
Running shell script on application image [/var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx/appDesk-post-image.sh]
Signing application bundle
*.app
: No such file or directory
Done with signing
hdiutil: unflatten: unflattening "appDesk-3.0.3.dmg"...
copying resource 'STR#' (5000)...
copying resource 'STR#' (5001)...
copying resource 'STR#' (5002)...
copying resource 'STR#' (5003)...
copying resource 'STR#' (5004)...
copying resource 'STR#' (5005)...
copying resource 'STR#' (5006)...
copying resource 'STR#' (5007)...
copying resource 'STR#' (5008)...
copying resource 'STR#' (5009)...
copying resource 'STR#' (5010)...
copying resource 'STR#' (5011)...
copying resource 'STR#' (5012)...
copying resource 'STR#' (5013)...
copying resource 'STR#' (5014)...
copying resource 'STR#' (5015)...
copying resource 'STR#' (5016)...
copying resource 'plst' (0)...
copying resource 'TEXT' (5000)...
copying resource 'LPic' (5000)...
copying resource 'styl' (5000)...
copying resource 'TMPL' (128)...
hdiutil: flatten: flattening "appDesk-3.0.3.dmg"...
Result DMG installer for appDesk: /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk-3.0.3.dmg
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8772000028741891358/macosx. Use them to customize package.
Building PKG package for appDesk
Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist)
Using custom package resource [icon] (loaded from package/macosx/appDesk.icns)
Did not find a key matching 'Developer ID Application: '
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx. Use them to customize package.
Using default package resource [pkg background image] (add package/macosx/appDesk-background.png to the class path to customize)
Using custom package resource [script to run after application image is populated] (loaded from package/macosx/appDesk-post-image.sh)
Running shell script on application image [/var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx/appDesk-post-image.sh]
Signing application bundle
{}
*.app
: No such file or directory
Done with signing
pkgbuild: Adding component at /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/images/image-5462634906848679457/appDesk.app
pkgbuild: Wrote package to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/packages/appDesk-app.pkg
Did not find a key matching 'Developer ID Installer: '
productbuild: Wrote product to /Users/Utente/Documents/workspaceServer/app/javafx/target/deploy/bundles/appDesk-3.0.3.pkg
Config files are saved to /var/folders/q6/vmt_h0tx3rgdbt_4h2_2f3780000gn/T/fxbundler8003647333686847937/macosx. Use them to customize package.
Did not find a key matching '3rd Party Mac Developer Application: '
Bundler Mac App Store Ready Bundler skipped because of a configuration problem: No Mac App Store App Signing Key
Advice to fix: Install your app signing keys into your Mac Keychain using XCode.
BUILD SUCCESSFUL
Total time: 3 minutes 59 seconds
有没有想过如何解决这个问题,并在构建期间自动签署dmg?
======编辑==========这是我的info.plist文件(按要求):
<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSMinimumSystemVersion</key>
<string>10.7.4</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleExecutable</key>
<string>appDesk</string>
<key>CFBundleIconFile</key>
<string>appDesk.icns</string>
<key>CFBundleIdentifier</key>
<string>fxApplication</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>appDesk</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
for list of AppStore categories -->
<key>LSApplicationCategoryType</key>
<string>Unknown</string>
<key>CFBundleVersion</key>
<string>3.0.4</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
</dict>
</plist>
如果你有正确的工具,这并不是很复杂。只需下载amipackage(https://amidb.com/amipackage)并运行:
cd /Applications/amipackage.app/Contents/scripts
chmod a+x ./amipackage.sh
./amipackage.sh --config=/Users/jsmith/cooljavaapp.properties
它生成dmg、xcarchives等。
免责声明:我参与了amipackage
因为存在安全隐患,如果你能辅助签名过程,最好避免使用自动签名。 在一般情况下,如果你想自动加入大量的客户端,最好在 Puppetmaster 上预先生成证书,然后将其作为构建过程的一部分推送给客户端。 你可以使用 puppet cert --generate <hostname> 命令生成预签名证书(pre-signed certificate)。 操作步骤 使用如下命令为 client1.exa
我需要用DSA公钥验证X509证书签名。我的证书文件x509.crt,我的DSA公钥在一个名为dsa_pub.key的文件中 我正试图为此使用openssl。我已经阅读了openssl验证文档,但在其中找不到任何有关DSA的参考。 当我运行以下命令时,我可以在证书中看到我的DSA公钥: 但是,在使用文件DSA_pub.key中的DSA公钥验证cert.crt时,我遇到了麻烦 如果您有任何建议,我将
我最近升级了Inteliij IDEA 2019.2,如果我尝试从IDE中提取Git,我会发现以下错误:无法访问'https://github.xxx.com/app-Hello-USD/DGS.git/“:SSL证书问题:证书链中的自签名证书。 有人能帮我什么选项,我必须启用。 谢谢
问题内容: 当尝试使用其PHP库通过Twilio发送消息时,我正在为这个错误而苦苦挣扎: 我在Windows 7上使用了wamp。 我当然找到了所有其他有关证书错误的信息。据我所知,通常更新或添加文件即可解决该问题。但是,即使这样做,我仍然遇到相同的错误。 就像这里所做的健全性检查一样,这正是我所做的: 从此处下载了最新的证书:http : //curl.haxx.se/ca/cacert.pem
我的手被https、ssl、PKI之类的东西弄得脏兮兮的。对于自签名证书,有一点我不太理解。假设我想创建一个自签名证书,并在我们想要建立安全连接时将其发送给我的朋友。 所以步骤是: 创建一个私钥。 创建一个公钥。 用我的公钥在证书上签名。 因此,当我的朋友得到我的证书时,他必须验证他得到的证书是我的,他需要解密数字签名。但为了解密和验证他必须拥有我的私钥。所以,我有点困惑。
我有一个客户端服务器场景。 我有厚客户端和瘦客户端(浏览器),它们与我的服务器进行通信。 我的胖客户端使用X-509系统证书进行客户端证书身份验证,并与服务器通信 此外,此证书用于生成签名URL(带过期时间),以便我的瘦客户机与服务器通信,用于完整性和授权目的。在这种情况下,我也有一个基于令牌的方法用于身份验证。 现在,我想使用客户端凭据或基于身份验证代码将身份验证机制移动到基于OAuth的流。