ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

sspi.h
Go to the documentation of this file.
00001 #ifndef __SSPI_H__
00002 #define __SSPI_H__
00003 
00004 // for ntifs.h:
00005 #define ISSP_LEVEL 32
00006 #define ISSP_MODE 0
00007 
00008 #ifdef MIDL_PASS
00009 #define MIDL_PROP(x) x
00010 #else
00011 #define MIDL_PROP(x)
00012 #endif
00013 
00014 #define SEC_TEXT TEXT
00015 #define SEC_FAR
00016 #define SEC_ENTRY __stdcall
00017 
00018 #if defined(_NO_KSECDD_IMPORT_)
00019 #define KSECDDDECLSPEC
00020 #else
00021 #define KSECDDDECLSPEC __declspec(dllimport)
00022 #endif
00023 
00024 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
00025 #define SECQOP_WRAP_OOB_DATA   0x40000000
00026 
00027 #define SECURITY_ENTRYPOINTW SEC_TEXT("InitSecurityInterfaceW")
00028 #define SECURITY_ENTRYPOINT SECURITY_ENTRYPOINTW
00029 
00030 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION   1
00031 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
00032 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_3 3
00033 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_4 4
00034 
00035 #define SECURITY_NATIVE_DREP  0x00000010
00036 #define SECURITY_NETWORK_DREP 0x00000000
00037 
00038 #define SECPKG_ID_NONE 0xFFFF
00039 
00040 #define SECPKG_CRED_ATTR_NAMES                1
00041 #define SECPKG_CRED_ATTR_SSI_PROVIDER         2
00042 
00043 #define SECPKG_ATTR_SIZES                     0
00044 #define SECPKG_ATTR_NAMES                     1
00045 #define SECPKG_ATTR_LIFESPAN                  2
00046 #define SECPKG_ATTR_DCE_INFO                  3
00047 #define SECPKG_ATTR_STREAM_SIZES              4
00048 #define SECPKG_ATTR_KEY_INFO                  5
00049 #define SECPKG_ATTR_AUTHORITY                 6
00050 #define SECPKG_ATTR_PROTO_INFO                7
00051 #define SECPKG_ATTR_PASSWORD_EXPIRY           8
00052 #define SECPKG_ATTR_SESSION_KEY               9
00053 #define SECPKG_ATTR_PACKAGE_INFO             10
00054 #define SECPKG_ATTR_USER_FLAGS               11
00055 #define SECPKG_ATTR_NEGOTIATION_INFO         12
00056 #define SECPKG_ATTR_NATIVE_NAMES             13
00057 #define SECPKG_ATTR_FLAGS                    14
00058 #define SECPKG_ATTR_USE_VALIDATED            15
00059 #define SECPKG_ATTR_CREDENTIAL_NAME          16
00060 #define SECPKG_ATTR_TARGET_INFORMATION       17
00061 #define SECPKG_ATTR_ACCESS_TOKEN             18
00062 #define SECPKG_ATTR_TARGET                   19
00063 #define SECPKG_ATTR_AUTHENTICATION_ID        20
00064 #define SECPKG_ATTR_LOGOFF_TIME              21
00065 #define SECPKG_ATTR_NEGO_KEYS                22
00066 #define SECPKG_ATTR_PROMPTING_NEEDED         24
00067 #define SECPKG_ATTR_UNIQUE_BINDINGS          25
00068 #define SECPKG_ATTR_ENDPOINT_BINDINGS        26
00069 #define SECPKG_ATTR_CLIENT_SPECIFIED_TARGET  27
00070 #define SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS 30
00071 #define SECPKG_ATTR_NEGO_PKG_INFO            31
00072 #define SECPKG_ATTR_NEGO_STATUS              32
00073 #define SECPKG_ATTR_CONTEXT_DELETED          33
00074 
00075 #define SECPKG_FLAG_INTEGRITY               0x00000001
00076 #define SECPKG_FLAG_PRIVACY                 0x00000002
00077 #define SECPKG_FLAG_TOKEN_ONLY              0x00000004
00078 #define SECPKG_FLAG_DATAGRAM                0x00000008
00079 #define SECPKG_FLAG_CONNECTION              0x00000010
00080 #define SECPKG_FLAG_MULTI_REQUIRED          0x00000020
00081 #define SECPKG_FLAG_CLIENT_ONLY             0x00000040
00082 #define SECPKG_FLAG_EXTENDED_ERROR          0x00000080
00083 #define SECPKG_FLAG_IMPERSONATION           0x00000100
00084 #define SECPKG_FLAG_ACCEPT_WIN32_NAME       0x00000200
00085 #define SECPKG_FLAG_STREAM                  0x00000400
00086 #define SECPKG_FLAG_NEGOTIABLE              0x00000800
00087 #define SECPKG_FLAG_GSS_COMPATIBLE          0x00001000
00088 #define SECPKG_FLAG_LOGON                   0x00002000
00089 #define SECPKG_FLAG_ASCII_BUFFERS           0x00004000
00090 #define SECPKG_FLAG_FRAGMENT                0x00008000
00091 #define SECPKG_FLAG_MUTUAL_AUTH             0x00010000
00092 #define SECPKG_FLAG_DELEGATION              0x00020000
00093 #define SECPKG_FLAG_READONLY_WITH_CHECKSUM  0x00040000
00094 #define SECPKG_FLAG_RESTRICTED_TOKENS       0x00080000
00095 #define SECPKG_FLAG_NEGO_EXTENDER           0x00100000
00096 #define SECPKG_FLAG_NEGOTIABLE2             0x00200000
00097 
00098 #define SECPKG_CRED_INBOUND                 0x00000001
00099 #define SECPKG_CRED_OUTBOUND                0x00000002
00100 #define SECPKG_CRED_BOTH                    0x00000003
00101 #define SECPKG_CRED_DEFAULT                 0x00000004
00102 #define SECPKG_CRED_RESERVED                0xF0000000
00103 #define SECPKG_CRED_AUTOLOGON_RESTRICTED    0x00000010
00104 #define SECPKG_CRED_PROCESS_POLICY_ONLY     0x00000020
00105 
00106 #define SECPKG_CONTEXT_EXPORT_RESET_NEW     0x00000001
00107 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD    0x00000002
00108 #define SECPKG_CONTEXT_EXPORT_TO_KERNEL     0x00000004
00109 
00110 #define SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES 128
00111 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS 0x1
00112 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM     0x2
00113 
00114 #define SecPkgContext_NativeNames SecPkgContext_NativeNamesW
00115 #define PSecPkgContext_NativeNames PSecPkgContext_NativeNamesW
00116 
00117 #define SECBUFFER_VERSION 0
00118 
00119 #define SECBUFFER_EMPTY                 0
00120 #define SECBUFFER_DATA                  1
00121 #define SECBUFFER_TOKEN                 2
00122 #define SECBUFFER_PKG_PARAMS            3
00123 #define SECBUFFER_MISSING               4
00124 #define SECBUFFER_EXTRA                 5
00125 #define SECBUFFER_STREAM_TRAILER        6
00126 #define SECBUFFER_STREAM_HEADER         7
00127 #define SECBUFFER_NEGOTIATION_INFO      8
00128 #define SECBUFFER_PADDING               9
00129 #define SECBUFFER_STREAM               10
00130 #define SECBUFFER_MECHLIST             11
00131 #define SECBUFFER_MECHLIST_SIGNATURE   12
00132 #define SECBUFFER_TARGET               13
00133 #define SECBUFFER_CHANNEL_BINDINGS     14
00134 #define SECBUFFER_CHANGE_PASS_RESPONSE 15
00135 #define SECBUFFER_TARGET_HOST          16
00136 #define SECBUFFER_ALERT                17
00137 
00138 #define SECBUFFER_ATTRMASK                0xF0000000
00139 #define SECBUFFER_READONLY                0x80000000
00140 #define SECBUFFER_READONLY_WITH_CHECKSUM  0x10000000
00141 #define SECBUFFER_RESERVED                0x60000000
00142 
00143 #define ISC_REQ_DELEGATE                 0x00000001
00144 #define ISC_REQ_MUTUAL_AUTH              0x00000002
00145 #define ISC_REQ_REPLAY_DETECT            0x00000004
00146 #define ISC_REQ_SEQUENCE_DETECT          0x00000008
00147 #define ISC_REQ_CONFIDENTIALITY          0x00000010
00148 #define ISC_REQ_USE_SESSION_KEY          0x00000020
00149 #define ISC_REQ_PROMPT_FOR_CREDS         0x00000040
00150 #define ISC_REQ_USE_SUPPLIED_CREDS       0x00000080
00151 #define ISC_REQ_ALLOCATE_MEMORY          0x00000100
00152 #define ISC_REQ_USE_DCE_STYLE            0x00000200
00153 #define ISC_REQ_DATAGRAM                 0x00000400
00154 #define ISC_REQ_CONNECTION               0x00000800
00155 #define ISC_REQ_CALL_LEVEL               0x00001000
00156 #define ISC_REQ_FRAGMENT_SUPPLIED        0x00002000
00157 #define ISC_REQ_EXTENDED_ERROR           0x00004000
00158 #define ISC_REQ_STREAM                   0x00008000
00159 #define ISC_REQ_INTEGRITY                0x00010000
00160 #define ISC_REQ_IDENTIFY                 0x00020000
00161 #define ISC_REQ_NULL_SESSION             0x00040000
00162 #define ISC_REQ_MANUAL_CRED_VALIDATION   0x00080000
00163 #define ISC_REQ_RESERVED1                0x00100000
00164 #define ISC_REQ_FRAGMENT_TO_FIT          0x00200000
00165 #define ISC_REQ_FORWARD_CREDENTIALS      0x00400000
00166 #define ISC_REQ_NO_INTEGRITY             0x00800000
00167 #define ISC_REQ_USE_HTTP_STYLE           0x01000000
00168 
00169 #define ISC_RET_DELEGATE                 0x00000001
00170 #define ISC_RET_MUTUAL_AUTH              0x00000002
00171 #define ISC_RET_REPLAY_DETECT            0x00000004
00172 #define ISC_RET_SEQUENCE_DETECT          0x00000008
00173 #define ISC_RET_CONFIDENTIALITY          0x00000010
00174 #define ISC_RET_USE_SESSION_KEY          0x00000020
00175 #define ISC_RET_USED_COLLECTED_CREDS     0x00000040
00176 #define ISC_RET_USED_SUPPLIED_CREDS      0x00000080
00177 #define ISC_RET_ALLOCATED_MEMORY         0x00000100
00178 #define ISC_RET_USED_DCE_STYLE           0x00000200
00179 #define ISC_RET_DATAGRAM                 0x00000400
00180 #define ISC_RET_CONNECTION               0x00000800
00181 #define ISC_RET_INTERMEDIATE_RETURN      0x00001000
00182 #define ISC_RET_CALL_LEVEL               0x00002000
00183 #define ISC_RET_EXTENDED_ERROR           0x00004000
00184 #define ISC_RET_STREAM                   0x00008000
00185 #define ISC_RET_INTEGRITY                0x00010000
00186 #define ISC_RET_IDENTIFY                 0x00020000
00187 #define ISC_RET_NULL_SESSION             0x00040000
00188 #define ISC_RET_MANUAL_CRED_VALIDATION   0x00080000
00189 #define ISC_RET_RESERVED1                0x00100000
00190 #define ISC_RET_FRAGMENT_ONLY            0x00200000
00191 #define ISC_RET_FORWARD_CREDENTIALS      0x00400000
00192 #define ISC_RET_USED_HTTP_STYLE          0x01000000
00193 #define ISC_RET_NO_ADDITIONAL_TOKEN      0x02000000
00194 #define ISC_RET_REAUTHENTICATION         0x08000000
00195 
00196 #define ASC_REQ_DELEGATE                 0x00000001
00197 #define ASC_REQ_MUTUAL_AUTH              0x00000002
00198 #define ASC_REQ_REPLAY_DETECT            0x00000004
00199 #define ASC_REQ_SEQUENCE_DETECT          0x00000008
00200 #define ASC_REQ_CONFIDENTIALITY          0x00000010
00201 #define ASC_REQ_USE_SESSION_KEY          0x00000020
00202 #define ASC_REQ_ALLOCATE_MEMORY          0x00000100
00203 #define ASC_REQ_USE_DCE_STYLE            0x00000200
00204 #define ASC_REQ_DATAGRAM                 0x00000400
00205 #define ASC_REQ_CONNECTION               0x00000800
00206 #define ASC_REQ_CALL_LEVEL               0x00001000
00207 #define ASC_REQ_EXTENDED_ERROR           0x00008000
00208 #define ASC_REQ_STREAM                   0x00010000
00209 #define ASC_REQ_INTEGRITY                0x00020000
00210 #define ASC_REQ_LICENSING                0x00040000
00211 #define ASC_REQ_IDENTIFY                 0x00080000
00212 #define ASC_REQ_ALLOW_NULL_SESSION       0x00100000
00213 #define ASC_REQ_ALLOW_NON_USER_LOGONS    0x00200000
00214 #define ASC_REQ_ALLOW_CONTEXT_REPLAY     0x00400000
00215 #define ASC_REQ_FRAGMENT_TO_FIT          0x00800000
00216 #define ASC_REQ_FRAGMENT_SUPPLIED        0x00002000
00217 #define ASC_REQ_NO_TOKEN                 0x01000000
00218 #define ASC_REQ_PROXY_BINDINGS           0x04000000
00219 //#define SSP_RET_REAUTHENTICATION         0x08000000 // internal
00220 
00221 #define ASC_REQ_ALLOW_MISSING_BINDINGS   0x10000000
00222 #define ASC_RET_DELEGATE                 0x00000001
00223 #define ASC_RET_MUTUAL_AUTH              0x00000002
00224 #define ASC_RET_REPLAY_DETECT            0x00000004
00225 #define ASC_RET_SEQUENCE_DETECT          0x00000008
00226 #define ASC_RET_CONFIDENTIALITY          0x00000010
00227 #define ASC_RET_USE_SESSION_KEY          0x00000020
00228 #define ASC_RET_ALLOCATED_MEMORY         0x00000100
00229 #define ASC_RET_USED_DCE_STYLE           0x00000200
00230 #define ASC_RET_DATAGRAM                 0x00000400
00231 #define ASC_RET_CONNECTION               0x00000800
00232 #define ASC_RET_CALL_LEVEL               0x00002000
00233 #define ASC_RET_THIRD_LEG_FAILED         0x00004000
00234 #define ASC_RET_EXTENDED_ERROR           0x00008000
00235 #define ASC_RET_STREAM                   0x00010000
00236 #define ASC_RET_INTEGRITY                0x00020000
00237 #define ASC_RET_LICENSING                0x00040000
00238 #define ASC_RET_IDENTIFY                 0x00080000
00239 #define ASC_RET_NULL_SESSION             0x00100000
00240 #define ASC_RET_ALLOW_NON_USER_LOGONS    0x00200000
00241 #define ASC_RET_ALLOW_CONTEXT_REPLAY     0x00400000
00242 #define ASC_RET_FRAGMENT_ONLY            0x00800000
00243 #define ASC_RET_NO_TOKEN                 0x01000000
00244 #define ASC_RET_NO_ADDITIONAL_TOKEN      0x02000000
00245 #define ASC_RET_NO_PROXY_BINDINGS        0x04000000
00246 //#define SSP_RET_REAUTHENTICATION         0x08000000 // internal
00247 #define ASC_RET_MISSING_BINDINGS         0x10000000
00248 
00249 #define SEC_DELETED_HANDLE ((ULONG_PTR)(-2))
00250 
00251 #define SecInvalidateHandle(x) \
00252     ((PSecHandle)(x))->dwLower = ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1));
00253 
00254 #define SecIsValidHandle(x) \
00255     ( ( ((PSecHandle)(x))->dwLower != (ULONG_PTR)(INT_PTR)-1 ) && \
00256       ( ((PSecHandle)(x))->dwUpper != (ULONG_PTR)(INT_PTR)-1 ) )
00257 
00258 typedef WCHAR SEC_WCHAR;
00259 typedef CHAR SEC_CHAR;
00260 typedef LARGE_INTEGER _SECURITY_INTEGER, SECURITY_INTEGER, *PSECURITY_INTEGER;
00261 typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
00262 typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
00263 #if ISSP_MODE == 0
00264 #define PSSPI_SEC_STRING PSECURITY_STRING
00265 #else
00266 #define PSSPI_SEC_STRING SEC_WCHAR*
00267 #endif
00268 
00269 typedef PVOID PSEC_WINNT_AUTH_IDENTITY_OPAQUE;
00270 
00271 #ifndef __SECSTATUS_DEFINED__
00272 typedef LONG SECURITY_STATUS;
00273 #define __SECSTATUS_DEFINED__
00274 #endif
00275 
00276 typedef enum _SECPKG_CRED_CLASS
00277 {
00278     SecPkgCredClass_None = 0,
00279     SecPkgCredClass_Ephemeral = 10,
00280     SecPkgCredClass_PersistedGeneric = 20,
00281     SecPkgCredClass_PersistedSpecific = 30,
00282     SecPkgCredClass_Explicit = 40,
00283 } SECPKG_CRED_CLASS, *PSECPKG_CRED_CLASS;
00284 
00285 typedef struct _SEC_NEGOTIATION_INFO
00286 {
00287     ULONG Size;
00288     ULONG NameLength;
00289     SEC_WCHAR *Name;
00290     PVOID Reserved;
00291 } SEC_NEGOTIATION_INFO, *PSEC_NEGOTIATION_INFO;
00292 
00293 typedef struct _SEC_CHANNEL_BINDINGS
00294 {
00295     ULONG dwInitiatorAddrType;
00296     ULONG cbInitiatorLength;
00297     ULONG dwInitiatorOffset;
00298     ULONG dwAcceptorAddrType;
00299     ULONG cbAcceptorLength;
00300     ULONG dwAcceptorOffset;
00301     ULONG cbApplicationDataLength;
00302     ULONG dwApplicationDataOffset;
00303 } SEC_CHANNEL_BINDINGS, *PSEC_CHANNEL_BINDINGS;
00304 
00305 #ifndef _AUTH_IDENTITY_EX2_DEFINED
00306 #define _AUTH_IDENTITY_EX2_DEFINED
00307 typedef struct _SEC_WINNT_AUTH_IDENTITY_EX2
00308 {
00309     ULONG Version;
00310     USHORT cbHeaderLength;
00311     ULONG cbStructureLength;
00312     ULONG UserOffset;
00313     USHORT UserLength;
00314     ULONG DomainOffset;
00315     USHORT DomainLength;
00316     ULONG PackedCredentialsOffset;
00317     USHORT PackedCredentialsLength;
00318     ULONG Flags;
00319     ULONG PackageListOffset;
00320     USHORT PackageListLength;
00321 } SEC_WINNT_AUTH_IDENTITY_EX2, *PSEC_WINNT_AUTH_IDENTITY_EX2;
00322 #define SEC_WINNT_AUTH_IDENTITY_VERSION_2 0x201
00323 #endif
00324 
00325 #ifndef _AUTH_IDENTITY_DEFINED
00326 #define _AUTH_IDENTITY_DEFINED
00327 typedef struct _SEC_WINNT_AUTH_IDENTITY_W
00328 {
00329     PUSHORT User;
00330     ULONG UserLength;
00331     PUSHORT Domain;
00332     ULONG DomainLength;
00333     PUSHORT Password;
00334     ULONG PasswordLength;
00335     ULONG Flags;
00336 } SEC_WINNT_AUTH_IDENTITY_W, *PSEC_WINNT_AUTH_IDENTITY_W;
00337 #define SEC_WINNT_AUTH_IDENTITY_ANSI    0x1
00338 #define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
00339 #define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_W
00340 #define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_W
00341 #define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_W
00342 #endif
00343 
00344 #ifndef SEC_WINNT_AUTH_IDENTITY_VERSION
00345 #define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200
00346 typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW
00347 {
00348     ULONG Version;
00349     ULONG Length;
00350     PUSHORT User;
00351     ULONG UserLength;
00352     PUSHORT Domain;
00353     ULONG DomainLength;
00354     PUSHORT Password;
00355     ULONG PasswordLength;
00356     ULONG Flags;
00357     PUSHORT PackageList;
00358     ULONG PackageListLength;
00359 } SEC_WINNT_AUTH_IDENTITY_EXW, *PSEC_WINNT_AUTH_IDENTITY_EXW;
00360 #define SEC_WINNT_AUTH_IDENTITY_EX  SEC_WINNT_AUTH_IDENTITY_EXW
00361 #define PSEC_WINNT_AUTH_IDENTITY_EX PSEC_WINNT_AUTH_IDENTITY_EXW
00362 #endif
00363 
00364 #ifndef __SECHANDLE_DEFINED__
00365 typedef struct _SecHandle
00366 {
00367     ULONG_PTR dwLower;
00368     ULONG_PTR dwUpper;
00369 } SecHandle, *PSecHandle;
00370 #define __SECHANDLE_DEFINED__
00371 #endif
00372 
00373 typedef SecHandle CredHandle, *PCredHandle, CtxtHandle, *PCtxtHandle;
00374 
00375 typedef struct _SecBuffer
00376 {
00377     ULONG cbBuffer;
00378     ULONG BufferType;
00379 #ifdef MIDL_PASS
00380     MIDL_PROP([size_is(cbBuffer)]) PCHAR pvBuffer;
00381 #else
00382     __field_bcount(cbBuffer) void SEC_FAR *pvBuffer;
00383 #endif
00384 } SecBuffer, *PSecBuffer;
00385 
00386 typedef struct _SecBufferDesc
00387 {
00388     ULONG ulVersion;
00389     ULONG cBuffers;
00390     MIDL_PROP([size_is(cBuffers)]) __field_ecount(cBuffers) PSecBuffer pBuffers;
00391 } SecBufferDesc, SEC_FAR *PSecBufferDesc;
00392 
00393 typedef struct _SecPkgInfoW
00394 {
00395     ULONG fCapabilities;
00396     USHORT wVersion;
00397     USHORT wRPCID;
00398     ULONG cbMaxToken;
00399     MIDL_PROP([string]) SEC_WCHAR *Name;
00400     MIDL_PROP([string]) SEC_WCHAR *Comment;
00401 } SecPkgInfoW, *PSecPkgInfoW;
00402 #define SecPkgInfo SecPkgInfoW
00403 #define PSecPkgInfo PSecPkgInfoW
00404 
00405 typedef struct _SecPkgCredentials_NamesW
00406 {
00407     MIDL_PROP([string]) SEC_WCHAR *sUserName;
00408 } SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
00409 #define SecPkgCredentials_Names SecPkgCredentials_NamesW
00410 #define PSecPkgCredentials_Names PSecPkgCredentials_NamesW
00411 
00412 typedef struct _SecPkgContext_NamesW
00413 {
00414     SEC_WCHAR *sUserName;
00415 } SecPkgContext_NamesW, *PSecPkgContext_NamesW;
00416 #define SecPkgContext_Names SecPkgContext_NamesW
00417 #define PSecPkgContext_Names PSecPkgContext_NamesW
00418 
00419 #if OSVER(NTDDI_VERSION) > NTDDI_WIN2K
00420 typedef struct _SecPkgContext_CredentialNameW
00421 {
00422     ULONG CredentialType;
00423     SEC_WCHAR *sCredentialName;
00424 } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
00425 #endif
00426 #define SecPkgContext_CredentialName SecPkgContext_CredentialNameW
00427 #define PSecPkgContext_CredentialName PSecPkgContext_CredentialNameW
00428 
00429 typedef struct _SecPkgContext_SubjectAttributes
00430 {
00431     PVOID AttributeInfo;
00432 } SecPkgContext_SubjectAttributes, *PSecPkgContext_SubjectAttributes;
00433 
00434 typedef struct _SecPkgContext_CredInfo
00435 {
00436     SECPKG_CRED_CLASS CredClass;
00437     ULONG IsPromptingNeeded;
00438 } SecPkgContext_CredInfo, *PSecPkgContext_CredInfo;
00439 
00440 typedef struct _SecPkgContext_NegoPackageInfo
00441 {
00442     ULONG PackageMask;
00443 } SecPkgContext_NegoPackageInfo, *PSecPkgContext_NegoPackageInfo;
00444 
00445 typedef struct _SecPkgContext_NegoStatus
00446 {
00447     ULONG LastStatus;
00448 } SecPkgContext_NegoStatus, *PSecPkgContext_NegoStatus;
00449 
00450 typedef struct _SecPkgContext_Sizes
00451 {
00452     ULONG cbMaxToken;
00453     ULONG cbMaxSignature;
00454     ULONG cbBlockSize;
00455     ULONG cbSecurityTrailer;
00456 } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
00457 
00458 typedef struct _SecPkgContext_StreamSizes
00459 {
00460     ULONG cbHeader;
00461     ULONG cbTrailer;
00462     ULONG cbMaximumMessage;
00463     ULONG cBuffers;
00464     ULONG cbBlockSize;
00465 } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
00466 
00467 typedef struct _SecPkgContext_Lifespan
00468 {
00469     TimeStamp tsStart;
00470     TimeStamp tsExpiry;
00471 } SecPkgContext_Lifespan, *PSecPkgContext_Lifespan;
00472 
00473 typedef struct _SecPkgContext_PasswordExpiry
00474 {
00475     TimeStamp tsPasswordExpires;
00476 } SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry;
00477 
00478 typedef struct _SecPkgContext_ProtoInfoW
00479 {
00480     SEC_WCHAR *sProtocolName;
00481     ULONG majorVersion;
00482     ULONG minorVersion;
00483 } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
00484 #define SecPkgContext_ProtoInfo SecPkgContext_ProtoInfoW
00485 #define PSecPkgContext_ProtoInfo PSecPkgContext_ProtoInfoW
00486 
00487 typedef struct _SecPkgContext_KeyInfoW
00488 {
00489     SEC_WCHAR *sSignatureAlgorithmName;
00490     SEC_WCHAR *sEncryptAlgorithmName;
00491     ULONG KeySize;
00492     ULONG SignatureAlgorithm;
00493     ULONG EncryptAlgorithm;
00494 } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
00495 #define SecPkgContext_KeyInfo SecPkgContext_KeyInfoW
00496 #define PSecPkgContext_KeyInfo PSecPkgContext_KeyInfoW
00497 
00498 typedef struct _SecPkgContext_SessionKey
00499 {
00500     ULONG SessionKeyLength;
00501     __field_bcount(SessionKeyLength) PUCHAR SessionKey;
00502 } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
00503 
00504 typedef struct _SecPkgContext_NegoKeys
00505 {
00506     ULONG KeyType;
00507     USHORT KeyLength;
00508     __field_bcount(KeyLength) PUCHAR KeyValue;
00509     ULONG  VerifyKeyType;
00510     USHORT VerifyKeyLength;
00511     __field_bcount(VerifyKeyLength) PUCHAR VerifyKeyValue;
00512 } SecPkgContext_NegoKeys, *PSecPkgContext_NegoKeys;
00513 
00514 typedef struct _SecPkgContext_DceInfo
00515 {
00516     ULONG AuthzSvc;
00517     PVOID pPac;
00518 } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
00519 
00520 typedef struct _SecPkgContext_PackageInfoW
00521 {
00522     PSecPkgInfoW PackageInfo;
00523 } SecPkgContext_PackageInfoW, *PSecPkgContext_PackageInfoW;
00524 #define SecPkgContext_PackageInfo SecPkgContext_PackageInfoW
00525 #define PSecPkgContext_PackageInfo PSecPkgContext_PackageInfoW
00526 
00527 typedef struct _SecPkgContext_UserFlags
00528 {
00529     ULONG UserFlags;
00530 } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
00531 
00532 typedef struct _SecPkgContext_Flags
00533 {
00534     ULONG Flags;
00535 } SecPkgContext_Flags, *PSecPkgContext_Flags;
00536 
00537 typedef struct _SecPkgContext_NegotiationInfoW
00538 {
00539     PSecPkgInfoW PackageInfo ;
00540     ULONG NegotiationState ;
00541 } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
00542 
00543 typedef struct _SecPkgContext_AuthorityW
00544 {
00545     SEC_WCHAR *sAuthorityName;
00546 } SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
00547 #define SecPkgContext_Authority SecPkgContext_AuthorityW
00548 #define PSecPkgContext_Authority PSecPkgContext_AuthorityW
00549 
00550 
00551 #if NTDDI_VERSION > NTDDI_WS03
00552 typedef struct _SecPkgCredentials_SSIProviderW
00553 {
00554     SEC_WCHAR *sProviderName;
00555     ULONG ProviderInfoLength;
00556     PCHAR ProviderInfo;
00557 } SecPkgCredentials_SSIProviderW, *PSecPkgCredentials_SSIProviderW;
00558 #define SecPkgCredentials_SSIProvider SecPkgCredentials_SSIProviderW
00559 #define PSecPkgCredentials_SSIProvider PSecPkgCredentials_SSIProviderW
00560 
00561 typedef struct _SecPkgContext_LogoffTime
00562 {
00563     TimeStamp tsLogoffTime;
00564 } SecPkgContext_LogoffTime, *PSecPkgContext_LogoffTime;
00565 #endif
00566 
00567 /* forward declaration */
00568 typedef struct _SECURITY_FUNCTION_TABLE_W SecurityFunctionTableW, *PSecurityFunctionTableW;
00569 #define SecurityFunctionTable SecurityFunctionTableW
00570 #define PSecurityFunctionTable PSecurityFunctionTableW
00571 
00572 typedef
00573 VOID
00574 (SEC_ENTRY * SEC_GET_KEY_FN)(
00575     PVOID Arg,
00576     PVOID Principal,
00577     ULONG KeyVer,
00578     PVOID *Key,
00579     SECURITY_STATUS *Status);
00580 
00581 KSECDDDECLSPEC
00582 SECURITY_STATUS
00583 SEC_ENTRY
00584 AcceptSecurityContext(
00585     _In_opt_ PCredHandle phCredential,
00586     _In_opt_ PCtxtHandle phContext,
00587     _In_opt_ PSecBufferDesc pInput,
00588     _In_ ULONG fContextReq,
00589     _In_ ULONG TargetDataRep,
00590     _In_opt_ PCtxtHandle phNewContext,
00591     _In_opt_ PSecBufferDesc pOutput,
00592     _Out_ PULONG pfContextAttr,
00593     _Out_opt_ PTimeStamp ptsExpiry);
00594 
00595 typedef
00596 SECURITY_STATUS
00597 (SEC_ENTRY * ACCEPT_SECURITY_CONTEXT_FN)(
00598     PCredHandle,
00599     PCtxtHandle,
00600     PSecBufferDesc,
00601     ULONG,
00602     ULONG,
00603     PCtxtHandle,
00604     PSecBufferDesc,
00605     PULONG,
00606     PTimeStamp);
00607 
00608 KSECDDDECLSPEC
00609 SECURITY_STATUS
00610 SEC_ENTRY
00611 AcquireCredentialsHandleW(
00612     _In_opt_ PSSPI_SEC_STRING pPrincipal,
00613     _In_ PSSPI_SEC_STRING pPackage,
00614     _In_ ULONG fCredentialUse,
00615     _In_opt_ PVOID pvLogonId,
00616     _In_opt_ PVOID pAuthData,
00617     _In_opt_ SEC_GET_KEY_FN pGetKeyFn,
00618     _In_opt_ PVOID pvGetKeyArgument,
00619     _Out_ PCredHandle phCredential,
00620     _Out_opt_ PTimeStamp ptsExpiry);
00621 #define AcquireCredentialsHandle AcquireCredentialsHandleW
00622 
00623 typedef
00624 SECURITY_STATUS
00625 (SEC_ENTRY * ACQUIRE_CREDENTIALS_HANDLE_FN_W)(
00626     PSSPI_SEC_STRING,
00627     PSSPI_SEC_STRING,
00628     ULONG,
00629     PVOID,
00630     PVOID,
00631     SEC_GET_KEY_FN,
00632     PVOID,
00633     PCredHandle,
00634     PTimeStamp);
00635 #define ACQUIRE_CREDENTIALS_HANDLE_FN ACQUIRE_CREDENTIALS_HANDLE_FN_W
00636 
00637 SECURITY_STATUS
00638 SEC_ENTRY
00639 AddCredentialsA(
00640     _In_ PCredHandle hCredentials,
00641     _In_opt_ LPSTR pszPrincipal,
00642     _In_ LPSTR pszPackage,
00643     _In_ ULONG fCredentialUse,
00644     _In_opt_ PVOID pAuthData,
00645     _In_opt_ SEC_GET_KEY_FN pGetKeyFn,
00646     _In_opt_ PVOID pvGetKeyArgument,
00647     _Out_opt_ PTimeStamp ptsExpiry);
00648 
00649 typedef
00650 SECURITY_STATUS
00651 (SEC_ENTRY * ADD_CREDENTIALS_FN_A)(
00652     PCredHandle,
00653     SEC_CHAR *,
00654     SEC_CHAR *,
00655     ULONG,
00656     PVOID,
00657     SEC_GET_KEY_FN,
00658     PVOID,
00659     PTimeStamp);
00660 
00661 KSECDDDECLSPEC
00662 SECURITY_STATUS
00663 SEC_ENTRY
00664 AddCredentialsW(
00665     _In_ PCredHandle hCredentials,
00666     _In_opt_ PSSPI_SEC_STRING pPrincipal,
00667     _In_ PSSPI_SEC_STRING pPackage,
00668     _In_ ULONG fCredentialUse,
00669     _In_opt_ PVOID pAuthData,
00670     _In_opt_ SEC_GET_KEY_FN pGetKeyFn,
00671     _In_opt_ PVOID pvGetKeyArgument,
00672     _Out_opt_ PTimeStamp ptsExpiry);
00673 
00674 typedef
00675 SECURITY_STATUS
00676 (SEC_ENTRY * ADD_CREDENTIALS_FN_W)(
00677     PCredHandle,
00678     PSSPI_SEC_STRING,
00679     PSSPI_SEC_STRING,
00680     ULONG,
00681     PVOID,
00682     SEC_GET_KEY_FN,
00683     PVOID,
00684     PTimeStamp);
00685 
00686 #ifdef UNICODE
00687 #define AddCredentials  AddCredentialsW
00688 #define ADD_CREDENTIALS_FN  ADD_CREDENTIALS_FN_W
00689 #else
00690 #define AddCredentials  AddCredentialsA
00691 #define ADD_CREDENTIALS_FN ADD_CREDENTIALS_FN_A
00692 #endif
00693 
00694 KSECDDDECLSPEC
00695 SECURITY_STATUS
00696 SEC_ENTRY
00697 ApplyControlToken(
00698     _In_ PCtxtHandle phContext,
00699     _In_ PSecBufferDesc pInput);
00700 
00701 typedef
00702 SECURITY_STATUS
00703 (SEC_ENTRY * APPLY_CONTROL_TOKEN_FN)(
00704     PCtxtHandle, PSecBufferDesc);
00705 
00706 #if (ISSP_MODE != 0)
00707 
00708 SECURITY_STATUS
00709 SEC_ENTRY
00710 ChangeAccountPasswordA(
00711     _In_ SEC_CHAR* pszPackageName,
00712     _In_ SEC_CHAR* pszDomainName,
00713     _In_ SEC_CHAR* pszAccountName,
00714     _In_ SEC_CHAR* pszOldPassword,
00715     _In_ SEC_CHAR* pszNewPassword,
00716     _In_ BOOLEAN bImpersonating,
00717     _In_ ULONG dwReserved,
00718     _Inout_ PSecBufferDesc pOutput);
00719 
00720 typedef
00721 SECURITY_STATUS
00722 (SEC_ENTRY * CHANGE_PASSWORD_FN_A)(
00723     SEC_CHAR *,
00724     SEC_CHAR *,
00725     SEC_CHAR *,
00726     SEC_CHAR *,
00727     SEC_CHAR *,
00728     BOOLEAN,
00729     ULONG,
00730     PSecBufferDesc);
00731 
00732 SECURITY_STATUS
00733 SEC_ENTRY
00734 ChangeAccountPasswordW(
00735     _In_ SEC_WCHAR* pszPackageName,
00736     _In_ SEC_WCHAR* pszDomainName,
00737     _In_ SEC_WCHAR* pszAccountName,
00738     _In_ SEC_WCHAR* pszOldPassword,
00739     _In_ SEC_WCHAR* pszNewPassword,
00740     _In_ BOOLEAN bImpersonating,
00741     _In_ ULONG dwReserved,
00742     _Inout_ PSecBufferDesc pOutput);
00743 
00744 typedef
00745 SECURITY_STATUS
00746 (SEC_ENTRY * CHANGE_PASSWORD_FN_W)(
00747     SEC_WCHAR *,
00748     SEC_WCHAR *,
00749     SEC_WCHAR *,
00750     SEC_WCHAR *,
00751     SEC_WCHAR *,
00752     BOOLEAN,
00753     ULONG,
00754     PSecBufferDesc);
00755 
00756 #ifdef UNICODE
00757 #define ChangeAccountPassword ChangeAccountPasswordW
00758 #define CHANGE_PASSWORD_FN CHANGE_PASSWORD_FN_W
00759 #else
00760 #define ChangeAccountPassword ChangeAccountPasswordA
00761 #define CHANGE_PASSWORD_FN CHANGE_PASSWORD_FN_A
00762 #endif
00763 
00764 #endif /* ISSP_MODE != 0 */
00765 
00766 SECURITY_STATUS
00767 SEC_ENTRY
00768 CompleteAuthToken(
00769     _In_ PCtxtHandle phContext,
00770     _In_ PSecBufferDesc pToken);
00771 
00772 typedef
00773 SECURITY_STATUS
00774 (SEC_ENTRY * COMPLETE_AUTH_TOKEN_FN)(
00775     PCtxtHandle,
00776     PSecBufferDesc);
00777 
00778 SECURITY_STATUS
00779 SEC_ENTRY
00780 DecryptMessage(
00781     _In_ PCtxtHandle phContext,
00782     _Inout_ PSecBufferDesc pMessage,
00783     _In_ ULONG MessageSeqNo,
00784     _Out_opt_ PULONG pfQOP);
00785 
00786 typedef
00787 SECURITY_STATUS
00788 (SEC_ENTRY * DECRYPT_MESSAGE_FN)(
00789     PCtxtHandle,
00790     PSecBufferDesc,
00791     ULONG,
00792     PULONG);
00793 
00794 KSECDDDECLSPEC
00795 SECURITY_STATUS
00796 SEC_ENTRY
00797 DeleteSecurityContext(
00798     _In_ PCtxtHandle phContext);
00799 
00800 typedef
00801 SECURITY_STATUS
00802 (SEC_ENTRY * DELETE_SECURITY_CONTEXT_FN)(
00803     PCtxtHandle);
00804 
00805 SECURITY_STATUS
00806 SEC_ENTRY
00807 EncryptMessage(
00808     _In_ PCtxtHandle phContext,
00809     _In_ ULONG  fQOP,
00810     _Inout_ PSecBufferDesc pMessage,
00811     _In_ ULONG MessageSeqNo);
00812 
00813 typedef
00814 SECURITY_STATUS
00815 (SEC_ENTRY * ENCRYPT_MESSAGE_FN)(
00816     PCtxtHandle,
00817     ULONG,
00818     PSecBufferDesc,
00819     ULONG);
00820 
00821 KSECDDDECLSPEC
00822 SECURITY_STATUS
00823 SEC_ENTRY
00824 EnumerateSecurityPackagesW(
00825     _Out_ PULONG pcPackages,
00826     _Deref_out_ PSecPkgInfoW* ppPackageInfo);
00827 #define EnumerateSecurityPackages EnumerateSecurityPackagesW
00828 
00829 typedef
00830 SECURITY_STATUS
00831 (SEC_ENTRY * ENUMERATE_SECURITY_PACKAGES_FN_W)(
00832     PULONG,
00833     PSecPkgInfoW*);
00834 #define ENUMERATE_SECURITY_PACKAGES_FN ENUMERATE_SECURITY_PACKAGES_FN_W
00835 
00836 KSECDDDECLSPEC
00837 SECURITY_STATUS
00838 SEC_ENTRY
00839 ExportSecurityContext(
00840     _In_ PCtxtHandle phContext,
00841     _In_ ULONG fFlags,
00842     _Out_ PSecBuffer pPackedContext,
00843     _Out_ PVOID* pToken);
00844 
00845 typedef
00846 SECURITY_STATUS
00847 (SEC_ENTRY * EXPORT_SECURITY_CONTEXT_FN)(
00848     PCtxtHandle,
00849     ULONG,
00850     PSecBuffer,
00851     PVOID*);
00852 
00853 SECURITY_STATUS
00854 SEC_ENTRY
00855 FreeContextBuffer(
00856     _Inout_ PVOID pvContextBuffer);
00857 
00858 typedef
00859 SECURITY_STATUS
00860 (SEC_ENTRY * FREE_CONTEXT_BUFFER_FN)(
00861     _Inout_ PVOID);
00862 
00863 KSECDDDECLSPEC
00864 SECURITY_STATUS
00865 SEC_ENTRY
00866 FreeCredentialsHandle(
00867     _In_ PCredHandle phCredential);
00868 
00869 typedef
00870 SECURITY_STATUS
00871 (SEC_ENTRY * FREE_CREDENTIALS_HANDLE_FN)(
00872     PCredHandle);
00873 
00874 KSECDDDECLSPEC
00875 SECURITY_STATUS
00876 SEC_ENTRY
00877 ImpersonateSecurityContext(
00878     _In_ PCtxtHandle phContext);
00879 
00880 typedef
00881 SECURITY_STATUS
00882 (SEC_ENTRY * IMPERSONATE_SECURITY_CONTEXT_FN)(
00883     PCtxtHandle);
00884 
00885 KSECDDDECLSPEC
00886 SECURITY_STATUS
00887 SEC_ENTRY
00888 ImportSecurityContextW(
00889     _In_ PSSPI_SEC_STRING pszPackage,
00890     _In_ PSecBuffer pPackedContext,
00891     _In_ PVOID Token,
00892     _Out_ PCtxtHandle phContext);
00893 #define ImportSecurityContext ImportSecurityContextW
00894 
00895 typedef
00896 SECURITY_STATUS
00897 (SEC_ENTRY * IMPORT_SECURITY_CONTEXT_FN_W)(
00898     PSSPI_SEC_STRING,
00899     PSecBuffer,
00900     PVOID,
00901     PCtxtHandle);
00902 #define IMPORT_SECURITY_CONTEXT_FN IMPORT_SECURITY_CONTEXT_FN_W
00903 
00904 KSECDDDECLSPEC
00905 SECURITY_STATUS
00906 SEC_ENTRY
00907 InitializeSecurityContextW(
00908     _In_opt_ PCredHandle phCredential,
00909     _In_opt_ PCtxtHandle phContext,
00910     _In_opt_ PSSPI_SEC_STRING pTargetName,
00911     _In_ ULONG fContextReq,
00912     _In_ ULONG Reserved1,
00913     _In_ ULONG TargetDataRep,
00914     _In_opt_ PSecBufferDesc pInput,
00915     _In_ ULONG Reserved2,
00916     _Inout_opt_ PCtxtHandle phNewContext,
00917     _Inout_opt_ PSecBufferDesc pOutput,
00918     _Out_ PULONG pfContextAttr,
00919     _Out_opt_ PTimeStamp ptsExpiry);
00920 #define InitializeSecurityContext InitializeSecurityContextW
00921 
00922 typedef
00923 SECURITY_STATUS
00924 (SEC_ENTRY * INITIALIZE_SECURITY_CONTEXT_FN_W)(
00925     PCredHandle,
00926     PCtxtHandle,
00927     PSSPI_SEC_STRING,
00928     ULONG,
00929     ULONG,
00930     ULONG,
00931     PSecBufferDesc,
00932     ULONG,
00933     PCtxtHandle,
00934     PSecBufferDesc,
00935     PULONG,
00936     PTimeStamp);
00937 #define INITIALIZE_SECURITY_CONTEXT_FN INITIALIZE_SECURITY_CONTEXT_FN_W
00938 
00939 KSECDDDECLSPEC
00940 PSecurityFunctionTableW
00941 SEC_ENTRY
00942 InitSecurityInterfaceW(VOID);
00943 #define InitSecurityInterface InitSecurityInterfaceW
00944 
00945 typedef
00946 PSecurityFunctionTableW
00947 (SEC_ENTRY * INIT_SECURITY_INTERFACE_W)(VOID);
00948 #define INIT_SECURITY_INTERFACE INIT_SECURITY_INTERFACE_W
00949 
00950 KSECDDDECLSPEC
00951 SECURITY_STATUS
00952 SEC_ENTRY
00953 MakeSignature(
00954     _In_ PCtxtHandle phContext,
00955     _In_ ULONG fQOP,
00956     _In_ PSecBufferDesc pMessage,
00957     _In_ ULONG MessageSeqNo);
00958 
00959 typedef
00960 SECURITY_STATUS
00961 (SEC_ENTRY * MAKE_SIGNATURE_FN)(
00962     PCtxtHandle,
00963     ULONG,
00964     PSecBufferDesc,
00965     ULONG);
00966 
00967 KSECDDDECLSPEC
00968 SECURITY_STATUS
00969 SEC_ENTRY
00970 QueryContextAttributesW(
00971     _In_ PCtxtHandle phContext,
00972     _In_ ULONG ulAttribute,
00973     _Out_ PVOID pBuffer);
00974 #define QueryContextAttributes QueryContextAttributesW
00975 
00976 typedef
00977 SECURITY_STATUS
00978 (SEC_ENTRY * QUERY_CONTEXT_ATTRIBUTES_FN_W)(
00979     PCtxtHandle,
00980     ULONG,
00981     PVOID);
00982 #define QUERY_CONTEXT_ATTRIBUTES_FN QUERY_CONTEXT_ATTRIBUTES_FN_W
00983 
00984 KSECDDDECLSPEC
00985 SECURITY_STATUS
00986 SEC_ENTRY
00987 QueryCredentialsAttributesW(
00988     _In_    PCredHandle phCredential,
00989     _In_    ULONG ulAttribute,
00990     _Inout_ PVOID pBuffer);
00991 #define QueryCredentialsAttributes QueryCredentialsAttributesW
00992 
00993 typedef
00994 SECURITY_STATUS
00995 (SEC_ENTRY * QUERY_CREDENTIALS_ATTRIBUTES_FN_W)(
00996     PCredHandle,
00997     ULONG,
00998     PVOID);
00999 #define QUERY_CREDENTIALS_ATTRIBUTES_FN QUERY_CREDENTIALS_ATTRIBUTES_FN_W
01000 
01001 KSECDDDECLSPEC
01002 SECURITY_STATUS
01003 SEC_ENTRY
01004 QuerySecurityContextToken(
01005     _In_ PCtxtHandle phContext,
01006     _Out_ PVOID* Token);
01007 
01008 typedef
01009 SECURITY_STATUS
01010 (SEC_ENTRY * QUERY_SECURITY_CONTEXT_TOKEN_FN)(
01011     PCtxtHandle, PVOID *);
01012 
01013 KSECDDDECLSPEC
01014 SECURITY_STATUS
01015 SEC_ENTRY
01016 QuerySecurityPackageInfoW(
01017     _In_ PSSPI_SEC_STRING pPackageName,
01018     _Deref_out_ PSecPkgInfoW *ppPackageInfo);
01019 #define QuerySecurityPackageInfo QuerySecurityPackageInfoW
01020 
01021 typedef
01022 SECURITY_STATUS
01023 (SEC_ENTRY * QUERY_SECURITY_PACKAGE_INFO_FN_W)(
01024     PSSPI_SEC_STRING,
01025     PSecPkgInfoW *);
01026 #define QUERY_SECURITY_PACKAGE_INFO_FN QUERY_SECURITY_PACKAGE_INFO_FN_W
01027 
01028 KSECDDDECLSPEC
01029 SECURITY_STATUS
01030 SEC_ENTRY
01031 RevertSecurityContext(
01032     _In_ PCtxtHandle phContext);
01033 
01034 typedef
01035 SECURITY_STATUS
01036 (SEC_ENTRY * REVERT_SECURITY_CONTEXT_FN)(
01037     PCtxtHandle);
01038 
01039 #if (OSVER(NTDDI_VERSION) > NTDDI_WIN2K)
01040 SECURITY_STATUS
01041 SEC_ENTRY
01042 SetContextAttributesW(
01043     _In_ PCtxtHandle phContext,
01044     _In_ ULONG ulAttribute,
01045     _In_bytecount_(cbBuffer) PVOID pBuffer,
01046     _In_ ULONG cbBuffer);
01047 #define SetContextAttributes SetContextAttributesW
01048 
01049 typedef
01050 SECURITY_STATUS
01051 (SEC_ENTRY * SET_CONTEXT_ATTRIBUTES_FN_W)(
01052     PCtxtHandle,
01053     ULONG,
01054     PVOID,
01055     ULONG);
01056 #define SET_CONTEXT_ATTRIBUTES_FN SET_CONTEXT_ATTRIBUTES_FN_W
01057 #endif
01058 
01059 #if (NTDDI_VERSION > NTDDI_WS03)
01060 KSECDDDECLSPEC
01061 SECURITY_STATUS
01062 SEC_ENTRY
01063 SetCredentialsAttributesW(
01064     _In_ PCredHandle phCredential,
01065     _In_ ULONG ulAttribute,
01066     _In_bytecount_(cbBuffer) PVOID pBuffer,
01067     _In_ ULONG cbBuffer);
01068 #define SetCredentialsAttributes SetCredentialsAttributesW
01069 
01070 typedef
01071 SECURITY_STATUS
01072 (SEC_ENTRY * SET_CREDENTIALS_ATTRIBUTES_FN_W)(
01073     PCredHandle,
01074     ULONG,
01075     PVOID,
01076     ULONG);
01077 #define SET_CREDENTIALS_ATTRIBUTES_FN SET_CREDENTIALS_ATTRIBUTES_FN_W
01078 #endif /* NTDDI_VERSION > NTDDI_WS03 */
01079 
01080 KSECDDDECLSPEC
01081 SECURITY_STATUS
01082 SEC_ENTRY
01083 VerifySignature(
01084     _In_ PCtxtHandle phContext,
01085     _In_ PSecBufferDesc pMessage,
01086     _In_ ULONG MessageSeqNo,
01087     _Out_ PULONG pfQOP);
01088 
01089 typedef
01090 SECURITY_STATUS
01091 (SEC_ENTRY * VERIFY_SIGNATURE_FN)(
01092     PCtxtHandle,
01093     PSecBufferDesc,
01094     ULONG,
01095     PULONG);
01096 
01097 #if (ISSP_MODE == 0)
01098 
01099 KSECDDDECLSPEC
01100 NTSTATUS
01101 NTAPI
01102 SecMakeSPN(
01103     _In_ PUNICODE_STRING ServiceClass,
01104     _In_ PUNICODE_STRING ServiceName,
01105     _In_opt_ PUNICODE_STRING InstanceName,
01106     _In_opt_ USHORT InstancePort,
01107     _In_opt_ PUNICODE_STRING Referrer,
01108     _Inout_ PUNICODE_STRING Spn,
01109     _Out_opt_ PULONG Length,
01110     _In_ BOOLEAN Allocate);
01111 
01112 #if (NTDDI_VERSION >= NTDDI_WINXP)
01113 KSECDDDECLSPEC
01114 NTSTATUS
01115 NTAPI
01116 SecMakeSPNEx(
01117     _In_ PUNICODE_STRING ServiceClass,
01118     _In_ PUNICODE_STRING ServiceName,
01119     _In_opt_ PUNICODE_STRING InstanceName,
01120     _In_opt_ USHORT InstancePort,
01121     _In_opt_ PUNICODE_STRING Referrer,
01122     _In_opt_ PUNICODE_STRING TargetInfo,
01123     _Inout_ PUNICODE_STRING Spn,
01124     _Out_ PULONG Length OPTIONAL,
01125     _In_ BOOLEAN Allocate);
01126 
01127 KSECDDDECLSPEC
01128 NTSTATUS
01129 SEC_ENTRY
01130 SecLookupAccountSid(
01131     _In_ PSID Sid,
01132     _Out_ PULONG NameSize,
01133     _Inout_ PUNICODE_STRING NameBuffer,
01134     _Out_ PULONG DomainSize OPTIONAL,
01135     _Out_opt_ PUNICODE_STRING DomainBuffer,
01136     _Out_ PSID_NAME_USE NameUse);
01137 
01138 KSECDDDECLSPEC
01139 NTSTATUS
01140 SEC_ENTRY
01141 SecLookupAccountName(
01142     _In_ PUNICODE_STRING Name,
01143     _Inout_ PULONG SidSize,
01144     _Out_ PSID Sid,
01145     _Out_ PSID_NAME_USE NameUse,
01146     _Out_opt_ PULONG DomainSize, // WDK says _Out_ only + ... OPTIONAL
01147     _Inout_opt_ PUNICODE_STRING ReferencedDomain);
01148 #endif
01149 
01150 #if (NTDDI_VERSION >= NTDDI_WS03)
01151 KSECDDDECLSPEC
01152 NTSTATUS
01153 SEC_ENTRY
01154 SecLookupWellKnownSid(
01155     _In_ WELL_KNOWN_SID_TYPE SidType,
01156     _Out_ PSID Sid,
01157     _In_ ULONG SidBufferSize,
01158     _Inout_opt_ PULONG SidSize);
01159 #endif
01160 
01161 #if (NTDDI_VERSION >= NTDDI_VISTA)
01162 KSECDDDECLSPEC
01163 NTSTATUS
01164 NTAPI
01165 SecMakeSPNEx2(
01166     _In_ PUNICODE_STRING ServiceClass,
01167     _In_ PUNICODE_STRING ServiceName,
01168     _In_opt_ PUNICODE_STRING InstanceName,
01169     _In_opt_ USHORT InstancePort,
01170     _In_opt_ PUNICODE_STRING Referrer,
01171     _In_opt_ PUNICODE_STRING InTargetInfo,
01172     _Inout_ PUNICODE_STRING Spn,
01173     _Out_opt_ PULONG TotalSize,
01174     _In_ BOOLEAN Allocate,
01175     _In_ BOOLEAN IsTargetInfoMarshaled);
01176 #endif
01177 
01178 #endif /* ISSP_MODE == 0 */
01179 
01180 #if (NTDDI_VERSION >= NTDDI_WIN7)
01181 
01182 SECURITY_STATUS
01183 SEC_ENTRY
01184 SspiEncodeAuthIdentityAsStrings(
01185     _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity,
01186     _Deref_out_opt_ PCWSTR* ppszUserName,
01187     _Deref_out_opt_ PCWSTR* ppszDomainName,
01188     _Deref_opt_out_opt_ PCWSTR* ppszPackedCredentialsString);
01189 
01190 SECURITY_STATUS
01191 SEC_ENTRY
01192 SspiValidateAuthIdentity(
01193     _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData);
01194 
01195 SECURITY_STATUS
01196 SEC_ENTRY
01197 SspiCopyAuthIdentity(
01198     _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData,
01199     _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* AuthDataCopy);
01200 
01201 VOID
01202 SEC_ENTRY
01203 SspiFreeAuthIdentity(
01204     _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData);
01205 
01206 VOID
01207 SEC_ENTRY
01208 SspiZeroAuthIdentity(
01209     _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthData);
01210 
01211 VOID
01212 SEC_ENTRY
01213 SspiLocalFree(
01214     _In_opt_ PVOID DataBuffer);
01215 
01216 SECURITY_STATUS
01217 SEC_ENTRY
01218 SspiEncodeStringsAsAuthIdentity(
01219     _In_opt_ PCWSTR pszUserName,
01220     _In_opt_ PCWSTR pszDomainName,
01221     _In_opt_ PCWSTR pszPackedCredentialsString,
01222     _Deref_out_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity);
01223 
01224 SECURITY_STATUS
01225 SEC_ENTRY
01226 SspiCompareAuthIdentities(
01227     _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity1,
01228     _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity2,
01229     _Out_opt_ PBOOLEAN SameSuppliedUser,
01230     _Out_opt_ PBOOLEAN SameSuppliedIdentity);
01231 
01232 SECURITY_STATUS
01233 SEC_ENTRY
01234 SspiMarshalAuthIdentity(
01235     _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity,
01236     _Out_ PULONG AuthIdentityLength,
01237     _Outptr_result_bytebuffer_(*AuthIdentityLength) PCHAR* AuthIdentityByteArray);
01238 
01239 SECURITY_STATUS
01240 SEC_ENTRY
01241 SspiUnmarshalAuthIdentity(
01242     _In_ PULONG AuthIdentityLength,
01243     _In_reads_bytes_(AuthIdentityLength) PCHAR AuthIdentityByteArray,
01244     _Outptr_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppAuthIdentity);
01245 
01246 BOOLEAN
01247 SEC_ENTRY
01248 SspiIsPromptingNeeded(
01249     _In_ PULONG ErrorOrNtStatus);
01250 
01251 SECURITY_STATUS
01252 SEC_ENTRY
01253 SspiGetTargetHostName(
01254     _In_ PCWSTR pszTargetName,
01255     _Outptr_ PWSTR* pszHostName);
01256 
01257 SECURITY_STATUS
01258 SEC_ENTRY
01259 SspiExcludePackage(
01260     _In_opt_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE AuthIdentity,
01261     _In_ PCWSTR pszPackageName,
01262     _Outptr_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE* ppNewAuthIdentity);
01263 
01264 #define SEC_WINNT_AUTH_IDENTITY_MARSHALLED 0x04
01265 #define SEC_WINNT_AUTH_IDENTITY_ONLY 0x08
01266 
01267 #endif /* NTDDI_VERSION >= NTDDI_WIN7 */
01268 
01269 #define FreeCredentialHandle FreeCredentialsHandle
01270 struct _SECURITY_FUNCTION_TABLE_W
01271 {
01272     ULONG dwVersion;
01273     ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
01274     QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
01275     ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
01276     FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
01277     PVOID Reserved2;
01278     INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
01279     ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
01280     COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
01281     DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
01282     APPLY_CONTROL_TOKEN_FN ApplyControlToken;
01283     QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
01284     IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
01285     REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
01286     MAKE_SIGNATURE_FN MakeSignature;
01287     VERIFY_SIGNATURE_FN VerifySignature;
01288     FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
01289     QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
01290     PVOID Reserved3;
01291     PVOID Reserved4;
01292     EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
01293     IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
01294     ADD_CREDENTIALS_FN_W AddCredentialsW ;
01295     PVOID Reserved8;
01296     QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
01297     ENCRYPT_MESSAGE_FN EncryptMessage;
01298     DECRYPT_MESSAGE_FN DecryptMessage;
01299 #if OSVER(NTDDI_VERSION) > NTDDI_WIN2K
01300     SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
01301 #endif
01302 #if NTDDI_VERSION > NTDDI_WS03SP1
01303     SET_CREDENTIALS_ATTRIBUTES_FN_W SetCredentialsAttributesW;
01304 #endif
01305 #if ISSP_MODE != 0
01306     CHANGE_PASSWORD_FN_W ChangeAccountPasswordW;
01307 #else
01308     PVOID Reserved9;
01309 #endif
01310 };
01311 
01312 #endif /* !__SSPI_H__ */

Generated on Sat May 26 2012 04:31:12 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.