SOCKET_SECURITY_QUERY_INFO structure

The SOCKET_SECURITY_QUERY_INFO structure contains security information returned by the WSAQuerySocketSecurity function.

Syntax

typedef struct _SOCKET_SECURITY_QUERY_INFO {
  SOCKET_SECURITY_PROTOCOL SecurityProtocol;
  ULONG                    Flags;
  UINT64                   PeerApplicationAccessTokenHandle;
  UINT64                   PeerMachineAccessTokenHandle;
} SOCKET_SECURITY_QUERY_INFO;

Members

SecurityProtocol

A SOCKET_SECURITY_PROTOCOL value that identifies the protocol used to secure the traffic.

Flags

The set of possible security flags for the connection defined in the Mstcpip.h header file.

Value Meaning
SOCKET_INFO_CONNECTION_SECURED
0x00000001
If present, traffic is being secured by a security protocol. If absent, the traffic is flowing in the clear.
SOCKET_INFO_CONNECTION_ENCRYPTED
0x00000002
If present, the connection traffic is being encrypted. The SOCKET_INFO_CONNECTION_SECURED flag is always set when this flag is present.

PeerApplicationAccessTokenHandle

A handle to the access token that represents the account under which the peer application is running. After using the token for access checks, the application should close the handle using the CloseHandle function.

PeerMachineAccessTokenHandle

A handle to the access token for the peer computer's account during the course of the application. After using the token for access checks, the application should close the handle using the CloseHandle function.

Remarks

The SOCKET_SECURITY_QUERY_INFO structure is supported on Windows Vistaand later.

The SOCKET_SECURITY_QUERY_INFO structure is used by the WSAQuerySocketSecurity function to return information about the security applied to a connection on a socket.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header mstcpip.h

See also

CloseHandle

SOCKET_SECURITY_PROTOCOL

Using Secure Socket Extensions

WSAQuerySocketSecurity

Windows Filtering Platform

Windows Filtering Platform API Functions

Winsock Secure Socket Extensions