[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: how to solve handle in csp?
From:       lelteto <lelteto () RAINBOW ! COM>
Date:       2002-03-19 16:10:30
[Download RAW message or body]


1. The overall structure is:
        application -> CryptoAPI -> CSP
2. Objects are maintained by the CSP. When an object handle is created by
the CSP (which is a reference to an object) it is returned to the CryptoAPI
layer. However, this layer has to know (at later calls) which provider this
handle belongs to, so it creates its own handle which references to a struct
(in CryptAPI). That struct will have a handle (pointer?) to the CSP as well
as will have the handle from the CSP. The handle to this CryptoAPI struct is
returned to the application.
3. Next time the aplication makes a call with this handle the CryptoAPI
finds its struct and gets the CSP's handle as well as finds out which CSP to
call - then it makes the call.
This is true for all three types of handles you listed.

Laszlo Elteto
Fellow Scientist
Rainbow Technologies, Inc.

-----Original Message-----
From: Hua Yu.Li [mailto:smartlhy2000@YAHOO.COM.CN]
Sent: Monday, March 18, 2002 8:37 PM
To: CryptoAPI@DISCUSS.MICROSOFT.COM
Subject: how to solve handle in csp?


i found that 3 handles are defined in csp.
  typedef unsigned long HCRYPTPROV
  typedef unsigned long HCRYPTHASH
  typedef unsigned long HCRYPTKEY
my question is how to connect these handles to the object, such as hash,
key, provider. wheather they are connected by crytoAPI and may not
implement by csp?
in a word, could someone tell me the relation between the handles and the
objects.

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM

----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic