Blame winpr/libwinpr/sspi/sspi.h

Packit 1fb8d4
/**
Packit 1fb8d4
 * WinPR: Windows Portable Runtime
Packit 1fb8d4
 * Security Support Provider Interface (SSPI)
Packit 1fb8d4
 *
Packit 1fb8d4
 * Copyright 2012-2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit 1fb8d4
 *
Packit 1fb8d4
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit 1fb8d4
 * you may not use this file except in compliance with the License.
Packit 1fb8d4
 * You may obtain a copy of the License at
Packit 1fb8d4
 *
Packit 1fb8d4
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 1fb8d4
 *
Packit 1fb8d4
 * Unless required by applicable law or agreed to in writing, software
Packit 1fb8d4
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 1fb8d4
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 1fb8d4
 * See the License for the specific language governing permissions and
Packit 1fb8d4
 * limitations under the License.
Packit 1fb8d4
 */
Packit 1fb8d4
Packit 1fb8d4
#ifndef WINPR_SSPI_PRIVATE_H
Packit 1fb8d4
#define WINPR_SSPI_PRIVATE_H
Packit 1fb8d4
Packit 1fb8d4
#include <winpr/sspi.h>
Packit 1fb8d4
Packit Service 5a9772
#define SCHANNEL_CB_MAX_TOKEN 0x00006000
Packit 1fb8d4
Packit Service 5a9772
#define SSPI_CREDENTIALS_PASSWORD_HASH 0x00000001
Packit 1fb8d4
Packit Service 5a9772
#define SSPI_CREDENTIALS_HASH_LENGTH_OFFSET 512
Packit 1fb8d4
Packit 1fb8d4
struct _SSPI_CREDENTIALS
Packit 1fb8d4
{
Packit 1fb8d4
	DWORD flags;
Packit 1fb8d4
	ULONG fCredentialUse;
Packit 1fb8d4
	SEC_GET_KEY_FN pGetKeyFn;
Packit 1fb8d4
	void* pvGetKeyArgument;
Packit 1fb8d4
	SEC_WINNT_AUTH_IDENTITY identity;
Packit 1fb8d4
};
Packit 1fb8d4
typedef struct _SSPI_CREDENTIALS SSPI_CREDENTIALS;
Packit 1fb8d4
Packit 1fb8d4
SSPI_CREDENTIALS* sspi_CredentialsNew(void);
Packit 1fb8d4
void sspi_CredentialsFree(SSPI_CREDENTIALS* credentials);
Packit 1fb8d4
Packit 1fb8d4
PSecBuffer sspi_FindSecBuffer(PSecBufferDesc pMessage, ULONG BufferType);
Packit 1fb8d4
Packit 1fb8d4
SecHandle* sspi_SecureHandleAlloc(void);
Packit 1fb8d4
void sspi_SecureHandleInvalidate(SecHandle* handle);
Packit 1fb8d4
void* sspi_SecureHandleGetLowerPointer(SecHandle* handle);
Packit 1fb8d4
void sspi_SecureHandleSetLowerPointer(SecHandle* handle, void* pointer);
Packit 1fb8d4
void* sspi_SecureHandleGetUpperPointer(SecHandle* handle);
Packit 1fb8d4
void sspi_SecureHandleSetUpperPointer(SecHandle* handle, void* pointer);
Packit 1fb8d4
void sspi_SecureHandleFree(SecHandle* handle);
Packit 1fb8d4
Packit 1fb8d4
enum SecurityFunctionTableIndex
Packit 1fb8d4
{
Packit Service 5a9772
	EnumerateSecurityPackagesIndex = 1,
Packit Service 5a9772
	Reserved1Index = 2,
Packit Service 5a9772
	QueryCredentialsAttributesIndex = 3,
Packit Service 5a9772
	AcquireCredentialsHandleIndex = 4,
Packit Service 5a9772
	FreeCredentialsHandleIndex = 5,
Packit Service 5a9772
	Reserved2Index = 6,
Packit Service 5a9772
	InitializeSecurityContextIndex = 7,
Packit Service 5a9772
	AcceptSecurityContextIndex = 8,
Packit Service 5a9772
	CompleteAuthTokenIndex = 9,
Packit Service 5a9772
	DeleteSecurityContextIndex = 10,
Packit Service 5a9772
	ApplyControlTokenIndex = 11,
Packit Service 5a9772
	QueryContextAttributesIndex = 12,
Packit Service 5a9772
	ImpersonateSecurityContextIndex = 13,
Packit Service 5a9772
	RevertSecurityContextIndex = 14,
Packit Service 5a9772
	MakeSignatureIndex = 15,
Packit Service 5a9772
	VerifySignatureIndex = 16,
Packit Service 5a9772
	FreeContextBufferIndex = 17,
Packit Service 5a9772
	QuerySecurityPackageInfoIndex = 18,
Packit Service 5a9772
	Reserved3Index = 19,
Packit Service 5a9772
	Reserved4Index = 20,
Packit Service 5a9772
	ExportSecurityContextIndex = 21,
Packit Service 5a9772
	ImportSecurityContextIndex = 22,
Packit Service 5a9772
	AddCredentialsIndex = 23,
Packit Service 5a9772
	Reserved8Index = 24,
Packit Service 5a9772
	QuerySecurityContextTokenIndex = 25,
Packit Service 5a9772
	EncryptMessageIndex = 26,
Packit Service 5a9772
	DecryptMessageIndex = 27,
Packit Service 5a9772
	SetContextAttributesIndex = 28
Packit 1fb8d4
};
Packit 1fb8d4
Packit 1fb8d4
BOOL IsSecurityStatusError(SECURITY_STATUS status);
Packit 1fb8d4
Packit 1fb8d4
#include "sspi_gss.h"
Packit 1fb8d4
#include "sspi_winpr.h"
Packit 1fb8d4
Packit 1fb8d4
#endif /* WINPR_SSPI_PRIVATE_H */