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.

200 lines
4.4 KiB

  1. //
  2. // data associated with raw transport connections
  3. //
  4. typedef struct _UL_RAW_CONNECTION_INFO
  5. {
  6. //
  7. // connection id
  8. //
  9. UL_HTTP_CONNECTION_ID ConnectionId;
  10. //
  11. // address info
  12. //
  13. USHORT RemoteAddressLength; // sizeof(UL_NETWORK_ADDRESS_xxx)
  14. USHORT RemoteAddressType; // UL_NETWORK_ADDRESS_TYPE_xxx
  15. USHORT LocalAddressLength; // sizeof(UL_NETWORK_ADDRESS_xxx)
  16. USHORT LocalAddressType; // UL_NETWORK_ADDRESS_TYPE_xxx
  17. PVOID pRemoteAddress; // points to a UL_NETWORK_ADDRESS_xxx
  18. PVOID pLocalAddress; // points to a UL_NETWORK_ADDRESS_xxx
  19. //
  20. // initial data
  21. //
  22. ULONG InitialDataSize; // size of initial data
  23. PVOID pInitialData; // pointer to initial data
  24. } UL_RAW_CONNECTION_INFO, *PUL_RAW_CONNECTION_INFO;
  25. //
  26. // Data computed during SSL handshake
  27. //
  28. typedef struct _UL_SSL_INFO
  29. {
  30. USHORT ServerCertKeySize;
  31. USHORT ConnectionKeySize;
  32. PWCHAR pServerCertIssuer;
  33. ULONG ServerCertIssuerSize;
  34. PWCHAR pServerCertSubject;
  35. ULONG ServerCertSubjectSize;
  36. PUL_SSL_CLIENT_CERT_INFO pClientCertInfo;
  37. } UL_SSL_INFO, *PUL_SSL_INFO;
  38. //
  39. // Client certificate information
  40. //
  41. typedef struct _UL_SSL_CLIENT_CERT_INFO
  42. {
  43. ULONG CertEncodedSize;
  44. PUCHAR pCertEncoded;
  45. ULONG CertFlags;
  46. HANDLE Token;
  47. } UL_SSL_CLIENT_CERT_INFO, *PUL_SSL_CLIENT_CERT_INFO;
  48. //
  49. // for transfers between filters and upper levels
  50. //
  51. typedef enum _UL_FILTER_BUFFER_TYPE
  52. {
  53. UlFilterBufferHttpStream, // both directions
  54. UlFilterBufferSslInitInfo, // filter -> app
  55. UlFilterBufferSslClientCert, // filter -> app
  56. UlFilterBufferSslClientCertAndMap, // filter -> app
  57. UlFilterBufferSslRenegotiate // app -> filter
  58. }
  59. typedef struct _UL_FILTER_BUFFER
  60. {
  61. UL_FILTER_BUFFER_TYPE BufferType;
  62. PUCHAR pBuffer;
  63. ULONG BufferSize;
  64. } UL_FILTER_BUFFER, *PUL_FILTER_BUFFER;
  65. //
  66. // for adding filters to the control channel
  67. //
  68. // Used with: UlControlChannelFilterInformation
  69. // UlControlChannelLegacyFilterInformation
  70. //
  71. typedef struct _UL_CONTROL_CHANNEL_FILTER
  72. {
  73. UL_PROPERTY_FLAGS Flags;
  74. HANDLE FilterHandle;
  75. } UL_CONTROL_CHANNEL_FILTER, *PUL_CONTROL_CHANNEL_FILTER, ;
  76. //
  77. // API calls for SSL/Filter helper process
  78. //
  79. ULAPI_LINKAGE
  80. ULONG
  81. WINAPI
  82. UlCreateFilter(
  83. OUT PHANDLE pFilterHandle,
  84. IN PCWSTR pFilterName,
  85. IN LPSECURITY_ATTRIBUTES pSecurityAttributes OPTIONAL,
  86. IN ULONG Options
  87. );
  88. ULAPI_LINKAGE
  89. ULONG
  90. WINAPI
  91. UlOpenFilter(
  92. OUT PHANDLE pFilterHandle,
  93. IN PCWSTR pFilterName,
  94. IN ULONG Options
  95. );
  96. ULAPI_LINKAGE
  97. ULONG
  98. WINAPI
  99. UlFilterAccept(
  100. IN HANDLE FilterHandle,
  101. OUT PUL_RAW_CONNECTION_INFO pRawConnectionInfo,
  102. IN ULONG RawConnectionInfoSize,
  103. OUT pBytesReceived OPTIONAL,
  104. IN LPOVERLAPPED pOverlapped OPTIONAL
  105. );
  106. ULAPI_LINKAGE
  107. ULONG
  108. WINAPI
  109. UlFilterClose(
  110. IN HANDLE FilterHandle,
  111. IN UL_HTTP_CONNECTION_ID ConnectionId,
  112. IN LPOVERLAPPED pOverlapped OPTIONAL
  113. );
  114. ULAPI_LINKAGE
  115. ULONG
  116. WINAPI
  117. UlFilterRawRead(
  118. IN HANDLE FilterHandle,
  119. IN UL_HTTP_CONNECTION_ID ConnectionId,
  120. OUT PVOID pBuffer,
  121. IN ULONG BufferSize,
  122. OUT PULONG pBytesReceived OPTIONAL,
  123. IN LPOVERLAPPED pOverlapped OPTIONAL
  124. );
  125. ULAPI_LINKAGE
  126. ULONG
  127. WINAPI
  128. UlFilterRawWrite(
  129. IN HANDLE FilterHandle,
  130. IN UL_HTTP_CONNECTION_ID ConnectionId,
  131. IN PVOID pBuffer,
  132. IN ULONG BufferSize,
  133. OUT PULONG pBytesReceived OPTIONAL,
  134. IN LPOVERLAPPED pOverlapped OPTIONAL
  135. );
  136. ULAPI_LINKAGE
  137. ULONG
  138. WINAPI
  139. UlFilterAppRead(
  140. IN HANDLE FilterHandle,
  141. IN UL_HTTP_CONNECTION_ID ConnectionId,
  142. OUT PUL_FILTER_BUFFER pBuffer,
  143. IN ULONG BufferSize
  144. OUT PULONG pBytesReceived OPTIONAL,
  145. IN LPOVERLAPPED pOverlapped OPTIONAL
  146. );
  147. ULAPI_LINKAGE
  148. ULONG
  149. WINAPI
  150. UlFilterAppWrite(
  151. IN HANDLE FilterHandle,
  152. IN UL_HTTP_CONNECTION_ID ConnectionId,
  153. IN PUL_FILTER_BUFFER pBuffer,
  154. OUT PULONG pBytesReceived OPTIONAL,
  155. IN LPOVERLAPPED pOverlapped OPTIONAL
  156. );
  157. //
  158. // Application pool calls for SSL
  159. //
  160. ULAPI_LINKAGE
  161. ULONG
  162. WINAPI
  163. UlReceiveClientCertificate(
  164. IN HANDLE AppPoolHandle,
  165. IN UL_HTTP_CONNECTION_ID ConnectionId,
  166. IN ULONG Flags,
  167. OUT PUL_SSL_CLIENT_CERT_INFO pSslClientCertInfo,
  168. IN ULONG SslClientCertInfoSize,
  169. OUT PULONG pBytesReceived OPTIONAL,
  170. IN LPOVERLAPPED pOverlapped
  171. );