Search code examples
smartcardcryptoapicng

What is an analog CryptSetProvParam(PP_SIGNATURE_PIN) analog in CryptoAPI NG?


I'm writing an application for smartcards. I know how my application can obtain the PIN using a method CryptSetProvParam, but I don't know how to do the same thing when I'm using CryptoAPI NG. I want to prevent the PIN request UI window pop up.


Solution

  • Setting CspParameters.KeyPassword is equivalent to calling CryptSetProvParam with PP_KEYEXCHANGE_PIN (or PP_SIGNATURE_PIN). This flag is not supported by the default Microsoft crypto-service-provider (it is intended for use with smartcard-based CSPs).