Re: How a custom CSP call MS default (base)CSP?

From: Doug Barlow (soft_pedal_at_hotmail.com)
Date: 01/25/05


Date: Tue, 25 Jan 2005 08:32:09 -0800

You can also just call the standard CryptoAPI routines from your CSP. Doing
that will automatically validate the signature of the Microsoft CSP during
the call to CryptAcquireContext. The rest of the Microsoft Crypt... calls
just call that DLL's corresponding CP... function, as Laszlo described.
(Make sure you explicitly name the Microsoft CSPs in the call to
CryptAcquireContext, as opposed to taking the default CSP for the type, just
to be safe.)

I've used both techniques without problems.

Doug Barlow
The Soft Pedal Shop
CSP Design & Development Consulting
http://www.SoftPedal.net

-- 
"Phoebe" <Phoebe@discussions.microsoft.com> wrote in message 
news:5F4C5A97-4078-4497-A610-52008B204054@microsoft.com...
>I am writing my own CSP. Most of the functionality will be the same as MS
> base CSP. How do I call MS base CSP in my own CSP? for example, I got a
> csp.dll. In this csp.dll, how do I call the functions in the rsabase.dll.
>
> Thank you 


Relevant Pages

  • Re: using parts of the ?Microsoft Base CSP? in your self written CSP?
    ... software based Microsoft CSP. ... (Can you simply load a foreign CSP in your own CSP?) ... > (Can you simply load a foreign CSP in your own CSP?) ...
    (microsoft.public.platformsdk.security)
  • SHA-256 and SHA-384 support
    ... Is there any CSP that supports SHA-256 and SHA-384? ... I see the value for the alg is defined in the SDK .h, ... Microsoft CSP supports them at the moment, ...
    (microsoft.public.platformsdk.security)
  • RE: I get error ERROR_INVALID_PARAMETER testing my CSP with "cspte
    ... In CryptAcquireContext implementation, there is a line as following: ... So, pProv gets a handle to CSP(thus, "g_hmodule" global parameter in CSP ... the context THEN still try to use it?) ... I think there should be something wrong between CAPI and CryptoSPI ...
    (microsoft.public.platformsdk.security)
  • Re: How can I use the CPAcquireContext function ?
    ... "An unhandled exception of type 'System.AccessViolationException' occurred ... The CPAquireContext function is a prototype function for vendors ... by the operating system when your application calls the CryptAcquireContext ... CSP Design & Development Consulting ...
    (microsoft.public.platformsdk.security)
  • Wrapper CSP
    ... But when I run the SDK sample test program and point to my CSP ... that back to the client and hold on to the MS CSP context. ... within my CPxxx or call CPxxx (of Base CSP) from my CPxxx. ...
    (microsoft.public.platformsdk.security)