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.

94 lines
2.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1992 - 1999
  5. //
  6. // File: acui.h
  7. //
  8. // Contents: Authenticode User Interface Provider Definitions
  9. //
  10. // This is an internal provider interface used by the
  11. // Authenticode Policy Provider to allow user interaction
  12. // in determining trust. This will allow us to replace the
  13. // UI (including possibly having no UI) and not affect the
  14. // core Authenticode policy provider.
  15. //
  16. // History: 08-May-97 kirtd Created
  17. //
  18. //----------------------------------------------------------------------------
  19. #if !defined(__ACUI_H__)
  20. #define __ACUI_H__
  21. #include <windows.h>
  22. #include <wintrust.h>
  23. #include <softpub.h>
  24. #if defined(__cplusplus)
  25. extern "C" {
  26. #endif
  27. //
  28. // ACUI_INVOKE_INFO
  29. //
  30. // This structure gives enough information for the provider to invoke the
  31. // appropriate UI. It includes the following data
  32. //
  33. // Window Handle for display
  34. //
  35. // Generic Policy Info (see gentrust.h, note it includes the cert. chain)
  36. //
  37. // SPC SP Opus Information (see authcode.h)
  38. //
  39. // Alternate display name of the subject in case the Opus does not have it
  40. //
  41. // Invoke Reason Code
  42. // hr == S_OK, the subject is trusted does the user want to override
  43. // hr != S_OK, the subject is not trusted does the user want to override
  44. //
  45. // Personal Trust database interface
  46. //
  47. typedef struct _ACUI_INVOKE_INFO {
  48. DWORD cbSize;
  49. HWND hDisplay;
  50. CRYPT_PROVIDER_DATA *pProvData;
  51. PSPC_SP_OPUS_INFO pOpusInfo;
  52. LPCWSTR pwcsAltDisplayName;
  53. HRESULT hrInvokeReason;
  54. IUnknown* pPersonalTrustDB;
  55. } ACUI_INVOKE_INFO, *PACUI_INVOKE_INFO;
  56. //
  57. // ACUIProviderInvokeUI
  58. //
  59. // This is the entry point used by authenticode to invoke the provider UI. The
  60. // input is an ACUI_INVOKE_INFO pointer and the return code is an HRESULT which
  61. // is interpreted as follows
  62. //
  63. // hr == S_OK, the subject is trusted
  64. // hr == TRUST_E_SUBJECT_NOT_TRUSTED, the subject is NOT trusted
  65. // Otherwise, some other error has occurred, authenticode is free to do
  66. // what it wants.
  67. //
  68. typedef HRESULT (WINAPI *pfnACUIProviderInvokeUI) (
  69. PACUI_INVOKE_INFO pInvokeInfo
  70. );
  71. HRESULT WINAPI ACUIProviderInvokeUI (PACUI_INVOKE_INFO pInvokeInfo);
  72. //
  73. // NOTENOTE: It is still TBD how UI providers will be registered and loaded
  74. // by Authenticode. For now, it will always load a hardcoded
  75. // default provider and look for the ACUIProviderInvokeUI entry
  76. // point.
  77. //
  78. #if defined(__cplusplus)
  79. }
  80. #endif
  81. #endif