public GetPinResult GetTokenPin(Pkcs11X509StoreInfo storeInfo, Pkcs11SlotInfo slotInfo, Pkcs11TokenInfo tokenInfo)
            {
                Console.Write("PIN: ");
                var pin = ReadPassword();

                return(new GetPinResult(false, Encoding.UTF8.GetBytes(pin)));
            }
Example #2
0
 public GetPinResult GetKeyPin(Pkcs11X509StoreInfo storeInfo, Pkcs11SlotInfo slotInfo, Pkcs11TokenInfo tokenInfo, Pkcs11X509CertificateInfo certificateInfo)
 {
     if (tokenInfo.Label == SoftHsm2Manager.Token1Label)
     {
         return(new GetPinResult(false, Encoding.UTF8.GetBytes(SoftHsm2Manager.Token1UserPin)));
     }
     else if (tokenInfo.Label == SoftHsm2Manager.Token2Label)
     {
         return(new GetPinResult(false, Encoding.UTF8.GetBytes(SoftHsm2Manager.Token2UserPin)));
     }
     else
     {
         return(new GetPinResult(true, null));
     }
 }
 public GetPinResult GetKeyPin(Pkcs11X509StoreInfo storeInfo, Pkcs11SlotInfo slotInfo, Pkcs11TokenInfo tokenInfo, Pkcs11X509CertificateInfo certificateInfo)
 {
     throw new NotImplementedException();
 }