#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/sspi.h>
#include "schannel.h"
#include "../sspi.h"
#include "../../log.h"
|
SCHANNEL_CONTEXT * | schannel_ContextNew (void) |
|
void | schannel_ContextFree (SCHANNEL_CONTEXT *context) |
|
static SCHANNEL_CREDENTIALS * | schannel_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) |
|
◆ TAG
◆ schannel_AcceptSecurityContext()
◆ schannel_AcquireCredentialsHandleA()
◆ schannel_AcquireCredentialsHandleW()
◆ schannel_ContextFree()
◆ schannel_ContextNew()
◆ schannel_CredentialsFree()
◆ schannel_CredentialsNew()
◆ schannel_DecryptMessage()
◆ schannel_DeleteSecurityContext()
◆ schannel_EncryptMessage()
◆ schannel_FreeCredentialsHandle()
◆ 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 |
◆ 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 |
◆ schannel_MakeSignature()
◆ schannel_QueryContextAttributes()
◆ schannel_QueryCredentialsAttributesA()
◆ schannel_QueryCredentialsAttributesW()
◆ schannel_VerifySignature()
◆ 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
Initial value:= {
0x000107B3,
1,
0x000E,
"Schannel",
"Schannel Security Package"
}
◆ SCHANNEL_SecPkgInfoW
Initial value:= {
0x000107B3,
1,
0x000E,
}
◆ SCHANNEL_SecPkgInfoW_Comment
WCHAR SCHANNEL_SecPkgInfoW_Comment[] |
|
static |
Initial value:= { 'S', 'c', 'h', 'a', 'n', 'n', 'e', 'l', ' ',
'S', 'e', 'c', 'u', 'r', 'i', 't', 'y', ' ',
'P', 'a', 'c', 'k', 'a', 'g', 'e', '\0' }
◆ SCHANNEL_SecPkgInfoW_Name
WCHAR SCHANNEL_SecPkgInfoW_Name[] = { 'S', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '\0' } |
|
static |
◆ SCHANNEL_SecurityFunctionTableA
◆ SCHANNEL_SecurityFunctionTableW
◆ schannel_SupportedAlgs
ALG_ID schannel_SupportedAlgs[] |
|
static |
#define CALG_AES_128
Definition: winpr/include/winpr/crypto.h:199
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)
Definition: schannel.c:246
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: schannel.c:91
static WCHAR SCHANNEL_SecPkgInfoW_Comment[]
Definition: schannel.c:433
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
Definition: schannel.c:121
static SECURITY_STATUS SEC_ENTRY schannel_DeleteSecurityContext(PCtxtHandle phContext)
Definition: schannel.c:272
#define CALG_SHA_512
Definition: winpr/include/winpr/crypto.h:206
#define CALG_MD5
Definition: winpr/include/winpr/crypto.h:158
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)
Definition: schannel.c:163
#define CALG_SHA_384
Definition: winpr/include/winpr/crypto.h:205
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)
Definition: schannel.c:226
static SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
Definition: schannel.c:345
#define CALG_AES_256
Definition: winpr/include/winpr/crypto.h:201
static WCHAR SCHANNEL_SecPkgInfoW_Name[]
Definition: schannel.c:431
#define SCHANNEL_CB_MAX_TOKEN
Definition: libwinpr/sspi/sspi.h:25
#define ALG_TYPE_RESERVED7
Definition: winpr/include/winpr/crypto.h:35
#define CALG_SHA_256
Definition: winpr/include/winpr/crypto.h:204
#define CALG_ECDSA
Definition: winpr/include/winpr/crypto.h:634
static SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
Definition: schannel.c:284
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)
Definition: schannel.c:128
#define ALG_CLASS_KEY_EXCHANGE
Definition: winpr/include/winpr/crypto.h:68
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)
Definition: schannel.c:197
#define CALG_DES
Definition: winpr/include/winpr/crypto.h:168
#define CALG_RSA_SIGN
Definition: winpr/include/winpr/crypto.h:162
static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, ULONG *pfQOP)
Definition: schannel.c:323
#define CALG_DSS_SIGN
Definition: winpr/include/winpr/crypto.h:163
static SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCredential)
Definition: schannel.c:181
#define CALG_SHA1
Definition: winpr/include/winpr/crypto.h:160
#define CALG_DH_EPHEM
Definition: winpr/include/winpr/crypto.h:176
#define CALG_3DES
Definition: winpr/include/winpr/crypto.h:170
#define CALG_RC4
Definition: winpr/include/winpr/crypto.h:173
static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: schannel.c:317
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
Definition: schannel.c:330