Re: CPSignHash error 80090008

From: iandoll (iandoll_at_yahoo.com)
Date: 12/20/04


Date: 20 Dec 2004 10:37:40 -0800

Laszlo,
thanks for fast response.

I have made changes as you suggested. So my CPAcquireContext function
calling CryptAcquireContext(...PROV_RSA_SCHANNEL..).
Also I changes type of MyCSP to 12 (PROV_RSA_SCHANNEL).

When I now start IE, everything working same as previous
(CPAcquireContext,
CPCreateHash, CPSetHashParam, CPSignHash, CPDestroyHash,
CPReleaseContext),
but CPSignHash generate 8009008 error.

This is how CPSignHash look like:

retVal = CryptSignHash(hHash, dwKeySpec, NULL, dwFlags, pbSignature,
pcbSigLen);
if (!retVal) { ERROR_MSGBOX("CPSignHash-ERROR");}
return retVal;

and CPAcquireContext is:
BOOL WINAPI CPAcquireContext(
OUT HCRYPTPROV *phProv,
IN LPCSTR szContainer,
IN DWORD dwFlags,
IN PVTableProvStruc pVTable)
{
BOOL retVal = FALSE;
DWORD dwLastError = 0;
char * szProviderName = NULL;

retVal = CryptAcquireContext(phProv, szContainer, szProviderName,
PROV_RSA_SCHANNEL, dwFlags);
if (!retVal) { ERROR_MSGBOX("CPAcquireContext-ERROR");}
return retVal;
}

Also I test my CSP with CSP Test suite, and work fine in 76% otherwise
is
error or warning.
Do you know what is cause of this error, or maybe where can I find
sample
(empty, just simple wrapper) custom CSP implementation.

Thanks,
Ian



Relevant Pages

  • RE: I get error ERROR_INVALID_PARAMETER testing my CSP with "cspte
    ... I've read the following page on MSDN which is titled "CSP Architectural ... CPAcquireContext( ... It's up to your code how you recognize your handle and get to your context blob>from it. ... your OWN context and return this to the CAPI ...
    (microsoft.public.platformsdk.security)
  • Re: CPSignHash error 80090008
    ... In youd DllMain (of your CSP code) do LoadLibrary of the Micrtosoft (or ... You MUST create your own context and save the context you got ... So my CPAcquireContext function ... > but CPSignHash generate 8009008 error. ...
    (microsoft.public.platformsdk.security)
  • Re: CPAcquireContext&VTableProvStruct architecture
    ... See the documentation for CPAcquireContext in MSDN. ... information for your CSP, to which you refer below, should be referenced by ... the phProv output parameter - note it is the responsibility of the CSP to ... Please do not send email directly to this alias. ...
    (microsoft.public.platformsdk.security)
  • _VTableProvStruc content
    ... I'm trying to write my own CSP. ... CPAcquireContext and especially _VTableProvStruc. ... written in this byte array? ...
    (microsoft.public.platformsdk.security)