This content has been marked as final. Show 5 replies
when you use Shareable Interface, you only can share Object Shareable (implement Shareable Interface) or primitive type. So, you cannot share primitive array because Firewall will deny this access.
I had the same problem
Have a try with the apdu buffer - not guaranteed, but the apdu buffer is a "global" object, so it does not behave the same as transient buffers.
when you use Shareable Interface, you only can share Object Shareable (implement Shareable Interface) or primitive type. So, you cannot share primitive array because Firewall will deny this access.That is not correct. You can pass data through a global object as well. As mentioned by Sebastien, the APDU buffer is a global object.
To send data to the server applet: call with apdu buffer passing the offset and length of the data to send.
To receive data from the server applet: call with apdu buffer passing the offset to copy into and return the length of the data copied into the buffer.
server.setData(apduBuffer, dataOffset, dataLength);
short len = server.getData(apduBuffer, dataOffset);
When I select my client applet, I receive a status word 6F00 when I want to exchange byte arrayAlso, the 6F00 status word is from an unhandled exception. From memory, you will be getting a SecurityException so you could handle the exception and return a meaningful exception (or debug the issue).
If you see this status word, it means you need to find out where the unhandled exception is coming from and then the documentation and specs can help determine why you are getting an error in your code.
you are right. in case of global array, Firewall will be allow sharing.
i implemented Firewall in my OS, so that reason "status word 6F00" comes from access denied.
@920269, you maybe use the safamer's example.