Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.6 KiB

  1. #ifndef __LNKLIST_H__
  2. #define __LNKLIST_H__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include "pstypes.h"
  7. #include "listbase.h"
  8. #include <sha.h>
  9. //////////////////////////////
  10. // CryptProv list
  11. // item list element
  12. typedef struct _CRYPTPROV_LIST_ITEM
  13. {
  14. // internal to list
  15. struct _CRYPTPROV_LIST_ITEM * pNext;
  16. // Lookup device
  17. // DWORD dwProvID;
  18. DWORD dwAlgId1;
  19. DWORD dwKeySize1;
  20. DWORD dwAlgId2;
  21. DWORD dwKeySize2;
  22. // item data
  23. HCRYPTPROV hProv;
  24. } CRYPTPROV_LIST_ITEM, *PCRYPTPROV_LIST_ITEM;
  25. class CCryptProvList : public CLinkedList
  26. {
  27. public:
  28. CCryptProvList();
  29. BOOL AddToList(PCRYPTPROV_LIST_ITEM pli)
  30. { return CLinkedList::AddToList((ELT*)pli); }
  31. BOOL DelFromList(PCRYPTPROV_LIST_ITEM pli)
  32. { return CLinkedList::DelFromList((ELT*)pli); }
  33. PCRYPTPROV_LIST_ITEM SearchList(PCRYPTPROV_LIST_ITEM pli)
  34. { return (PCRYPTPROV_LIST_ITEM) CLinkedList::SearchList((ELT*)pli); }
  35. };
  36. ///////////////////////////
  37. // Associated functions
  38. void CreateCryptProvListItem(CRYPTPROV_LIST_ITEM* pli,
  39. DWORD dwAlgId1,
  40. DWORD dwKeySize1,
  41. DWORD dwAlgId2,
  42. DWORD dwKeySize2,
  43. HCRYPTPROV hCryptProv);
  44. BOOL CryptProvIsMatch(
  45. ELT* pCandidate,
  46. ELT* pTemplate);
  47. void CryptProvFreeElt(
  48. ELT* p);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif // __LNKLIST_H__