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
let{ soPin, newPin }=req.body/** * @desc — USING FIRST SLOT * */mode=modvarslot=mode.getSlots(0)/** * * @desc — PREPARE SESSION TO OPEN && ADD PERMISSION RW_SESSION */if(slot.flags&graphene.SlotFlag.TOKEN_PRESENT){session=slot.open(graphene.SessionFlag.RW_SESSION|graphene.SessionFlag.SERIAL_SESSION,)console.log(' err ........................')}/** * * @desc — OPEN SESSION WITH TOKEN USING PIN AND USER TYPE `USER` */console.log(' type of ...........',typeofsoPin)console.log(' type of ...........',typeofnewPin)session.login(soPin,graphene.UserType.SO)session.setPin(soPin,newPin)// session.getObject()console.log(' session.getObject() ..........',session.getObject())// session.logout()session.close()mode.finalize()returnres.status(200).json({message: 'pin is changed ...'})
The text was updated successfully, but these errors were encountered:
C_SetPIN: Modifies the PIN of the user who is logged in
I tried your code using SoftHSM library. Instead of graphene.UserType.SO you need to use graphene.UserType.USER, cause you need to change the user password.
@microshine , No I don't need to change my token pin , I already did it ,
But Now I need to make unblock to my token .. because my token is blocked when I tried to insert incorrect pin for 8 times , and now I have (So pin) for my token ??
Unblock is not possible via standard P11 interfaces. Each token implements its own scheme usually and is more smartcard than HSM concept so P11 never got APIs for it. It is possible to do by shoving APDUs into the card if you know the scheme used by the card.
The text was updated successfully, but these errors were encountered: