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.

87 lines
2.5 KiB

  1. // File: certui.h
  2. TCHAR * FormatCert ( PBYTE pbEncodedCert, DWORD cbEncodedCert );
  3. //
  4. // Brings up a certificate picker dialog and returns the encoded
  5. // certificate chosen in a buffer. Buffer must be freed via
  6. // FreeT120EncodedCert.
  7. //
  8. BOOL ChangeCertDlg ( HWND hwndParent, HINSTANCE hInstance,
  9. PBYTE * ppEncodedCert, DWORD * pcbEncodedCert );
  10. //
  11. // Brings up system-dependent certificate details UI on the
  12. // certificate specified by the context passed in.
  13. //
  14. VOID ViewCertDlg ( HWND hwndParent, PCCERT_CONTEXT pCert );
  15. //
  16. // Gets the currently active certificate from the transport and
  17. // returns it in the buffer. Buffer must be freed via FreeT120EncodedCert.
  18. //
  19. BOOL GetT120ActiveCert( PBYTE * ppEncodedCert, DWORD * pcbEncodedCert );
  20. //
  21. // This function returns the user's default certificate as identified
  22. // in the registry (or the first available if nothing is specified in
  23. // the registry. The buffer returned must be freed via FreeT120EncodedCert.
  24. BOOL GetDefaultSystemCert ( PBYTE * ppEncodedCert, DWORD * pcbEncodedCert );
  25. //
  26. // Sets the active certificate (NOT self issued) in the transprot using
  27. // the supplied buffer as a template. If the cert passed in can't be
  28. // found in the certificate store, then this function fails.
  29. //
  30. BOOL SetT120ActiveCert( BOOL fSelfIssued,
  31. PBYTE pEncodedCert, DWORD cbEncodedCert );
  32. //
  33. // Reads the registry for the user's initialization settings ( self-issued
  34. // cert or system cert, and which system cert? ) and makes the corresponding
  35. // certificate active in the transport. This function is called when the
  36. // UI is initializing and if user startup settings need to be restored.
  37. //
  38. BOOL InitT120SecurityFromRegistry(VOID);
  39. //
  40. // Frees the passed in buffer.
  41. //
  42. VOID FreeT120EncodedCert( PBYTE pbEncodedCert );
  43. //
  44. // This function updates the registry (used for initialization) by
  45. // saving the serial number of the supplied certificate to the registry.
  46. // The passed in cert must be in the system store, not self-issued.
  47. //
  48. BOOL SetT120CertInRegistry ( PBYTE pbEncodedCert, DWORD cbEncodedCert );
  49. //
  50. // This function makes the self-issued certificate in the application
  51. // specific store active in the transport.
  52. //
  53. BOOL RefreshSelfIssuedCert (VOID);
  54. //
  55. // Utility function, returns number of certificates in system store
  56. //
  57. DWORD NumUserCerts(VOID);
  58. //
  59. // Takes pointer to CERT_INFO structure and sets cert in transport
  60. //
  61. HRESULT SetCertFromCertInfo ( PCERT_INFO pCertInfo );