Implemented Credential acquisition and release.

This commit is contained in:
antiduh
2014-06-19 02:26:30 +00:00
parent 22c6a5d3f9
commit f96ef74e9b
8 changed files with 168 additions and 21 deletions

34
SecurityStatus.cs Normal file
View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NSspi
{
/*
// From winerror.h
#define SEC_E_OK ((HRESULT)0x00000000L)
#define SEC_E_INSUFFICIENT_MEMORY _HRESULT_TYPEDEF_(0x80090300L)
#define SEC_E_INVALID_HANDLE _HRESULT_TYPEDEF_(0x80090301L)
#define SEC_E_UNSUPPORTED_FUNCTION _HRESULT_TYPEDEF_(0x80090302L)
#define SEC_E_TARGET_UNKNOWN _HRESULT_TYPEDEF_(0x80090303L)
#define SEC_E_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80090304L)
#define SEC_E_SECPKG_NOT_FOUND _HRESULT_TYPEDEF_(0x80090305L)
#define SEC_E_NOT_OWNER _HRESULT_TYPEDEF_(0x80090306L)
#define SEC_E_UNKNOWN_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030DL)
#define SEC_E_NO_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030EL)
*/
public enum SecurityStatus : uint
{
Success = 0,
InsufficientMemory = 0x80090300,
InvalidHandle = 0x80090301,
InternalError = 0x80090304,
SecPkgNotFound = 0x80090305,
NotOwner = 0x80090306,
NoCredentials = 0x8009030E,
UnknownCredentials = 0x8009030D
}
}