|
|
|
date: Tue, 10 Jun 2008 00:21:07 -0700 (PDT),
group: microsoft.public.platformsdk.security
back
RE: CryptSetProvParam error
Hi,
The error NTE_FAIL is a very vague error code that means in general that the
CSP has encountered an internal error. Since CryptSetProvParam with
PP_KEYEXCHANGE_PIN is supposed to send an APDU command to the card, the error
can come from the fact that APDU processing went wrong. You can trace the
APDU exchanged between the CSP and the card using my free tool ScardSpy and
see then if an error occurs. You can find it here:
http://www.idrix.fr/Root/content/category/7/25/48/.
So, the error you are encountering is not linked to how you are calling the
CSP but it's due to the internal processing of the CSP and how it interacts
with the smart card. If you are can't find any clues yourself, you'll have to
contact your smart card vendor to get some help on how to diagnose your
problem.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr
to reach : mounir_idrix_fr (replace the underscores with the at and dot
characters respectively)
"Janma" wrote:
> hi all, i am opening an handle to my smart card csp using
> CryptAcquireContext and then trying to set the CSP pin using
> CryptSetProvParam. But CryptSetProvParam return an NTE_FAIL error.
>
> CryptAcquireContext(&hProv, NULL, "My CSP Name", PROV_RSA_FULL, 0));
> CryptSetProvParam(hProv,PP_KEYEXCHANGE_PIN,(LPBYTE)"softex",0));
>
> can anyone tell me what am i doing wrong?? I tried using the
> CRYPT_VERIFYCONTEXT and the CRYPT_SILENT flag also with
> CryptAcquireContext but still the same error come up.
>
> thanks in advance
>
date: Tue, 10 Jun 2008 03:47:00 -0700
author: Mounir IDRASSI am
RE: CryptSetProvParam error
The error may also reflect the card's security: the card's CSP may not allow
to set the PIN programmatically but only via its own prompt or even on the
reader's keypad. (This could prevent a rogue program signing "behind the
user's back" - at least in simple cases.)
Laszlo Elteto
SafeNet, Inc.
"Mounir IDRASSI" wrote:
> Hi,
>
> The error NTE_FAIL is a very vague error code that means in general that the
> CSP has encountered an internal error. Since CryptSetProvParam with
> PP_KEYEXCHANGE_PIN is supposed to send an APDU command to the card, the error
> can come from the fact that APDU processing went wrong. You can trace the
> APDU exchanged between the CSP and the card using my free tool ScardSpy and
> see then if an error occurs. You can find it here:
> http://www.idrix.fr/Root/content/category/7/25/48/.
> So, the error you are encountering is not linked to how you are calling the
> CSP but it's due to the internal processing of the CSP and how it interacts
> with the smart card. If you are can't find any clues yourself, you'll have to
> contact your smart card vendor to get some help on how to diagnose your
> problem.
>
> Cheers,
> --
> Mounir IDRASSI
> IDRIX
> http://www.idrix.fr
>
> to reach : mounir_idrix_fr (replace the underscores with the at and dot
> characters respectively)
>
>
> "Janma" wrote:
>
> > hi all, i am opening an handle to my smart card csp using
> > CryptAcquireContext and then trying to set the CSP pin using
> > CryptSetProvParam. But CryptSetProvParam return an NTE_FAIL error.
> >
> > CryptAcquireContext(&hProv, NULL, "My CSP Name", PROV_RSA_FULL, 0));
> > CryptSetProvParam(hProv,PP_KEYEXCHANGE_PIN,(LPBYTE)"softex",0));
> >
> > can anyone tell me what am i doing wrong?? I tried using the
> > CRYPT_VERIFYCONTEXT and the CRYPT_SILENT flag also with
> > CryptAcquireContext but still the same error come up.
> >
> > thanks in advance
> >
date: Tue, 10 Jun 2008 08:39:00 -0700
author: lelteto
|
|