PDA

View Full Version : Unable code signing OS X-based installers with .p12 certificate file



bravey
02-17-2015, 11:34 PM
Hi,
I followed the instructions in http://helpnet.flexerasoftware.com/installanywhere2014/Content/helplibrary/SigningOSX.htm to code sign my OS X-based installers.

But it failed on option 1 : performing code-signing step at build time. It complains that “Check if the supplied certificate is a valid Certificate with prefix=Developer ID Application:”. I am pretty sure that I created correct .p12 file following steps in http://helpnet.flexerasoftware.com/installanywhere2014/Content/helplibrary/OSX-CodesignPrep.htm#advanced_solutions_3688607622_1389744 Here is the screen capture of how I export my .p12 in Keychain Access
10728
And I also verified com.flexer.ia.helper file using “otool -X -s __TEXT __info_plist com.flexera.ia.helper | xxd -r”. Here is the result:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.flexera.ia.helper</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.flexera.ia.helper</string>
<key>CFBundleVersion</key>
<string>1.4</string>
<key>SMAuthorizedClients</key>
<array>
<string>identifier com.flexera.authenticator and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "xxxxxxx9X43")</string>
</array>
</dict>
</plist>


It works on option 2 though , if I manually modify Info.plist files and Code sign the installer . I think it also means that my Developer ID Application certificate is configured correctly on the same machine.

FYI, here is the ant logs when I try to build my .iap_xml using Ant task :


[buildinstaller] Using Properties set in iabuild.xml
[buildinstaller] Trying to load library IAMac
[buildinstaller] Error trying to load library no IAMac in java.library.path
[buildinstaller] Trying to checkout IAEB version=16.0
[buildinstaller] __________________________________________________________________________
[buildinstaller] InstallAnywhere 2014 SP1
[buildinstaller] Version: 16.5
[buildinstaller] Build: 4860
[buildinstaller] __________________________________________________________________________
[buildinstaller] Tue Feb 17 16:12:18 EST 2015
[buildinstaller] Free Memory: 44182 kB
[buildinstaller] Total Memory: 52736 kB
[buildinstaller] 4 Command Line Args:
[buildinstaller] 0: -b
[buildinstaller] 1: /MyDev/MyProject/branches/131_DEV/installer/MyProject_plugin_IA2014.iap_xml
[buildinstaller] 2: -p
[buildinstaller] 3: /MyDev/MyProject/branches/131_DEV/iabuild.xml
[buildinstaller] java.class.path:
[buildinstaller] /Applications/InstallAnywhere 2014 SP1/resource/image_defaults

[buildinstaller] ZGUtil.CLASS_PATH:
[buildinstaller] /Applications/InstallAnywhere 2014 SP1/resource/image_defaults

[buildinstaller] sun.boot.class.path:
[buildinstaller] /Applications/InstallAnywhere 2014 SP1/jre/lib/resources.jar

