PEER_SECURITY_INTERFACE structure (p2p.h)

The PEER_SECURITY_INTERFACE structure specifies the security interfaces that calls to Peer Graphing APIs use to validate, secure, and free records. Additionally, it allows an application to specify the path to the .DLL that contains an implementation of a security service provider (SSP).

Syntax

typedef struct peer_security_interface_tag {
  DWORD                           dwSize;
  PWSTR                           pwzSspFilename;
  PWSTR                           pwzPackageName;
  ULONG                           cbSecurityInfo;
  PBYTE                           pbSecurityInfo;
  PVOID                           pvContext;
  PFNPEER_VALIDATE_RECORD         pfnValidateRecord;
  PFNPEER_SECURE_RECORD           pfnSecureRecord;
  PFNPEER_FREE_SECURITY_DATA      pfnFreeSecurityData;
  PFNPEER_ON_PASSWORD_AUTH_FAILED pfnAuthFailed;
} PEER_SECURITY_INTERFACE, *PPEER_SECURITY_INTERFACE;

Members

dwSize

Specifies the size of the structure. Set the value to sizeof(PEER_SECURITY_INTERFACE). This member is required and has no default value.

pwzSspFilename

Specifies the full path and file name of a .DLL that implements the SSP interface. See the SSPI documentation for further information on the SSP interface.

pwzPackageName

Specifies the ID of the security module in the SSP to use.

cbSecurityInfo

Specifies the byte count of the pbSecurityInfo member. This member is not required if pbSecurityInfo is NULL. However, if pbSecurityInfo is not NULL, this member must have a value.

pbSecurityInfo

Pointer to a buffer that contains the information used to create or open a peer graph. This member is optional and can be NULL.

The security data blob pointed to by pbSecurityInfo is copied and then passed to the SSPI function call of AcquireCredentialsHandle.

pvContext

Pointer to the security context. This security context is then passed as the first parameter to PFNPEER_VALIDATE_RECORD, PFNPEER_FREE_SECURITY_DATA, and PFNPEER_SECURE_RECORD. This member is optional and can be NULL.

pfnValidateRecord

Pointer to a callback function that is called when a record requires validation. This member is optional and can be NULL. If pfnSecureRecord is NULL, this member must also be NULL.

pfnSecureRecord

Pointer to a callback function that is called when a record must be secured. This member is optional and can be NULL. If pfnValidateRecord is NULL, this member must also be NULL.

pfnFreeSecurityData

Pointer to a callback function used to free any data allocated by the callback pointed to by pfnSecureRecord. This member is optional and can be NULL.

pfnAuthFailed

Remarks

If you have developed your own SSP, your application must not call the Peer Graphing API to access data in the graphing database; doing so can lead to a deadlock situation. Instead, the application should look at a cached copy of the information.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP
Minimum supported server None supported
Header p2p.h

See also

AcquireCredentialsHandle

PFNPEER_FREE_SECURITY_DATA

PFNPEER_SECURE_RECORD

PFNPEER_VALIDATE_RECORD

PeerGraphCreate

PeerGraphOpen