Platform SDK: Logon Authentication

SecBuffer

The SecBuffer structure describes a buffer allocated by a transport application to pass to a security package.

typedef struct _SecBuffer {
    ULONG        cbBuffer;
    ULONG        BufferType;
    PVOID        pvBuffer;
} SecBuffer, *PSecBuffer;

Members

cbBuffer
Specifies the size, in bytes, of the buffer pointed to by the pvBuffer member.
BufferType
Bit flags that indicate the type of buffer. BufferType must be one of the following flags.
Flag Meaning
SECBUFFER_EMPTY This is a placeholder in the buffer array. The caller can supply several such entries in the array, and the security package can return information in them. For more information, see Context Semantics.
SECBUFFER_DATA Used for common data. The security package can read and write this data, for example, to encrypt some or all of it.
SECBUFFER_TOKEN This buffer is used to indicate the security token portion of the message. This is read-only for input parameters or read/write for output parameters.
SECBUFFER_PKG_PARAMS These are transport-to-package–specific parameters. For example, the Netware redirector may supply the server object identifier, while DCE RPC can supply an association UUID, and so on.
SECBUFFER_MISSING The security package uses this value to indicate the number of missing bytes in a particular message. The pvBuffer member is ignored in this type.
SECBUFFER_EXTRA The security package uses this value to indicate the number of extra or unprocessed bytes in a message.
SECBUFFER_STREAM_TRAILER Indicates a protocol-specific trailer for a particular record. Not usually of interest to callers.
SECBUFFER_STREAM_HEADER Indicates a protocol-specific header for a particular record. Not usually of interest to callers.

In addition, BufferType can combine the following flag with any of the flags in the preceding table using a bitwise OR operation.
Flag Meaning
SECBUFFER_READONLY The buffer is read-only. This flag is intended for sending header information to the security package for computing the checksum or the like. The package can read this buffer, but cannot modify it.

pvBuffer
Pointer to a buffer.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Sspi.h; include Security.h.

See Also

SecBufferDesc