You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application failed on C_SignInit() with CKR_USER_NOT_LOGGED_IN when I have multiple sessions opened.
I created two sessions with the sample token and log them in. I did a C_SignInit
Then I closed session 1 and tried to call C_SignInit on session 2. And I got error CKR_USER_NOT_LOGGED_IN.
Meanwhile, the C_SignInit() works if I close the session 1 before I start session 2.
The Application Log's here:
[DEBUG] [2023-09-14T05:22:47Z] [0000ffff953bd020] [pkcs11] - id=0xaaaad96b8390 session=72057594037927937: Session opened on slot 1
[DEBUG] [2023-09-14T05:22:48Z] [0000ffff953bd020] [pkcs11] - id=0xaaaad96b8390 session=72057594037927937: User logged in
// Session one did `C_SignInit` and `C_Sign`, not log here as it succeed...
// Opened the second session
[DEBUG] [2023-09-14T05:22:49Z] [0000ffff953bd020] [pkcs11] - id=0xaaaad96b8390 session=72057594037927938: Session opened on slot 1
// Session 2 login "failed" because session 1 already login to the same token. The application would ignore the error.
[DEBUG] [2023-09-14T05:22:49Z] [0000ffff953bd020] [pkcs11] - id=0xaaaad96b8390 session=72057594037927938: User was already logged in
// Note the session id, the application is trying to close session 1.
[DEBUG] [2023-09-14T05:22:49Z] [0000ffff90edf120] [pkcs11] - id=0xaaaad96b8390 session=72057594037927937: Session closed
[pkcs11] - id=0xaaaad96b8390 session=72057594037927938: C_SignInit() failed. PKCS#11 error: CKR_USER_NOT_LOGGED_IN (0x00000101).
My application failed on C_SignInit() with
CKR_USER_NOT_LOGGED_IN
when I have multiple sessions opened.I created two sessions with the sample token and log them in. I did a
C_SignInit
Then I closed session 1 and tried to call
C_SignInit
on session 2. And I got errorCKR_USER_NOT_LOGGED_IN
.Meanwhile, the C_SignInit() works if I close the session 1 before I start session 2.
The Application Log's here:
Looking into the library, it seems that
C_SignInit
failed atauth_min_ro_user
https://github.com/tpm2-software/tpm2-pkcs11/blob/1b3aab90ee5f7debbce82c7e229aa2950a9e8f0d/src/pkcs11.c#L265C21-L265C37.Would there be more context related?
Any information would help. Thanks in advance.
The text was updated successfully, but these errors were encountered: