SE051: Resuming SE (ECKey) session after GP_Select

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SE051: Resuming SE (ECKey) session after GP_Select

269 Views
stefanct
Contributor III

Hi,

I'm working on an application that is supposed to retrieve the OEF ID before interacting with the SEMS Lite and IoT applets.

I am using T1oI2C, SCP is mandatory and the communication with the IoT applet is using an ECKey session. That part works just fine, i.e. I can open up a platform session with SCP03 and use another session on top for ECKey and interact with the IoT applet. The problem is that these sessions get invalidated once I am issuing GP_Select calls as expected/documented (i.e., the session is closed implicitly when selecting another applet) to retrieve the OEF ID. The se05x_GetInfo demo elegantly works around this issue by simply ignoring it

I am wondering if there is a better way to re-establish a session than tearing it down completely including all allocations etc. and basically starting all over. I have tried a few things but ran into various issues, for example, re-creating the ECKey session via sss_session_open/sss_session_auth_open/se05x_CreateECKeySession/nxECKey_ReadEckaPublicKey/nxECKey_StoreAttestationPublicKey/sss_openssl_key_object_allocate_handle eventually fails because it tries to add the ec pubkey to the openssl keystore again with the same ID as before and ks_common_update_fat bails out because of the collission.

So basically my main question is: What is the best way to switch between the various applets? Additionally, I'd be interested if there is a way to retrieve the OEF ID by some other means than GP_Select + GP INS 'CA' GET DATA(IDENTIFY) maybe directly from the IoT applet?

KR

Labels (1)
0 Kudos
2 Replies

258 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @stefanct ,

 

Actually  a GP select would interrupt the potential open sessions from other client as the IoT applet gets deselected. Maybe you have to close all the sessions before issuing this command to SE.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

255 Views
stefanct
Contributor III

Yes, of course, but that's quite slow because opening the session again takes a while. I was wondering if there is a way to preserve a session while communication with another applet.

0 Kudos