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.

202 lines
5.0 KiB

  1. //--------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation, 1996 - 1997
  3. //
  4. // File: cepsetup.h
  5. //
  6. // Contents: The private include file for cepsetup.exe.
  7. //
  8. // History: August-12-1999 xiaohs Created
  9. //
  10. //--------------------------------------------------------------
  11. #ifndef CEPSETUP_H
  12. #define CEPSETUP_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. //-----------------------------------------------------------------------
  17. //
  18. // Constants
  19. //
  20. //-----------------------------------------------------------------------
  21. #define MAX_STRING_SIZE 512
  22. #define CEP_PROP_SHEET 7
  23. #define MAX_TITLE_LENGTH 128
  24. #define RA_INFO_COUNT 7
  25. #define CEP_KEY_LENGTH_STRING 15
  26. #define SCEP_APPLICATION_POOL L"SCEP"
  27. #define IIS_WPG L"IIS_WPG"
  28. #define SCEP_SERVICE_WAIT_PERIOD 120 //by default we wait for 120 seconds
  29. //-----------------------------------------------------------------------
  30. //
  31. // CEP_PAGE_INFO
  32. //
  33. //------------------------------------------------------------------------
  34. typedef struct _CEP_PAGE_INFO
  35. {
  36. LPCWSTR pszTemplate;
  37. DLGPROC pfnDlgProc;
  38. }CEP_PAGE_INFO;
  39. typedef struct _CEP_ENROLL_INFO
  40. {
  41. LPWSTR pwszPreFix;
  42. DWORD dwIDC;
  43. }CEP_ENROLL_INFO;
  44. typedef struct _CEP_CSP_INFO
  45. {
  46. LPWSTR pwszCSPName;
  47. DWORD dwCSPType;
  48. BOOL fSignature;
  49. BOOL fEncryption;
  50. DWORD dwMaxSign; //Max key length of signature
  51. DWORD dwMinSign; //Min key length of signature
  52. DWORD dwDefaultSign; //default key length of signature
  53. DWORD dwMaxEncrypt;
  54. DWORD dwMinEncrypt;
  55. DWORD dwDefaultEncrypt;
  56. DWORD *pdwSignList; //the table of possible signing key length
  57. DWORD dwSignCount; //the count of entries in the table
  58. DWORD *pdwEncryptList;
  59. DWORD dwEncryptCount;
  60. }CEP_CSP_INFO;
  61. typedef struct _CEP_WIZARD_INFO
  62. {
  63. HFONT hBigBold;
  64. HFONT hBold;
  65. BOOL fEnrollAdv;
  66. BOOL fPassword;
  67. LPWSTR rgpwszName[RA_INFO_COUNT];
  68. CEP_CSP_INFO *rgCSPInfo;
  69. DWORD dwCSPCount;
  70. DWORD dwSignProvIndex;
  71. DWORD dwSignKeyLength;
  72. DWORD dwEncryptProvIndex;
  73. DWORD dwEncryptKeyLength;
  74. BOOL fEnterpriseCA;
  75. BOOL fDC;
  76. LPWSTR pwszUserName;
  77. LPWSTR pwszPassword;
  78. HANDLE hAccountToken;
  79. IDsObjectPicker *pIDsObjectPicker;
  80. BOOL fDomain;
  81. DWORD dwServiceWait;
  82. BOOL fLocalSystem;
  83. }CEP_WIZARD_INFO;
  84. //-----------------------------------------------------------------------
  85. //
  86. // Function Prototypes
  87. //
  88. //-----------------------------------------------------------------------
  89. BOOL WINAPI IsValidInstallation(UINT *pidsMsg);
  90. int WINAPI CEPMessageBox(
  91. HWND hWnd,
  92. UINT idsText,
  93. UINT uType);
  94. int WINAPI CEPErrorMessageBox(
  95. HWND hWnd,
  96. UINT idsReason,
  97. HRESULT hr,
  98. UINT uType
  99. );
  100. int WINAPI CEPErrorMessageBoxEx(
  101. HWND hWnd,
  102. UINT idsReason,
  103. HRESULT hr,
  104. UINT uType,
  105. UINT idsFormat1,
  106. UINT idsFormat2
  107. );
  108. BOOL WINAPI FormatMessageUnicode(LPWSTR *ppwszFormat,UINT ids,...);
  109. BOOL WINAPI CEPWizardInit();
  110. void WINAPI FreeCEPWizardInfo(CEP_WIZARD_INFO *pCEPWizardInfo);
  111. void WINAPI SetControlFont(
  112. IN HFONT hFont,
  113. IN HWND hwnd,
  114. IN INT nId
  115. );
  116. BOOL WINAPI SetupFonts(
  117. IN HINSTANCE hInstance,
  118. IN HWND hwnd,
  119. IN HFONT *pBigBoldFont,
  120. IN HFONT *pBoldFont
  121. );
  122. void WINAPI DestroyFonts(
  123. IN HFONT hBigBoldFont,
  124. IN HFONT hBoldFont
  125. );
  126. BOOL WINAPI RemoveRACertificates();
  127. void WINAPI DisplayConfirmation(HWND hwndControl,
  128. CEP_WIZARD_INFO *pCEPWizardInfo);
  129. BOOL WINAPI UpdateCEPRegistry(BOOL fPassword, BOOL fEnterpriseCA);
  130. BOOL WINAPI EmptyCEPStore();
  131. BOOL WINAPI CEPGetCSPInformation(CEP_WIZARD_INFO *pCEPWizardInfo);
  132. BOOL WINAPI GetSelectedKeyLength(HWND hwndDlg,
  133. int idControl,
  134. DWORD *pdwKeyLength);
  135. BOOL WINAPI GetSelectedCSP(HWND hwndDlg,
  136. int idControl,
  137. DWORD *pdwCSPIndex);
  138. BOOL WINAPI RefreshKeyLengthCombo(HWND hwndDlg,
  139. int idsList,
  140. int idsCombo,
  141. BOOL fSign,
  142. CEP_WIZARD_INFO *pCEPWizardInfo);
  143. BOOL WINAPI InitCSPList(HWND hwndDlg,
  144. int idControl,
  145. BOOL fSign,
  146. CEP_WIZARD_INFO *pCEPWizardInfo);
  147. BOOL WINAPI I_DoSetupWork(HWND hWnd, CEP_WIZARD_INFO *pCEPWizardInfo);
  148. HRESULT WINAPI AddLogSourceToRegistry(LPWSTR pwszMsgDLL);
  149. LPWSTR GetAccountDomainName(BOOL fDC);
  150. BOOL CEPGetAccountNameFromPicker(HWND hwndParent,
  151. IDsObjectPicker *pDsObjectPicker,
  152. LPWSTR *ppwszSelectedUserSAM);
  153. #ifdef __cplusplus
  154. } // Balance extern "C" above
  155. #endif
  156. #endif //CEPSETUP_H