TokenBindingGenerateBinding function
Constructs one token binding that contains the exported public key and signature by using the specified key type for the token binding, a target identifier string for creating and retrieving the token binding key, and the unique data. This function also returns the token binding identifier, if needed.
Syntax
SECURITY_STATUS WINAPI TokenBindingGenerateBinding( _In_ PCWSTR keyType, _In_ PCWSTR targetURL, _In_ TOKENBINDING_TYPE bindingType, _In_ const void *tlsUnique, _In_ DWORD tlsUniqueSize, _In_ TOKENBINDING_EXTENSION_FORMAT extensionFormat, _In_ const void *extensionData, _Out_ void **tokenBinding, _Out_ DWORD *tokenBindingSize, _Out_opt_ TOKENBINDING_RESULT_DATA **resultData );
Parameters
- keyType [in]
-
The negotiated key type to use. Use a value from the list of key types that you retrieved by calling the TokenBindingGetKeyTypesClient function.
- targetURL [in]
-
The target string to use in conjunction with the key type to generate or retrieve a token binding key for the NCrypt operations that build the buffer for the tokenBinding parameter.
- bindingType [in]
-
The type of token binding that TokenBindingGenerateBinding should generate.
- tlsUnique [in]
-
A pointer to the buffer that contains unique data.
- tlsUniqueSize [in]
-
The size of the buffer that the tlsUnique parameter points to, in bytes.
- extensionFormat [in]
-
The format to use to interpret the data in the extensionData parameter. This value must be TOKENBINDING_EXTENSION_FORMAT_UNDEFINED.
- extensionData [in]
-
A pointer to a buffer that contains extension data. The value of the extensionFormat parameter determines how to interpret this data.
- tokenBinding [out]
-
A pointer that receives the address of the token binding buffer. Use the HeapAlloc function to allocate the memory for this buffer, and the HeapFree function to free that memory.
- tokenBindingSize [out]
-
Pointer to a variable that receives the size of the buffer allocated for the tokenBinding parameter, in bytes.
- resultData [out, optional]
-
A pointer that receives the address of the buffer that contains result data that includes the token binding identifier of the token binding that TokenBindingGenerateBinding generates. Use the HeapAlloc function to allocate the memory for this buffer, and the HeapFree function to free that memory. Specify NULL is you do not need this information.
Return value
Returns a status code that indicates the success or failure of the function.
Remarks
You can call TokenBindingGenerateBinding from user mode.
Requirements
|
Minimum supported client |
Windows 10 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- TokenBindingDeleteBinding
- TokenBindingGetKeyTypesClient
- TOKENBINDING_TYPE
- TOKENBINDING_EXTENSION_FORMAT
- TOKENBINDING_RESULT_DATA
- HeapAlloc
- HeapFree