大网数据广告活动
账户与安全

KERB_SMARTCARD_CSP_INFO structure

· 52CE 我爱测

Contains information about a smart card cryptographic service provider (CSP).

The KERB_SMARTCARD_CSP_INFO structure contains information about a smart card cryptographic service provider (CSP).

This structure is not declared in a public header.

Syntax

typedef struct _KERB_SMARTCARD_CSP_INFO {
  DWORD dwCspInfoLen;
  DWORD MessageType;
  union {
    PVOID   ContextInformation;
    ULONG64 SpaceHolderForWow64;
  };
  DWORD flags;
  DWORD KeySpec;
  ULONG nCardNameOffset;
  ULONG nReaderNameOffset;
  ULONG nContainerNameOffset;
  ULONG nCSPNameOffset;
  TCHAR bBuffer;
} KERB_SMARTCARD_CSP_INFO, *PKERB_SMARTCARD_CSP_INFO;

Members

dwCspInfoLen

The size, in bytes, of this structure, including any appended data.

MessageType

The type of message being passed. This member must be set to 1.

ContextInformation

Reserved.

SpaceHolderForWow64

Reserved.

flags

Reserved.

KeySpec

The private key to use from the key container specified within the buffer bBuffer. The key can be one of the following values, defined in WinCrypt.h.

Value Meaning
AT_KEYEXCHANGE 1 The key is a key-exchange key.
AT_SIGNATURE 2 The key is a signature key.

nCardNameOffset

The number of characters in the bBuffer buffer that precede the name of the smart card in that buffer.

Important: If the name of the smart card is not provided, the buffer must contain an empty string.

nReaderNameOffset

The number of characters in the bBuffer buffer that precede the name of the smart card reader in that buffer.

Important: If the name of the smart card reader is not provided, the buffer must contain an empty string.

nContainerNameOffset

The number of characters in the bBuffer buffer that precede the name of the key container in that buffer. This string cannot be empty.

nCSPNameOffset

The number of characters in the bBuffer buffer that precede the name of the CSP in that buffer.

bBuffer

An array of characters initialized to a length of sizeof(DWORD). This buffer contains the names referred to by the nCardNameOffset, nReaderNameOffset, nContainerNameOffset, and nCSPNameOffset members, as well as any additional data provided by the CSP.

Any names that are not provided must be represented in this buffer by empty strings.

Remarks

bBuffer layout

The bBuffer begins with a DWORD-sized placeholder/prefix of sizeof(DWORD) bytes and then stores null-terminated strings for the card, reader, container, and CSP names (each may be an empty string except the container name which must be non-empty), followed by any CSP-specific extra data.

Component (order from start of bBuffer) Description Requirement
DWORD prefix Reserved placeholder (sizeof(DWORD) = 4 bytes) Always present
CardName Empty string or null-terminated card name Optional
ReaderName Empty string or null-terminated reader name Optional
ContainerName Null-terminated key container name Required; must be non-empty
CSPName Empty string or null-terminated CSP name Optional
Additional data CSP-specific appended data after names Optional; CSP-defined format
  • Offsets: nCardNameOffset, nReaderNameOffset, nContainerNameOffset, and nCSPNameOffset are the number of characters from the start of bBuffer to the beginning of each respective string. These counts include the initial reserved sizeof(DWORD) region and are measured in TCHAR units (ANSI char or Unicode wchar_t, depending on build).
  • Empty names: When a name is not provided, the buffer must contain an empty string (zero-length followed by the terminator) at that position.
  • Serialization alignment: When serialized, structure members must be aligned to 2-byte boundaries.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]

See also

KERB_CERTIFICATE_LOGON

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。