Justin
Justin

Reputation: 21

Why am I getting a "unable to load a certificate in this file" error? Adobe Air captive runtime bundle

I have an application packaged as a captive runtime bundle, that I have been packaging with a command like this:

adt -package  
-keystore ..\install_windows\air_certificate_windows.p12 -storetype pkcs12  
-target bundle  
MyAPP  
..\src\MyAPP-app.xml  
MyAPP.swf icons splash_screen  

This suddenly stopped working a few days ago and it has been giving me this error:

unable to load a certificate in this file  
usage:  
  adt -checkstore SIGNING_OPTIONS  
  adt -certificate -cn <name> ( -ou <org-unit> )? ( -o <org-name> )? ( -c <country> )? ( -validityPeriod <years> )? 2048-RSA <pfx-file> <password>  
  adt -help  
  adt -migrate SIGNING_OPTIONS ( <air-file-in> | <airn-file-in> ) <output-file>  
  adt -package SIGNING_OPTIONS ( -target air )? <output-package> ( <app-desc> FILE_OPTIONS | <input-package> )  
  adt -package SIGNING_OPTIONS -target airn <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )  
  adt -package -target ( apk | apk-debug | apk-emulator | apk-captive-runtime ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -airDownloadURL <url> )? ( ARCH_OPTIONS )? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )  
  adt -package -target ( ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc | ipa-test-interpreter | ipa-debug-interpreter | ipa-test-interpreter-simulator | ipa-debug-interpreter-simulator ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -sampler )? ANE_LINK_OPTIONS? AOT_MODE_OPTIONS? EMBED_BITCODE_OPTIONS? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )  
  adt -package SIGNING_OPTIONS? -target native SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )  
  adt -package SIGNING_OPTIONS? -migrate SIGNING_OPTIONS -target native SIGNING_OPTIONS? <output-package> <app-desc> FILE_OPTIONS PATH-OPTION  
  adt -package SIGNING_OPTIONS? -target bundle SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )  
  adt -package SIGNING_OPTIONS? -target ane <output-package> <ext-desc> ANE_OPTIONS  
  adt -prepare <airi-file> <app-desc> FILE_AND_PATH_OPTIONS  
  adt -sign SIGNING_OPTIONS ( -target ( air | airn | ane ) )? ( <airi-file> | <unsigned-ane-file> ) <output-file>  
  adt -devices          PLATFORM-OPTION PLATFORM-SDK-OPTION?  
  adt -installRuntime   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -package <apk-file> )?  
  adt -installApp       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -package <apk-file | ipa-file>  
  adt -uninstallRuntime PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?  
  adt -uninstallApp     PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>  
  adt -launchApp        { PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -debuggerPort port )? -appid <app-id> }  
  adt -runtimeVersion   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?  
  adt -appVersion       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>  
  adt -version  

SIGNING_OPTIONS      : -storetype <type> ( -keystore <store> )? ( -storepass <pass> )? ( -alias <aliasName> )? ( -keypass <pass> )? ( -providerName <name> )? ( -tsa <url> )? ( -provisioning-profile <profile> )?  
FILE_OPTIONS         : <fileOrDir>* ( ( -C <dir> <fileOrDir>+ ) | ( -e <file> <path> ) )*  
ARCH_OPTIONS              : -arch (armv7 | x86)  
CONNECT_OPTIONS      : -connect <host>  
LISTEN_OPTIONS       : -listen <port>  
ANE_LINK_OPTIONS     : -hideAneLibSymbols ( yes | no )  
ANE_OPTIONS          : -swc <swc> ( -platform <name> (-platformoptions <file>)? <fileOrDir>* ( -C <dir> <fileOrDir>+ )* )*  
FILE-AND-PATH-OPTIONS: ( PATH-OPTION | FILE-OPTIONS ) FILE-AND-PATH-OPTIONS?  
PATH-OPTION          : -extdir <dir>  
PLATFORM-OPTION      : -platform (android | ios)  
PLATFORM-SDK-OPTION  : -platformsdk <platform-sdk-home-dir>  
DEVICE-OPTION        : -device ( deviceID | ios-simulator )  
AOT_MODE_OPTIONS     : -useLegacyAOT ( yes | no )  
EMBED_BITCODE_OPTIONS: -embedBitcode ( yes | no )  

I've tried a few things:

  1. Restarting computer
  2. Creating a new certificate from my application
  3. Getting a newer Java version
  4. Reinstalling AIR.
  5. Looking to the date at which I first created the certificate. It was about 160 days ago. Looking at the docs, the certificates have a span of 180 days though if timestamp.

Please advise, thanks

Upvotes: 1

Views: 1366

Answers (3)

Tim Yusupov
Tim Yusupov

Reputation: 37

No need for downgrading Java if you instruct ADT to create certificate with 2048-RSA key instead of 1024 (as new Java requires).

adt -certificate -cn MyCertificateName 2048-RSA MyKeyName.p12 MyKeyPassword

Upvotes: 2

codingbuddha
codingbuddha

Reputation: 707

I downgraded to 8_112 and thankfully it works.

Upvotes: 2

Nemi
Nemi

Reputation: 1032

Use older Java version, or create new certificate with 2048 RSA key. New Java rules happened around version 8.0_121: no more support for RSA keys with 1024 bits length.

Upvotes: 2

Related Questions