FreeRDP
sspi_winpr.c File Reference
#include <winpr/config.h>
#include <winpr/assert.h>
#include <winpr/windows.h>
#include <winpr/crt.h>
#include <winpr/sspi.h>
#include <winpr/ssl.h>
#include <winpr/print.h>
#include "sspi.h"
#include "sspi_winpr.h"
#include "../log.h"
#include "NTLM/ntlm_export.h"
#include "CredSSP/credssp.h"
#include "Kerberos/kerberos.h"
#include "Negotiate/negotiate.h"
#include "Schannel/schannel.h"

Macros

#define TAG   WINPR_TAG("sspi")
 
#define SecHandle_LOWER_MAX   0xFFFFFFFF
 
#define SecHandle_UPPER_MAX   0xFFFFFFFE
 

Functions

static int sspi_ContextBufferAllocTableNew (void)
 
static int sspi_ContextBufferAllocTableGrow (void)
 
static void sspi_ContextBufferAllocTableFree (void)
 
static void * sspi_ContextBufferAlloc (UINT32 allocatorIndex, size_t size)
 
SSPI_CREDENTIALSsspi_CredentialsNew (void)
 
void sspi_CredentialsFree (SSPI_CREDENTIALS *credentials)
 
void * sspi_SecBufferAlloc (PSecBuffer SecBuffer, ULONG size)
 
void sspi_SecBufferFree (PSecBuffer SecBuffer)
 
SecHandlesspi_SecureHandleAlloc (void)
 
void * sspi_SecureHandleGetLowerPointer (SecHandle *handle)
 
void sspi_SecureHandleInvalidate (SecHandle *handle)
 
void sspi_SecureHandleSetLowerPointer (SecHandle *handle, void *pointer)
 
void * sspi_SecureHandleGetUpperPointer (SecHandle *handle)
 
void sspi_SecureHandleSetUpperPointer (SecHandle *handle, void *pointer)
 
void sspi_SecureHandleFree (SecHandle *handle)
 
int sspi_SetAuthIdentityW (SEC_WINNT_AUTH_IDENTITY *identity, const WCHAR *user, const WCHAR *domain, const WCHAR *password)
 
static BOOL copy (WCHAR **dst, UINT32 *dstLen, const WCHAR *what, size_t len)
 
int sspi_SetAuthIdentityWithLengthW (SEC_WINNT_AUTH_IDENTITY *identity, const WCHAR *user, size_t userLen, const WCHAR *domain, size_t domainLen, const WCHAR *password, size_t passwordLen)
 
int sspi_SetAuthIdentityA (SEC_WINNT_AUTH_IDENTITY *identity, const char *user, const char *domain, const char *password)
 
int sspi_SetAuthIdentityWithUnicodePassword (SEC_WINNT_AUTH_IDENTITY *identity, const char *user, const char *domain, LPWSTR password, ULONG passwordLength)
 
int sspi_CopyAuthIdentity (SEC_WINNT_AUTH_IDENTITY *identity, const SEC_WINNT_AUTH_IDENTITY *srcIdentity)
 
PSecBuffer sspi_FindSecBuffer (PSecBufferDesc pMessage, ULONG BufferType)
 
static BOOL CALLBACK sspi_init (PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
 
void sspi_GlobalInit (void)
 
void sspi_GlobalFinish (void)
 
static const SecurityFunctionTableAsspi_GetSecurityFunctionTableAByNameA (const SEC_CHAR *Name)
 
static const SecurityFunctionTableWsspi_GetSecurityFunctionTableWByNameW (const SEC_WCHAR *Name)
 
static const SecurityFunctionTableWsspi_GetSecurityFunctionTableWByNameA (const SEC_CHAR *Name)
 
static void FreeContextBuffer_EnumerateSecurityPackages (void *contextBuffer)
 
static void FreeContextBuffer_QuerySecurityPackageInfo (void *contextBuffer)
 
static void sspi_ContextBufferFree (void *contextBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesW (ULONG *pcPackages, PSecPkgInfoW *ppPackageInfo)
 
static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesA (ULONG *pcPackages, PSecPkgInfoA *ppPackageInfo)
 
SecurityFunctionTableW *SEC_ENTRY winpr_InitSecurityInterfaceW (void)
 
SecurityFunctionTableA *SEC_ENTRY winpr_InitSecurityInterfaceA (void)
 
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoW (SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo)
 
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoA (SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo)
 
static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleW (SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, void *pvLogonID, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 
static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleA (SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, void *pvLogonID, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 
static SECURITY_STATUS SEC_ENTRY winpr_ExportSecurityContext (PCtxtHandle phContext, ULONG fFlags, PSecBuffer pPackedContext, HANDLE *pToken)
 
static SECURITY_STATUS SEC_ENTRY winpr_FreeCredentialsHandle (PCredHandle phCredential)
 
static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextW (SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextA (SEC_CHAR *pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesW (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesA (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_AcceptSecurityContext (PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp)
 
static SECURITY_STATUS SEC_ENTRY winpr_ApplyControlToken (PCtxtHandle phContext, PSecBufferDesc pInput)
 
static SECURITY_STATUS SEC_ENTRY winpr_CompleteAuthToken (PCtxtHandle phContext, PSecBufferDesc pToken)
 
static SECURITY_STATUS SEC_ENTRY winpr_DeleteSecurityContext (PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY winpr_FreeContextBuffer (void *pvContextBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_ImpersonateSecurityContext (PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextW (PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
 
static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextA (PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
 
static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesW (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesA (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityContextToken (PCtxtHandle phContext, HANDLE *phToken)
 
static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesW (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesA (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
 
static SECURITY_STATUS SEC_ENTRY winpr_RevertSecurityContext (PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY winpr_DecryptMessage (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
 
static SECURITY_STATUS SEC_ENTRY winpr_EncryptMessage (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY winpr_MakeSignature (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY winpr_VerifySignature (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
 

Variables

static const SecPkgInfoASecPkgInfoA_LIST []
 
static const SecPkgInfoWSecPkgInfoW_LIST []
 
static SecurityFunctionTableA winpr_SecurityFunctionTableA
 
static SecurityFunctionTableW winpr_SecurityFunctionTableW
 
static const SecurityFunctionTableA_NAME SecurityFunctionTableA_NAME_LIST []
 
static const WCHAR _NTLM_NAME_W [] = { 'N', 'T', 'L', 'M', '\0' }
 
static const WCHAR _KERBEROS_NAME_W [] = { 'K', 'e', 'r', 'b', 'e', 'r', 'o', 's', '\0' }
 
static const WCHAR _NEGOTIATE_NAME_W [] = { 'N', 'e', 'g', 'o', 't', 'i', 'a', 't', 'e', '\0' }
 
static const WCHAR _CREDSSP_NAME_W [] = { 'C', 'r', 'e', 'd', 'S', 'S', 'P', '\0' }
 
static const WCHAR _SCHANNEL_NAME_W [] = { 'S', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '\0' }
 
static const SecurityFunctionTableW_NAME SecurityFunctionTableW_NAME_LIST []
 
static CONTEXT_BUFFER_ALLOC_TABLE ContextBufferAllocTable = { 0 }
 

Macro Definition Documentation

◆ SecHandle_LOWER_MAX

#define SecHandle_LOWER_MAX   0xFFFFFFFF

◆ SecHandle_UPPER_MAX

#define SecHandle_UPPER_MAX   0xFFFFFFFE

◆ TAG

#define TAG   WINPR_TAG("sspi")

FreeRDP: A Remote Desktop Protocol Implementation Security Support Provider Interface (SSPI)

Copyright 2012-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2017 Dorian Ducournau doria.nosp@m.n.du.nosp@m.courn.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ copy()

static BOOL copy ( WCHAR **  dst,
UINT32 *  dstLen,
const WCHAR *  what,
size_t  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeContextBuffer_EnumerateSecurityPackages()

static void FreeContextBuffer_EnumerateSecurityPackages ( void *  contextBuffer)
static
Here is the caller graph for this function:

◆ FreeContextBuffer_QuerySecurityPackageInfo()

void FreeContextBuffer_QuerySecurityPackageInfo ( void *  contextBuffer)
static
Here is the caller graph for this function:

◆ sspi_ContextBufferAlloc()

static void* sspi_ContextBufferAlloc ( UINT32  allocatorIndex,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_ContextBufferAllocTableFree()

static void sspi_ContextBufferAllocTableFree ( void  )
static
Here is the caller graph for this function:

◆ sspi_ContextBufferAllocTableGrow()

static int sspi_ContextBufferAllocTableGrow ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_ContextBufferAllocTableNew()

static int sspi_ContextBufferAllocTableNew ( void  )
static
Here is the caller graph for this function:

◆ sspi_ContextBufferFree()

static void sspi_ContextBufferFree ( void *  contextBuffer)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_CopyAuthIdentity()

int sspi_CopyAuthIdentity ( SEC_WINNT_AUTH_IDENTITY identity,
const SEC_WINNT_AUTH_IDENTITY srcIdentity 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_CredentialsFree()

void sspi_CredentialsFree ( SSPI_CREDENTIALS credentials)
Here is the caller graph for this function:

◆ sspi_CredentialsNew()

SSPI_CREDENTIALS* sspi_CredentialsNew ( void  )
Here is the caller graph for this function:

◆ sspi_FindSecBuffer()

PSecBuffer sspi_FindSecBuffer ( PSecBufferDesc  pMessage,
ULONG  BufferType 
)
Here is the caller graph for this function:

◆ sspi_GetSecurityFunctionTableAByNameA()

static const SecurityFunctionTableA* sspi_GetSecurityFunctionTableAByNameA ( const SEC_CHAR Name)
static
Here is the caller graph for this function:

◆ sspi_GetSecurityFunctionTableWByNameA()

static const SecurityFunctionTableW* sspi_GetSecurityFunctionTableWByNameA ( const SEC_CHAR Name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_GetSecurityFunctionTableWByNameW()

static const SecurityFunctionTableW* sspi_GetSecurityFunctionTableWByNameW ( const SEC_WCHAR Name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_GlobalFinish()

void sspi_GlobalFinish ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_GlobalInit()

void sspi_GlobalInit ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_init()

static BOOL CALLBACK sspi_init ( PINIT_ONCE  InitOnce,
PVOID  Parameter,
PVOID *  Context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_SecBufferAlloc()

void* sspi_SecBufferAlloc ( PSecBuffer  SecBuffer,
ULONG  size 
)
Here is the caller graph for this function:

◆ sspi_SecBufferFree()

void sspi_SecBufferFree ( PSecBuffer  SecBuffer)
Here is the caller graph for this function:

◆ sspi_SecureHandleAlloc()

SecHandle* sspi_SecureHandleAlloc ( void  )

◆ sspi_SecureHandleFree()

void sspi_SecureHandleFree ( SecHandle handle)

◆ sspi_SecureHandleGetLowerPointer()

void* sspi_SecureHandleGetLowerPointer ( SecHandle handle)
Here is the caller graph for this function:

◆ sspi_SecureHandleGetUpperPointer()

void* sspi_SecureHandleGetUpperPointer ( SecHandle handle)
Here is the caller graph for this function:

◆ sspi_SecureHandleInvalidate()

void sspi_SecureHandleInvalidate ( SecHandle handle)
Here is the caller graph for this function:

◆ sspi_SecureHandleSetLowerPointer()

void sspi_SecureHandleSetLowerPointer ( SecHandle handle,
void *  pointer 
)
Here is the caller graph for this function:

◆ sspi_SecureHandleSetUpperPointer()

void sspi_SecureHandleSetUpperPointer ( SecHandle handle,
void *  pointer 
)
Here is the caller graph for this function:

◆ sspi_SetAuthIdentityA()

int sspi_SetAuthIdentityA ( SEC_WINNT_AUTH_IDENTITY identity,
const char *  user,
const char *  domain,
const char *  password 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_SetAuthIdentityW()

int sspi_SetAuthIdentityW ( SEC_WINNT_AUTH_IDENTITY identity,
const WCHAR *  user,
const WCHAR *  domain,
const WCHAR *  password 
)
Here is the call graph for this function:

◆ sspi_SetAuthIdentityWithLengthW()

int sspi_SetAuthIdentityWithLengthW ( SEC_WINNT_AUTH_IDENTITY identity,
const WCHAR *  user,
size_t  userLen,
const WCHAR *  domain,
size_t  domainLen,
const WCHAR *  password,
size_t  passwordLen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sspi_SetAuthIdentityWithUnicodePassword()

int sspi_SetAuthIdentityWithUnicodePassword ( SEC_WINNT_AUTH_IDENTITY identity,
const char *  user,
const char *  domain,
LPWSTR  password,
ULONG  passwordLength 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_AcceptSecurityContext()

static SECURITY_STATUS SEC_ENTRY winpr_AcceptSecurityContext ( PCredHandle  phCredential,
PCtxtHandle  phContext,
PSecBufferDesc  pInput,
ULONG  fContextReq,
ULONG  TargetDataRep,
PCtxtHandle  phNewContext,
PSecBufferDesc  pOutput,
PULONG  pfContextAttr,
PTimeStamp  ptsTimeStamp 
)
static
Here is the call graph for this function:

◆ winpr_AcquireCredentialsHandleA()

static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleA ( SEC_CHAR pszPrincipal,
SEC_CHAR pszPackage,
ULONG  fCredentialUse,
void *  pvLogonID,
void *  pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
void *  pvGetKeyArgument,
PCredHandle  phCredential,
PTimeStamp  ptsExpiry 
)
static
Here is the call graph for this function:

◆ winpr_AcquireCredentialsHandleW()

static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleW ( SEC_WCHAR pszPrincipal,
SEC_WCHAR pszPackage,
ULONG  fCredentialUse,
void *  pvLogonID,
void *  pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
void *  pvGetKeyArgument,
PCredHandle  phCredential,
PTimeStamp  ptsExpiry 
)
static
Here is the call graph for this function:

◆ winpr_ApplyControlToken()

static SECURITY_STATUS SEC_ENTRY winpr_ApplyControlToken ( PCtxtHandle  phContext,
PSecBufferDesc  pInput 
)
static
Here is the call graph for this function:

◆ winpr_CompleteAuthToken()

static SECURITY_STATUS SEC_ENTRY winpr_CompleteAuthToken ( PCtxtHandle  phContext,
PSecBufferDesc  pToken 
)
static
Here is the call graph for this function:

◆ winpr_DecryptMessage()

static SECURITY_STATUS SEC_ENTRY winpr_DecryptMessage ( PCtxtHandle  phContext,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo,
PULONG  pfQOP 
)
static
Here is the call graph for this function:

◆ winpr_DeleteSecurityContext()

static SECURITY_STATUS SEC_ENTRY winpr_DeleteSecurityContext ( PCtxtHandle  phContext)
static
Here is the call graph for this function:

◆ winpr_EncryptMessage()

static SECURITY_STATUS SEC_ENTRY winpr_EncryptMessage ( PCtxtHandle  phContext,
ULONG  fQOP,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo 
)
static
Here is the call graph for this function:

◆ winpr_EnumerateSecurityPackagesA()

static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesA ( ULONG *  pcPackages,
PSecPkgInfoA ppPackageInfo 
)
static
Here is the call graph for this function:

◆ winpr_EnumerateSecurityPackagesW()

static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesW ( ULONG *  pcPackages,
PSecPkgInfoW ppPackageInfo 
)
static

Standard SSPI API

Here is the call graph for this function:

◆ winpr_ExportSecurityContext()

static SECURITY_STATUS SEC_ENTRY winpr_ExportSecurityContext ( PCtxtHandle  phContext,
ULONG  fFlags,
PSecBuffer  pPackedContext,
HANDLE *  pToken 
)
static
Here is the call graph for this function:

◆ winpr_FreeContextBuffer()

static SECURITY_STATUS SEC_ENTRY winpr_FreeContextBuffer ( void *  pvContextBuffer)
static
Here is the call graph for this function:

◆ winpr_FreeCredentialsHandle()

static SECURITY_STATUS SEC_ENTRY winpr_FreeCredentialsHandle ( PCredHandle  phCredential)
static
Here is the call graph for this function:

◆ winpr_ImpersonateSecurityContext()

static SECURITY_STATUS SEC_ENTRY winpr_ImpersonateSecurityContext ( PCtxtHandle  phContext)
static
Here is the call graph for this function:

◆ winpr_ImportSecurityContextA()

static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextA ( SEC_CHAR pszPackage,
PSecBuffer  pPackedContext,
HANDLE  pToken,
PCtxtHandle  phContext 
)
static
Here is the call graph for this function:

◆ winpr_ImportSecurityContextW()

static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextW ( SEC_WCHAR pszPackage,
PSecBuffer  pPackedContext,
HANDLE  pToken,
PCtxtHandle  phContext 
)
static
Here is the call graph for this function:

◆ winpr_InitializeSecurityContextA()

static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextA ( PCredHandle  phCredential,
PCtxtHandle  phContext,
SEC_CHAR pszTargetName,
ULONG  fContextReq,
ULONG  Reserved1,
ULONG  TargetDataRep,
PSecBufferDesc  pInput,
ULONG  Reserved2,
PCtxtHandle  phNewContext,
PSecBufferDesc  pOutput,
PULONG  pfContextAttr,
PTimeStamp  ptsExpiry 
)
static
Here is the call graph for this function:

◆ winpr_InitializeSecurityContextW()

static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextW ( PCredHandle  phCredential,
PCtxtHandle  phContext,
SEC_WCHAR pszTargetName,
ULONG  fContextReq,
ULONG  Reserved1,
ULONG  TargetDataRep,
PSecBufferDesc  pInput,
ULONG  Reserved2,
PCtxtHandle  phNewContext,
PSecBufferDesc  pOutput,
PULONG  pfContextAttr,
PTimeStamp  ptsExpiry 
)
static
Here is the call graph for this function:

◆ winpr_InitSecurityInterfaceA()

SecurityFunctionTableA* SEC_ENTRY winpr_InitSecurityInterfaceA ( void  )
Here is the caller graph for this function:

◆ winpr_InitSecurityInterfaceW()

SecurityFunctionTableW* SEC_ENTRY winpr_InitSecurityInterfaceW ( void  )

WinPR: Windows Portable Runtime Security Support Provider Interface (SSPI)

Copyright 2012-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the caller graph for this function:

◆ winpr_MakeSignature()

static SECURITY_STATUS SEC_ENTRY winpr_MakeSignature ( PCtxtHandle  phContext,
ULONG  fQOP,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo 
)
static
Here is the call graph for this function:

◆ winpr_QueryContextAttributesA()

static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesA ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void *  pBuffer 
)
static
Here is the call graph for this function:

◆ winpr_QueryContextAttributesW()

static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesW ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void *  pBuffer 
)
static
Here is the call graph for this function:

◆ winpr_QueryCredentialsAttributesA()

static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesA ( PCredHandle  phCredential,
ULONG  ulAttribute,
void *  pBuffer 
)
static
Here is the call graph for this function:

◆ winpr_QueryCredentialsAttributesW()

static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesW ( PCredHandle  phCredential,
ULONG  ulAttribute,
void *  pBuffer 
)
static
Here is the call graph for this function:

◆ winpr_QuerySecurityContextToken()

static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityContextToken ( PCtxtHandle  phContext,
HANDLE *  phToken 
)
static
Here is the call graph for this function:

◆ winpr_QuerySecurityPackageInfoA()

static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoA ( SEC_CHAR pszPackageName,
PSecPkgInfoA ppPackageInfo 
)
static
Here is the call graph for this function:

◆ winpr_QuerySecurityPackageInfoW()

static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoW ( SEC_WCHAR pszPackageName,
PSecPkgInfoW ppPackageInfo 
)
static
Here is the call graph for this function:

◆ winpr_RevertSecurityContext()

static SECURITY_STATUS SEC_ENTRY winpr_RevertSecurityContext ( PCtxtHandle  phContext)
static
Here is the call graph for this function:

◆ winpr_SetContextAttributesA()

static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesA ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void *  pBuffer,
ULONG  cbBuffer 
)
static
Here is the call graph for this function:

◆ winpr_SetContextAttributesW()

static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesW ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void *  pBuffer,
ULONG  cbBuffer 
)
static
Here is the call graph for this function:

◆ winpr_VerifySignature()

static SECURITY_STATUS SEC_ENTRY winpr_VerifySignature ( PCtxtHandle  phContext,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo,
PULONG  pfQOP 
)
static
Here is the call graph for this function:

Variable Documentation

◆ _CREDSSP_NAME_W

const WCHAR _CREDSSP_NAME_W[] = { 'C', 'r', 'e', 'd', 'S', 'S', 'P', '\0' }
static

◆ _KERBEROS_NAME_W

const WCHAR _KERBEROS_NAME_W[] = { 'K', 'e', 'r', 'b', 'e', 'r', 'o', 's', '\0' }
static

◆ _NEGOTIATE_NAME_W

const WCHAR _NEGOTIATE_NAME_W[] = { 'N', 'e', 'g', 'o', 't', 'i', 'a', 't', 'e', '\0' }
static

◆ _NTLM_NAME_W

const WCHAR _NTLM_NAME_W[] = { 'N', 'T', 'L', 'M', '\0' }
static

◆ _SCHANNEL_NAME_W

const WCHAR _SCHANNEL_NAME_W[] = { 'S', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '\0' }
static

◆ ContextBufferAllocTable

CONTEXT_BUFFER_ALLOC_TABLE ContextBufferAllocTable = { 0 }
static

◆ SecPkgInfoA_LIST

◆ SecPkgInfoW_LIST

◆ SecurityFunctionTableA_NAME_LIST

const SecurityFunctionTableA_NAME SecurityFunctionTableA_NAME_LIST[]
static
Initial value:

◆ SecurityFunctionTableW_NAME_LIST

◆ winpr_SecurityFunctionTableA

◆ winpr_SecurityFunctionTableW

winpr_QueryContextAttributesA
static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
Definition: sspi_winpr.c:1358
KERBEROS_SecPkgInfoA
const SecPkgInfoA KERBEROS_SecPkgInfoA
Definition: kerberos.c:54
winpr_MakeSignature
static SECURITY_STATUS SEC_ENTRY winpr_MakeSignature(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: sspi_winpr.c:1593
CREDSSP_SecurityFunctionTableW
const SecurityFunctionTableW CREDSSP_SecurityFunctionTableW
Definition: credssp.c:256
NTLM_SecPkgInfoA
const SecPkgInfoA NTLM_SecPkgInfoA
Definition: winpr/libwinpr/sspi/NTLM/ntlm.c:1328
NEGOTIATE_SecPkgInfoA
const SecPkgInfoA NEGOTIATE_SecPkgInfoA
Definition: negotiate.c:66
winpr_QuerySecurityPackageInfoA
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoA(SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo)
Definition: sspi_winpr.c:757
winpr_DeleteSecurityContext
static SECURITY_STATUS SEC_ENTRY winpr_DeleteSecurityContext(PCtxtHandle phContext)
Definition: sspi_winpr.c:1178
CREDSSP_SecPkgInfoA
const SecPkgInfoA CREDSSP_SecPkgInfoA
Definition: credssp.c:287
winpr_FreeCredentialsHandle
static SECURITY_STATUS SEC_ENTRY winpr_FreeCredentialsHandle(PCredHandle phCredential)
Definition: sspi_winpr.c:907
winpr_ApplyControlToken
static SECURITY_STATUS SEC_ENTRY winpr_ApplyControlToken(PCtxtHandle phContext, PSecBufferDesc pInput)
Definition: sspi_winpr.c:1112
_SCHANNEL_NAME_W
static const WCHAR _SCHANNEL_NAME_W[]
Definition: sspi_winpr.c:80
CREDSSP_SecurityFunctionTableA
const SecurityFunctionTableA CREDSSP_SecurityFunctionTableA
Definition: credssp.c:225
winpr_InitializeSecurityContextA
static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextA(PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
Definition: sspi_winpr.c:1288
SCHANNEL_SecurityFunctionTableA
const SecurityFunctionTableA SCHANNEL_SecurityFunctionTableA
Definition: schannel.c:360
winpr_ImpersonateSecurityContext
static SECURITY_STATUS SEC_ENTRY winpr_ImpersonateSecurityContext(PCtxtHandle phContext)
Definition: sspi_winpr.c:1219
winpr_AcquireCredentialsHandleA
static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, void *pvLogonID, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: sspi_winpr.c:843
SCHANNEL_SecPkgInfoW
const SecPkgInfoW SCHANNEL_SecPkgInfoW
Definition: schannel.c:437
winpr_FreeContextBuffer
static SECURITY_STATUS SEC_ENTRY winpr_FreeContextBuffer(void *pvContextBuffer)
Definition: sspi_winpr.c:1210
winpr_VerifySignature
static SECURITY_STATUS SEC_ENTRY winpr_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
Definition: sspi_winpr.c:1626
winpr_ImportSecurityContextW
static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextW(SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
Definition: sspi_winpr.c:939
KERBEROS_SecurityFunctionTableA
const SecurityFunctionTableA KERBEROS_SecurityFunctionTableA
Definition: kerberos.c:1576
winpr_EncryptMessage
static SECURITY_STATUS SEC_ENTRY winpr_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: sspi_winpr.c:1560
NEGOTIATE_SecurityFunctionTableW
const SecurityFunctionTableW NEGOTIATE_SecurityFunctionTableW
Definition: negotiate.c:1446
winpr_EnumerateSecurityPackagesA
static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesA(ULONG *pcPackages, PSecPkgInfoA *ppPackageInfo)
Definition: sspi_winpr.c:658
_NTLM_NAME_W
static const WCHAR _NTLM_NAME_W[]
Definition: sspi_winpr.c:76
winpr_ExportSecurityContext
static SECURITY_STATUS SEC_ENTRY winpr_ExportSecurityContext(PCtxtHandle phContext, ULONG fFlags, PSecBuffer pPackedContext, HANDLE *pToken)
Definition: sspi_winpr.c:873
KERBEROS_SecPkgInfoW
const SecPkgInfoW KERBEROS_SecPkgInfoW
Definition: kerberos.c:69
NEGOTIATE_SecurityFunctionTableA
const SecurityFunctionTableA NEGOTIATE_SecurityFunctionTableA
Definition: negotiate.c:1415
NEGOTIATE_SecPkgInfoW
const SecPkgInfoW NEGOTIATE_SecPkgInfoW
Definition: negotiate.c:81
winpr_InitializeSecurityContextW
static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextW(PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
Definition: sspi_winpr.c:1251
winpr_EnumerateSecurityPackagesW
static SECURITY_STATUS SEC_ENTRY winpr_EnumerateSecurityPackagesW(ULONG *pcPackages, PSecPkgInfoW *ppPackageInfo)
Definition: sspi_winpr.c:629
winpr_SetContextAttributesW
static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
Definition: sspi_winpr.c:1424
winpr_QuerySecurityContextToken
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityContextToken(PCtxtHandle phContext, HANDLE *phToken)
Definition: sspi_winpr.c:1391
_NEGOTIATE_NAME_W
static const WCHAR _NEGOTIATE_NAME_W[]
Definition: sspi_winpr.c:78
winpr_SetContextAttributesA
static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
Definition: sspi_winpr.c:1458
_CREDSSP_NAME_W
static const WCHAR _CREDSSP_NAME_W[]
Definition: sspi_winpr.c:79
NTLM_SecurityFunctionTableW
const SecurityFunctionTableW NTLM_SecurityFunctionTableW
Definition: winpr/libwinpr/sspi/NTLM/ntlm.c:1297
winpr_DecryptMessage
static SECURITY_STATUS SEC_ENTRY winpr_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
Definition: sspi_winpr.c:1526
NTLM_SecPkgInfoW
const SecPkgInfoW NTLM_SecPkgInfoW
Definition: winpr/libwinpr/sspi/NTLM/ntlm.c:1344
winpr_ImportSecurityContextA
static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextA(SEC_CHAR *pszPackage, PSecBuffer pPackedContext, HANDLE pToken, PCtxtHandle phContext)
Definition: sspi_winpr.c:973
CREDSSP_SecPkgInfoW
const SecPkgInfoW CREDSSP_SecPkgInfoW
Definition: credssp.c:303
winpr_QueryContextAttributesW
static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
Definition: sspi_winpr.c:1325
SCHANNEL_SecPkgInfoA
const SecPkgInfoA SCHANNEL_SecPkgInfoA
Definition: schannel.c:422
winpr_QuerySecurityPackageInfoW
static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityPackageInfoW(SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo)
Definition: sspi_winpr.c:722
winpr_AcceptSecurityContext
static SECURITY_STATUS SEC_ENTRY winpr_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp)
Definition: sspi_winpr.c:1076
winpr_QueryCredentialsAttributesA
static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: sspi_winpr.c:1040
winpr_QueryCredentialsAttributesW
static SECURITY_STATUS SEC_ENTRY winpr_QueryCredentialsAttributesW(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: sspi_winpr.c:1007
winpr_RevertSecurityContext
static SECURITY_STATUS SEC_ENTRY winpr_RevertSecurityContext(PCtxtHandle phContext)
Definition: sspi_winpr.c:1492
NTLM_SecurityFunctionTableA
const SecurityFunctionTableA NTLM_SecurityFunctionTableA
Definition: winpr/libwinpr/sspi/NTLM/ntlm.c:1266
SCHANNEL_SecurityFunctionTableW
const SecurityFunctionTableW SCHANNEL_SecurityFunctionTableW
Definition: schannel.c:391
winpr_AcquireCredentialsHandleW
static SECURITY_STATUS SEC_ENTRY winpr_AcquireCredentialsHandleW(SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, void *pvLogonID, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: sspi_winpr.c:813
KERBEROS_SecurityFunctionTableW
const SecurityFunctionTableW KERBEROS_SecurityFunctionTableW
Definition: kerberos.c:1607
NULL
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
winpr_CompleteAuthToken
static SECURITY_STATUS SEC_ENTRY winpr_CompleteAuthToken(PCtxtHandle phContext, PSecBufferDesc pToken)
Definition: sspi_winpr.c:1145
_KERBEROS_NAME_W
static const WCHAR _KERBEROS_NAME_W[]
Definition: sspi_winpr.c:77