简体   繁体   中英

What is the reaction of JCRE to uploading an applet with promiscuous AID?

As we know the AID of applets mus have a length between 5 and 16 bytes. And in case of applet that they have a promiscuous length (greater than 16 byte or less than 5 bytes), the Converter doesn't works. But this is the Off-Card verifier.

I want to see what is the reaction of the JCRE to a non-standard .cap file. In the other word, I want to change the contents of a .cap file using a hex editor tool in order to changing the AID.

As you see AIDs are saved in the .cap files headers. But where is the header? Not only I can't find the AID in the contents of a .cap file, but also, two converted file of a single .java file with an equal AID, are different!

I mean if you convert a .java file to .cap file twice, the result is different! even for equal AIDs! why?

Below, You see content of two .cap file of a single program with equal AIDs :

在此处输入图片说明

在此处输入图片说明

I'll provide two answers, as you've asked two questions. Please try and ask one question per question.


The .cap file is different because the single .cap file is little more than a .zip archive. You can simply change the file extension to .zip to see the contents.

A .zip can contain entries in any order and it should also contain dates etc. So even if the contents of the files within the archive are completely identical, the .zip file is still likely to be different. In the .zip there should be a Header.cap .

Usually the .zip is not compressed, so you may still see contents of the .cap files within it.


And yes, I would expect the runtime to reject AID's with an invalid length. Note that the instance AID used for Applet selection may be different from the Applet AID . The instance AID may be given during the INSTALL for INSTALL command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM