Source code of Windows XP (NT5)
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.

77 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. certupgr.hxx
  5. Abstract:
  6. Declarations for functions used to upgrade K2 server certs to Avalanche server certs
  7. Author:
  8. Alex Mallet (amallet) 02-Dec-1997
  9. Boyd Multerer (boydm) 20-Jan-1998
  10. --*/
  11. #ifndef _CERTUPGR_H_
  12. #define _CERTUPGR_H_
  13. #define CERT_DER_PREFIX 17
  14. #define CERTWIZ_REQUEST_PROP_ID (CERT_FIRST_USER_PROP_ID + 0x1001)
  15. #ifdef UNICODE
  16. #define ImportKRBackupToCAPIStore ImportKRBackupToCAPIStore_W
  17. #define CopyKRCertToCAPIStore CopyKRCertToCAPIStore_W
  18. #else
  19. #define ImportKRBackupToCAPIStore ImportKRBackupToCAPIStore_A
  20. #define CopyKRCertToCAPIStore CopyKRCertToCAPIStore_A
  21. #endif
  22. // NOTE: In both the below routines the password must always be ANSI.
  23. // NOTE: The PCCERT_CONTEXT that is returned from the below routines MUST be freed
  24. // via the CAPI call CertFreeCertificateContext(). Otherwise you will be leaking.
  25. //----------------------------------------------------------------
  26. // given a path to an old keyring style backup file, this reads in the public and private
  27. // key information and, using the passed-in password, imports it into the specified
  28. // CAPI store.
  29. PCCERT_CONTEXT ImportKRBackupToCAPIStore_A(
  30. PCHAR ptszFileName, // path of the file
  31. PCHAR pszPassword, // ANSI password
  32. PCHAR pszCAPIStore ); // name of the capi store
  33. PCCERT_CONTEXT ImportKRBackupToCAPIStore_W(
  34. PWCHAR ptszFileName, // path of the file
  35. PCHAR pszPassword, // ANSI password
  36. PWCHAR pszCAPIStore ); // name of the capi store
  37. //----------------------------------------------------------------
  38. // given a path to an old keyring style backup file, this reads in the public and private
  39. // key information and, using the passed-in password, imports it into the specified
  40. // CAPI store.
  41. // ptszFilePath: Pointer to the path of the file to be imported
  42. // pszPassword: Pointer to the password. MUST BE ANSI
  43. // ptszPassword: Pointer to the CAPI store name.
  44. PCCERT_CONTEXT CopyKRCertToCAPIStore_A(
  45. PVOID pbPrivateKey, DWORD cbPrivateKey, // private key info
  46. PVOID pbPublicKey, DWORD cbPublicKey, // public key info
  47. PVOID pbPKCS10req, DWORD cbPKCS10req, // the pkcs10 request
  48. PCHAR pszPassword, // ANSI password
  49. PCHAR pszCAPIStore ); // name of the capi store
  50. PCCERT_CONTEXT CopyKRCertToCAPIStore_W(
  51. PVOID pbPrivateKey, DWORD cbPrivateKey, // private key info
  52. PVOID pbPublicKey, DWORD cbPublicKey, // public key info
  53. PVOID pbPKCS10req, DWORD cbPKCS10req, // the pkcs10 request
  54. PCHAR pszPassword, // ANSI password
  55. PWCHAR pszCAPIStore ); // name of the capi store
  56. #endif // _CERTUPGR_HXX_