[buildinstaller] java.ext.dirs:
[buildinstaller] /Users/pgimac4/Library/Java/Extensions
[buildinstaller] /Applications/InstallAnywhere 2014 SP1/jre/lib/ext
[buildinstaller] /Library/Java/Extensions
[buildinstaller] /Network/Library/Java/Extensions
[buildinstaller] /System/Library/Java/Extensions
[buildinstaller] /usr/lib/java
[buildinstaller] java.version == 1.7.0_60 (Java 1)
[buildinstaller] mrj.version == null
[buildinstaller] java.vm.name == Java HotSpot(TM) 64-Bit Server VM
[buildinstaller] java.vm.vendor == Oracle Corporation
[buildinstaller] java.vm.version == 24.60-b09
[buildinstaller] java.vm.specification.name == Java Virtual Machine Specification
[buildinstaller] java.vm.specification.vendor == Oracle Corporation
[buildinstaller] java.vm.specification.version == 1.7
[buildinstaller] java.specification.name == Java Platform API Specification
[buildinstaller] java.specification.vendor == Oracle Corporation
[buildinstaller] java.specification.version == 1.7
[buildinstaller] java.vendor == Oracle Corporation
[buildinstaller] java.vendor.url == http://java.oracle.com/
[buildinstaller] java.class.version == 51.0
[buildinstaller] java.library.path == resource/fnp/libraries
[buildinstaller] java.compiler == null
[buildinstaller] java.home == /Applications/InstallAnywhere 2014 SP1/jre
[buildinstaller] java.io.tmpdir == /var/folders/vx/_0mcz2fj7s1487th4q58drrc0000gn/T/
[buildinstaller] os.name == Mac OS X
[buildinstaller] os.arch == x86_64
[buildinstaller] os.version == 10.10.1
[buildinstaller] path.separator == :
[buildinstaller] file.separator == /
[buildinstaller] file.encoding == UTF-8
[buildinstaller] user.name == pgimac4
[buildinstaller] user.home == /Users/pgimac4
[buildinstaller] user.dir == /Applications/InstallAnywhere 2014 SP1
[buildinstaller] user.language == en
[buildinstaller] user.region == null
[buildinstaller] __________________________________________________________________________
[buildinstaller] No VM Pack files exist in this directory
[buildinstaller] BuildInstaller: Asked to load /MyDev/MyProject/branches/131_DEV/installer/MyProject_plugin_IA2014.iap_xml
[buildinstaller] Copying /MyDev/MyProject/branches/131_DEV/installer/MyProject_plugin_IA2014Build.iap_xml. Using copy for build.
[buildinstaller] Original project unchanged
[buildinstaller] Using /MyDev/MyProject/branches/131_DEV/installer/MyProject_plugin_IA2014Build.iap_xml for console build option
[buildinstaller] BuildInstaller: Loading external build settings file: /MyDev/MyProject/branches/131_DEV/iabuild.xml
[buildinstaller] Building Installer...
[buildinstaller] Build Configuration Name: Default_Configuration
[buildinstaller] Selected Build Targets: windows windows+VM mac mac+VM
[buildinstaller] Active Build Options: Web
[buildinstaller] InstallAnywhere temporary directory is located at:: /MyDev/MyProject/branches/131_DEV/installer/.buildinstaller1.tmp
[buildinstaller] System's temporary directory = /tmp
[buildinstaller] Creating build directories...
[buildinstaller] [ 2015-02-17 16:12:20 ] BUILD STARTING
[buildinstaller] Preparing to build......
[buildinstaller] InstallAnywhere temporary directory is located at:: /MyDev/MyProject/branches/131_DEV/installer/.buildinstaller1.tmp
[buildinstaller] Creating build directories...
[buildinstaller] Checking free disk space...
[buildinstaller] Saving project...
[buildinstaller] Updating project pieces...
[buildinstaller] Generating script...
[buildinstaller] Populating labels...
[buildinstaller] XMLScriptWriter: No Installation Objects were skipped
[buildinstaller] Processing external properties...
[buildinstaller] Saving external properties...
[buildinstaller] Cleaning up...
[buildinstaller] WARNING: InstallAnywhere can not create the software identification tag because the required fields are missing under Project > Software Tag
[buildinstaller] XMLScriptWriter: No Installation Objects were skipped
[buildinstaller] Processing external properties...
[buildinstaller] Saving external properties...
[buildinstaller] Optimizing installer actions...
[buildinstaller] Finished optimizing by action
[buildinstaller] Copying common files...
[buildinstaller] Finished copying common files
[buildinstaller] Assembling common resources...
[buildinstaller] Assembling installer components...
[buildinstaller] (ELAPSED TIME): 0.284 seconds.
[buildinstaller] invalid entry size (expected 81752 but got 65536 bytes)
[buildinstaller] (ELAPSED TIME): 1.003 seconds.
[buildinstaller] Finished assembling installer components
[buildinstaller] Building windows (No VM) web installer...
[buildinstaller] The windows (No VM) web installer is located at:
[buildinstaller] /MyDev/MyProject/branches/131_DEV/dist/Default_Configuration/Web_Installers/InstData/windows/NoVM/InstallOtmmDriveConnector105.exe
[buildinstaller] Adding other errors: windows VM Pack missing, bailing out: SunJRE160_15Win32.vm
[buildinstaller] Building mac (No VM) web installer...
[buildinstaller] Input Certificate Path=JElBX1BST0pFQ1RfRElSJC9jZXJ0aWZpY2F0ZS9DZXJ0aWZpY2F0ZXMucDEy
[buildinstaller] Certificate Path After Decoding=$IA_PROJECT_DIR$/certificate/Certificates.p12
[buildinstaller] Certificate Path After Substitution=/MyDev/MyProject/branches/131_DEV/installer/certificate/Certificates.p12
[buildinstaller] Input Certificate Path=JElBX1BST0pFQ1RfRElSJC9jZXJ0aWZpY2F0ZS9DZXJ0aWZpY2F0ZXMucDEy
[buildinstaller] Certificate Path After Decoding=$IA_PROJECT_DIR$/certificate/Certificates.p12
[buildinstaller] Certificate Path After Substitution=/MyDev/MyProject/branches/131_DEV/installer/certificate/Certificates.p12
[buildinstaller] Input Certificate Path=JElBX1BST0pFQ1RfRElSJC9jZXJ0aWZpY2F0ZS9DZXJ0aWZpY2F0ZXMucDEy
[buildinstaller] Certificate Path After Decoding=$IA_PROJECT_DIR$/certificate/Certificates.p12
[buildinstaller] Certificate Path After Substitution=/MyDev/MyProject/branches/131_DEV/installer/certificate/Certificates.p12
[buildinstaller] Input Certificate Path=JElBX1BST0pFQ1RfRElSJC9jZXJ0aWZpY2F0ZS9DZXJ0aWZpY2F0ZXMucDEy
[buildinstaller] Certificate Path After Decoding=$IA_PROJECT_DIR$/certificate/Certificates.p12
[buildinstaller] Certificate Path After Substitution=/MyDev/MyProject/branches/131_DEV/installer/certificate/Certificates.p12
[buildinstaller] java.security.SignatureException: Check if the supplied certificate is a valid Certificate with prefix=Developer ID Application:
[buildinstaller] at Flexeraaa1.ah(Unknown Source)
[buildinstaller] at Flexeraaa1.ag(Unknown Source)
[buildinstaller] at Flexeraaa5.ai(Unknown Source)
[buildinstaller] at Flexeraaec.ar(Unknown Source)
[buildinstaller] at Flexeraaec.ah(Unknown Source)
[buildinstaller] at Flexeraaec.aa(Unknown Source)
[buildinstaller] at Flexeraaeb.dn(Unknown Source)
[buildinstaller] at Flexeraaeb.am(Unknown Source)
[buildinstaller] at Flexeraaei.c3(Unknown Source)
[buildinstaller] at Flexeraaeb.ah(Unknown Source)
[buildinstaller] at Flexeraaei.ab(Unknown Source)
[buildinstaller] at Flexeraad_.a4(Unknown Source)
[buildinstaller] at Flexeraad6.run(Unknown Source)
[buildinstaller] Build failure: SignatureException while code-signing OSX Executable

[buildinstaller] null
[buildinstaller] Check if the supplied certificate is a valid Certificate with prefix=Developer ID Application:
[buildinstaller] BuildInstaller querying for fatal errors.
[buildinstaller] Build failure.
[buildinstaller] Reason: SignatureException while code-signing OSX Executable
[buildinstaller] Suggestion/Details: Relaunch InstallAnywhere and rebuild your project.directory inside designer resource directory.your project file resides.If symptoms persist, contact InstallAnywhere Technical Support.
[buildinstaller] Build unsuccessful.
[buildinstaller] null
[buildinstaller] Closed.
[buildinstaller] SignatureException while code-signing OSX Executable
[buildinstaller] Relaunch InstallAnywhere and rebuild your project.directory inside designer resource directory.your project file resides.If symptoms persist, contact InstallAnywhere Technical Support.
[buildinstaller] EXITING: -1
[buildinstaller] Result: 255


Thanks