github-af / SmartPGP

SmartPGP is a JavaCard implementation of the OpenPGP card specifications
GNU General Public License v2.0
229 stars 48 forks source link

[java] error: invalid AID length: 3. must be between 5 to 16 bytes in length. #9

Closed 424778940z closed 6 years ago

424778940z commented 6 years ago

keep getting this error while building

I didnt change anything in build.xml ubuntu, openjdk8, jc3.0.4 sdk

all compile done without error, but convert will fail

Buildfile: /home/adam/Desktop/SmartPGP/build.xml init: [mkdir] Created dir: /home/adam/Desktop/SmartPGP/build compile: [javac] Compiling 13 source files to /home/adam/Desktop/SmartPGP/build [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac] warning: [options] source value 1.6 is obsolete and will be removed in a future release [javac] warning: [options] target value 1.6 is obsolete and will be removed in a future release [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. [javac] 4 warnings convert: [java] Usage: converter package_name package_aid major_version.minor_version [java] OR [java] converter -config [java] use file for all options and parameters to converter [java] Where options include: [java] -classdir [java] set the root directory where the Converter
[java] will look for classes [java] -i support the 32-bit integer type [java] -exportpath [java] list the root directories where the Converter
[java] will look for export files [java] -exportmap use the token mapping from the pre-defined export
[java] file of the package being converted. The converter [java] will look for the export file in the exportpath [java] -applet [java] set the applet AID and the class that defines the [java] install method for the applet [java] -d [java] -out [CAP] [EXP] [JCA] [java] tell the Converter to output the CAP file, [java] and/or the JCA file, and/or the export file [java] -V, -version print the Converter version string [java] -v, -verbose enable verbose output [java] -help print out this message [java] -nowarn instruct the Converter to not report warning messages [java] -mask indicate this package is for mask, so restrictions on
[java] native methods are relaxed [java] -debug enable generation of debugging information [java] -nobanner suppress all standard output messages [java] -noverify turn off verification. Verification is default [java] -sign sign the output CAP file [java] -keystore [java] keystore to use in signing [java] -storepass [java] keystore password [java] -alias [java] keystore alias to use in signing [java] -passkey [java] alias password [java] -useproxyclass [java] user supplied proxy classes (proxy classes not generated by converter) [java] -usecapcomponents [java] user supplied cap components [java] -keepproxysource [java] keep generated proxy source files in specified directory [java] error: invalid AID length: 3. must be between 5 to 16 bytes in length. BUILD FAILED /home/adam/Desktop/SmartPGP/build.xml:24: Java returned: 1 Total time: 1 second

martinpaljak commented 6 years ago

Shameless plug: maybe converting the ant build file to use https://github.com/martinpaljak/ant-javacard would work more smoothly

af-anssi commented 6 years ago

Can you please provide the output of ant -v ?

martinpaljak commented 6 years ago

@af-anssi would a PR that would convert build.xml to ant-javacard be worth it?

424778940z commented 6 years ago

I think I know why..... the oracle installer default path contains space... and the build script didnt filter that...

 [java] '-exportpath'
 [java] '/home/adam/Java'
 [java] 'Card'
 [java] '3'
 [java] 'Development'
 [java] 'Kit//api_export_files'
424778940z commented 6 years ago

after rename the jcsdk folder everything works