CryptSetProvParam (Silent sign-in)

From: Emanuele DelBono (emanuele_at_REMOVETHISSTRINGbba-italy.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 11:31:33 +0200

I try to do a silent sign with a Smart Card with the following code:

unsigned char pin[] = "adbdcefg";
HCRYPTPROV hProv;
BOOL c = CryptAcquireContext( &hProv, NULL,
MS_STRONG_PROV,PROV_RSA_FULL,CRYPT_VERIFYCONTEXT );
if (c)
{
    // This return always false:
    BOOL b = CryptSetProvParam( hProv, PP_SIGNATURE_PIN, (LPBYTE)pin, 0 );
    // The error is:
    int error = GetLastError(); // 8009000A - Invalide Type Specified
}

Why the CryptSetProvParam return always false??
Thanks a lot.

Bye
Emanuele