-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Large STORE DATA impossible to send #94
Comments
It may also come from this part: globalplatform/gpshell/src/gpshell.c Line 991 in 4f26a8e
The parsed buffer "buf" is limited in size. |
Hi Antonio, you are using the |
No. I'm using direct perso store_data. More precisely, after selecting the applet (not SD), and opening a secure channel with it: I didn't want to spend time to compile, I can give a quick try bc I have the VC tools and cmake already. |
I modified to |
Great! I have pushed an update to main and the next release will contain the enhancement. |
Since a line is limited to 1024, and data is hex encoded, it is not possible to send data larger than ~490 bytes. The buffer size is defined at compile time, and hardcoded.
One of our own applet uses direct personalization and STORE DATA to setup a x509 certificate, which is around 600 bytes large. This is not possible to use a store_data command line to upload it using this software. This is sad, as this software correctly -and automatically- performs the commands chaining to send multiple data blocks. Also, the data buffer is set to 4096 bytes. But this is limited by this hard limit of 1024 bytes per command line.
We are using the standard input to send command lines to the binary exe. The issue is that it cuts the lines which are greater to 1024 bytes. What is after 1024 bytes, is seen as new line.
I think of several ways to solve this issue:
Technically, the main culprit seems to be here:
globalplatform/gpshell/src/gpshell.c
Line 276 in 4f26a8e
This is used in handleCommands, and also in handleOptions.
The text was updated successfully, but these errors were encountered: