我尝试使用oracle卡开发工具包3.0.5u2命令行工具。
verifycap.bat与sdk的api_export_files目录中的导出文件一起使用在我的cap上。
..\api_export_files\javacard\framework\javacard\framework.exp ..\api_export_files\javacard\security\javacard\security.exp ..\api_export_files\java\lang\javacard\lang.exp verifycap.bat -nobanner -nowarn kaylat.cap > kaylat.hash我得到一个包含以下内容的散列文件:
[ INFO: ] [v3.0.5] Off-Card Verifier, Version {1}.
[ INFO: ] Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
[ INFO: ] Vérification du fichier CAP kaylat.cap
[ INFO: ] Hash for kaylat/javacard/ConstantPool.cap [SHA-256: ad9ece95c64174d87b92488213081d1f977c975ba116fd7dead60246a1a94099]
[ INFO: ] Hash for kaylat/javacard/StaticField.cap [SHA-256: 5863e9740af5fb905922380b2aa88309a16a285dd3412417ae8af941327901ee]
[ INFO: ] Hash for kaylat/javacard/Descriptor.cap [SHA-256: 957c5fd5ebee857a06b38129d5b94b3a0bf155d989c6db4080bc8f0ec2c26606]
[ INFO: ] Hash for kaylat/javacard/Header.cap [SHA-256: 67802c08d73cee2e77947b76dd5f5f728055fec8c9ab4820369b18f845bb4eab]
[ INFO: ] Hash for kaylat/javacard/Directory.cap [SHA-256: 803ba29574f2013b4dc895253afaf0bc8376deb1110eb35ee90c6e6807b70a59]
[ INFO: ] Hash for kaylat/javacard/Applet.cap [SHA-256: 17b671b4e2371e00eea2717f84cb016baa818a92c46687e25b5392023a071229]
[ INFO: ] Hash for kaylat/javacard/Method.cap [SHA-256: 9e7dd02202e95de04a33fd812f1ab38cf5554ee1ee3c0d982d31140c1313f97f]
[ INFO: ] Hash for kaylat/javacard/Class.cap [SHA-256: f788cc84d355e9a2cda8432c6af815aad6ed5574b5246641122158167850c6dc]
[ INFO: ] Hash for kaylat/javacard/RefLocation.cap [SHA-256: 16e7d9445917130b643bee62728b460c37511ce12b5c65c7653f9f75b8fa5df6]
[ INFO: ] Hash for kaylat/javacard/Import.cap [SHA-256: ce4ee9399ef89f122c68620d0330239a0f40a178992aae6c60fdf02caa492817]
[ INFO: ] 0 warnings and 0 errors.此命令在消息中失败:
Missing hash for required component: header.cap发布于 2018-02-27 22:51:47
与其将verifycap.bat的输出重定向到文件("> kaylat.hash"),不如使用程序选项"-outfile ",它将以正确的格式将摘要值写入文件。然后使用这个文件输入到scriptgen.bat。如果我使用程序的控制台输出作为scriptgen.bat的输入,我会得到相同的错误。如果我使用-outfile选项,所有操作都很好。
C:\verifycap.bat
[ INFO: ] Usage: verifycap [options] <export files> <CAP file>
(or)
verifycap <-C | --commandoptionsfile> <command options file>
Where options include:
-digest <alg-name> specify the digest to use (default: SHA-256)
-help Print this message and exit.
-nobanner Suppress banner message.
-nowarn Suppress warning messages.
-outfile <file-name> Specify the name of the output file to store digest (default: no output file created)
-package <pkg> Set the name of the package to be verified
-verbose Turn on verbose mode.
-version Print version number and exit.https://stackoverflow.com/questions/47841236
复制相似问题