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

Macros

#define TAG   WINPR_TAG("sspi.Schannel")
 

Functions

SCHANNEL_CONTEXTschannel_ContextNew (void)
 
void schannel_ContextFree (SCHANNEL_CONTEXT *context)
 
static SCHANNEL_CREDENTIALSschannel_CredentialsNew (void)
 
static void schannel_CredentialsFree (SCHANNEL_CREDENTIALS *credentials)
 
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesA (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY schannel_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 schannel_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 schannel_FreeCredentialsHandle (PCredHandle phCredential)
 
static SECURITY_STATUS SEC_ENTRY schannel_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 schannel_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 schannel_AcceptSecurityContext (PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsTimeStamp)
 
static SECURITY_STATUS SEC_ENTRY schannel_DeleteSecurityContext (PCtxtHandle phContext)
 
static SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
 
static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
 
static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage (PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
 
static SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage (PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
 
BOOL SCHANNEL_init (void)
 

Variables

static char * SCHANNEL_PACKAGE_NAME = "Schannel"
 
static ALG_ID schannel_SupportedAlgs []
 
const SecurityFunctionTableA SCHANNEL_SecurityFunctionTableA
 
const SecurityFunctionTableW SCHANNEL_SecurityFunctionTableW
 
const SecPkgInfoA SCHANNEL_SecPkgInfoA
 
static WCHAR SCHANNEL_SecPkgInfoW_NameBuffer [32] = { 0 }
 
static WCHAR SCHANNEL_SecPkgInfoW_CommentBuffer [32] = { 0 }
 
const SecPkgInfoW SCHANNEL_SecPkgInfoW
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("sspi.Schannel")

Function Documentation

◆ schannel_AcceptSecurityContext()

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

◆ schannel_AcquireCredentialsHandleA()

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

◆ schannel_AcquireCredentialsHandleW()

static SECURITY_STATUS SEC_ENTRY schannel_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:
Here is the caller graph for this function:

◆ schannel_ContextFree()

void schannel_ContextFree ( SCHANNEL_CONTEXT context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ schannel_ContextNew()

SCHANNEL_CONTEXT* schannel_ContextNew ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ schannel_CredentialsFree()

static void schannel_CredentialsFree ( SCHANNEL_CREDENTIALS credentials)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ schannel_CredentialsNew()

static SCHANNEL_CREDENTIALS* schannel_CredentialsNew ( void  )
static
Here is the caller graph for this function:

◆ schannel_DecryptMessage()

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

◆ schannel_DeleteSecurityContext()

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

◆ schannel_EncryptMessage()

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

◆ schannel_FreeCredentialsHandle()

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

◆ SCHANNEL_init()

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

◆ schannel_InitializeSecurityContextA()

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

◆ schannel_InitializeSecurityContextW()

static SECURITY_STATUS SEC_ENTRY schannel_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:
Here is the caller graph for this function:

◆ schannel_MakeSignature()

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

◆ schannel_QueryContextAttributes()

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

◆ schannel_QueryCredentialsAttributesA()

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

◆ schannel_QueryCredentialsAttributesW()

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

◆ schannel_VerifySignature()

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

Variable Documentation

◆ SCHANNEL_PACKAGE_NAME

char* SCHANNEL_PACKAGE_NAME = "Schannel"
static

WinPR: Windows Portable Runtime Schannel Security Package

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.

◆ SCHANNEL_SecPkgInfoA

const SecPkgInfoA SCHANNEL_SecPkgInfoA
Initial value:
= {
0x000107B3,
1,
0x000E,
"Schannel",
"Schannel Security Package"
}
#define SCHANNEL_CB_MAX_TOKEN
Definition: libwinpr/sspi/sspi.h:25

◆ SCHANNEL_SecPkgInfoW

const SecPkgInfoW SCHANNEL_SecPkgInfoW
Initial value:
= {
0x000107B3,
1,
0x000E,
}
static WCHAR SCHANNEL_SecPkgInfoW_NameBuffer[32]
Definition: schannel.c:448
static WCHAR SCHANNEL_SecPkgInfoW_CommentBuffer[32]
Definition: schannel.c:449

◆ SCHANNEL_SecPkgInfoW_CommentBuffer

WCHAR SCHANNEL_SecPkgInfoW_CommentBuffer[32] = { 0 }
static

◆ SCHANNEL_SecPkgInfoW_NameBuffer

WCHAR SCHANNEL_SecPkgInfoW_NameBuffer[32] = { 0 }
static

◆ SCHANNEL_SecurityFunctionTableA

const SecurityFunctionTableA SCHANNEL_SecurityFunctionTableA

◆ SCHANNEL_SecurityFunctionTableW

const SecurityFunctionTableW SCHANNEL_SecurityFunctionTableW

◆ schannel_SupportedAlgs

ALG_ID schannel_SupportedAlgs[]
static
Initial value:
6),
#define CALG_AES_128
Definition: wincrypt.h:199
#define CALG_SHA1
Definition: wincrypt.h:160
#define CALG_RSA_SIGN
Definition: wincrypt.h:162
#define ALG_CLASS_KEY_EXCHANGE
Definition: wincrypt.h:68
#define CALG_SHA_384
Definition: wincrypt.h:205
#define CALG_RC4
Definition: wincrypt.h:173
#define CALG_MD5
Definition: wincrypt.h:158
#define CALG_SHA_256
Definition: wincrypt.h:204
#define CALG_AES_256
Definition: wincrypt.h:201
#define CALG_ECDSA
Definition: wincrypt.h:735
#define CALG_3DES
Definition: wincrypt.h:170
#define ALG_TYPE_RESERVED7
Definition: wincrypt.h:35
#define CALG_DH_EPHEM
Definition: wincrypt.h:176
#define CALG_DES
Definition: wincrypt.h:168
#define CALG_SHA_512
Definition: wincrypt.h:206
#define CALG_DSS_SIGN
Definition: wincrypt.h:163