-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Length of Install Parameters field is not coded correctly for install_for_install #92
Comments
Only a single byte is used which is good enough for 128 bytes. So far this was always sufficient. Do you have a card supporting more? Then I would need one to verify a patch for this. |
I have an applet which install Parameters field is more than 128 bytes (147 0x93). |
So, this means you have already patched the source code? Can you please share the code snippet? |
No, I built the apdu command install for install manually, then I used the command
//[line 3291] buf[i++] = 0x02; // install parameter field length
hiByte = 0x02; // tag C9 + length byte (C9LL)
if (installParametersLength > 0) {
hiByte += (BYTE)installParametersLength;
}
if (uiccSystemSpecParamsLength > 0) {
hiByte += 2;
hiByte += (BYTE)uiccSystemSpecParamsLength;
}
But I have not tested |
I have pushed a fix to the branch https://github.com/kaoh/globalplatform/tree/install_params_size. Do you need a binary to test it or can you compile it on your own for testing it? |
I checked the fix, I noticed that it is the Application Specific Parameters (tag C9) which length has been coded as ber-tlv. The length which has to be corrected is the length of the parameters field (see table 11-43 in the first post). The table below show the content of the parameters field: |
Next try. Pushed an update. |
The length of the parameters field is not coded as ber-len in the command
install_for_install
Ref 11.5.2.3.2 Data Field for INSTALL [for install]
GlobalPlatform Technology
Card Specification
Version 2.3.1
The text was updated successfully, but these errors were encountered: