FreeRDP
credssp.c File Reference
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/sspi.h>
#include "credssp.h"
#include "../sspi.h"
#include "../../log.h"

Macros

#define TAG   WINPR_TAG("sspi.CredSSP")
 

Functions

static SECURITY_STATUS SEC_ENTRY credssp_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 credssp_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)
 
CREDSSP_CONTEXTcredssp_ContextNew (void)
 
void credssp_ContextFree (CREDSSP_CONTEXT *context)
 
static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY credssp_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 credssp_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 credssp_QueryCredentialsAttributesW (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY credssp_FreeCredentialsHandle (PCredHandle phCredential)
 
static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
 
static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
 

Variables

static const char * CREDSSP_PACKAGE_NAME = "CredSSP"
 
const SecurityFunctionTableA CREDSSP_SecurityFunctionTableA
 
const SecurityFunctionTableW CREDSSP_SecurityFunctionTableW
 
const SecPkgInfoA CREDSSP_SecPkgInfoA
 
static WCHAR CREDSSP_SecPkgInfoW_Name [] = { 'C', 'R', 'E', 'D', 'S', 'S', 'P', '\0' }
 
static WCHAR CREDSSP_SecPkgInfoW_Comment []
 
const SecPkgInfoW CREDSSP_SecPkgInfoW
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("sspi.CredSSP")

WinPR: Windows Portable Runtime Credential Security Support Provider (CredSSP)

Copyright 2010-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.

Function Documentation

◆ credssp_AcquireCredentialsHandleA()

static SECURITY_STATUS SEC_ENTRY credssp_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:

◆ credssp_AcquireCredentialsHandleW()

static SECURITY_STATUS SEC_ENTRY credssp_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

◆ credssp_ContextFree()

void credssp_ContextFree ( CREDSSP_CONTEXT context)
Here is the caller graph for this function:

◆ credssp_ContextNew()

CREDSSP_CONTEXT* credssp_ContextNew ( void  )
Here is the caller graph for this function:

◆ credssp_DecryptMessage()

static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage ( PCtxtHandle  phContext,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo,
ULONG *  pfQOP 
)
static

◆ credssp_EncryptMessage()

static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage ( PCtxtHandle  phContext,
ULONG  fQOP,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo 
)
static

◆ credssp_FreeCredentialsHandle()

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

◆ credssp_InitializeSecurityContextA()

static SECURITY_STATUS SEC_ENTRY credssp_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:

◆ credssp_InitializeSecurityContextW()

static SECURITY_STATUS SEC_ENTRY credssp_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

◆ credssp_MakeSignature()

static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature ( PCtxtHandle  phContext,
ULONG  fQOP,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo 
)
static

◆ credssp_QueryContextAttributes()

static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void *  pBuffer 
)
static

◆ credssp_QueryCredentialsAttributesA()

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

◆ credssp_QueryCredentialsAttributesW()

static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW ( PCredHandle  phCredential,
ULONG  ulAttribute,
void *  pBuffer 
)
static

◆ credssp_VerifySignature()

static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature ( PCtxtHandle  phContext,
PSecBufferDesc  pMessage,
ULONG  MessageSeqNo,
ULONG *  pfQOP 
)
static

Variable Documentation

◆ CREDSSP_PACKAGE_NAME

const char* CREDSSP_PACKAGE_NAME = "CredSSP"
static

◆ CREDSSP_SecPkgInfoA

const SecPkgInfoA CREDSSP_SecPkgInfoA
Initial value:
= {
0x000110733,
1,
0xFFFF,
0x000090A8,
"CREDSSP",
"Microsoft CredSSP Security Provider"
}

◆ CREDSSP_SecPkgInfoW

const SecPkgInfoW CREDSSP_SecPkgInfoW
Initial value:
= {
0x000110733,
1,
0xFFFF,
0x000090A8,
}

◆ CREDSSP_SecPkgInfoW_Comment

WCHAR CREDSSP_SecPkgInfoW_Comment[]
static
Initial value:
= { 'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', 't',
' ', 'C', 'r', 'e', 'd', 'S', 'S', 'P', ' ',
'S', 'e', 'c', 'u', 'r', 'i', 't', 'y', ' ',
'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\0' }

◆ CREDSSP_SecPkgInfoW_Name

WCHAR CREDSSP_SecPkgInfoW_Name[] = { 'C', 'R', 'E', 'D', 'S', 'S', 'P', '\0' }
static

◆ CREDSSP_SecurityFunctionTableA

◆ CREDSSP_SecurityFunctionTableW

credssp_QueryCredentialsAttributesA
static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: credssp.c:160
credssp_EncryptMessage
static SECURITY_STATUS SEC_ENTRY credssp_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: credssp.c:195
credssp_QueryContextAttributes
static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
Definition: credssp.c:97
credssp_AcquireCredentialsHandleW
static SECURITY_STATUS SEC_ENTRY credssp_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: credssp.c:110
credssp_QueryCredentialsAttributesW
static SECURITY_STATUS SEC_ENTRY credssp_QueryCredentialsAttributesW(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: credssp.c:152
credssp_FreeCredentialsHandle
static SECURITY_STATUS SEC_ENTRY credssp_FreeCredentialsHandle(PCredHandle phCredential)
Definition: credssp.c:179
CREDSSP_SecPkgInfoW_Comment
static WCHAR CREDSSP_SecPkgInfoW_Comment[]
Definition: credssp.c:298
credssp_InitializeSecurityContextA
static SECURITY_STATUS SEC_ENTRY credssp_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: credssp.c:43
credssp_DecryptMessage
static SECURITY_STATUS SEC_ENTRY credssp_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
Definition: credssp.c:202
CREDSSP_SecPkgInfoW_Name
static WCHAR CREDSSP_SecPkgInfoW_Name[]
Definition: credssp.c:296
credssp_AcquireCredentialsHandleA
static SECURITY_STATUS SEC_ENTRY credssp_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: credssp.c:119
credssp_VerifySignature
static SECURITY_STATUS SEC_ENTRY credssp_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
Definition: credssp.c:217
credssp_InitializeSecurityContextW
static SECURITY_STATUS SEC_ENTRY credssp_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: credssp.c:34
NULL
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
credssp_MakeSignature
static SECURITY_STATUS SEC_ENTRY credssp_MakeSignature(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: credssp.c:210