RE: CryptoAPI: CSP compile problem
From: lelteto (lelteto_at_discussions.microsoft.com)
Date: 10/15/05
- Next message: Sam Hobbs: "Re: Crypto API and Windows 98 SE"
- Previous message: Michel Gallant: "Re: Add Private Keys in System Store MY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 15 Oct 2005 10:47:28 -0700
That error indicates that your CSP is not signed by Microsoft and as such
cannot be loaded. To TEST your CSP Microsoft requires to load a KERNEL
debugger on the test computer. (You don't actually have to use it - it just
have to be loaded.)
Another (not supported) way is to patch advapi32.dll. so this security check
is bypassed. You can search this forum for "advapi32" to instruction which
bytes have to be patched for various dll versions. (and how to replace the
dll - either from another system on multi-boot setup or from Recovery Console)
Laszlo Elteto
SafeNet, Inc.
"bender" wrote:
> nm, problem fixed.
>
> Now I just have to figure out why the CSPDK gives me a
>
> CryptAcquireContext
>
> INFO Returned: False
>
> INFO Error type: API failed unexpectedly
>
> INFO Known error: No
>
> INFO Actual error code: 0x8009001d (Provider DLL failed to initialize
> correctly. )
>
>
>
> "bender" wrote:
>
> > When trying to compile a CSP dll has anyone seen "error C2375: 'CPDeriveKey'
> > : redefinition; different linkage"
> >
> > i get this for all the CSP functions EXCEPT CPCreateHash and CPAquireContext.
> >
> > I havent found any circular links yet...
> >
> > My dll is including
> >
> > #include <windows.h>
> > #include <wincrypt.h>
> > #include <C:\cspdk\sdkinc\Cspdk.h>
> >
> >
> >
> > An example of one of my functions is
> >
> > DLL_EXPORT
> > BOOL WINAPI
> > CPAcquireContext(
> > HCRYPTPROV* phProv,
> > CHAR* pszContainer,
> > DWORD dwFlags,
> > PVTableProvStruc pVTable
> > )
> > {
> > return CryptAcquireContext( phProv, NULL, NULL, PROV_RSA_FULL, dwFlags );
> > }
> >
> >
> > (all functions just pass onto default CSP for now)
> >
> >
> >
> > Thanks for any help
- Next message: Sam Hobbs: "Re: Crypto API and Windows 98 SE"
- Previous message: Michel Gallant: "Re: Add Private Keys in System Store MY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|