FreeRDP
Loading...
Searching...
No Matches
secapi.h
1
20#ifndef WINPR_SECAPI_H_
21#define WINPR_SECAPI_H_
22
23#ifdef _WIN32
24#define _NTDEF_
25#include <ntsecapi.h>
26#else
27
28#include <winpr/wtypes.h>
29
30typedef enum
31{
32 KerbInvalidValue = 0,
33 KerbInteractiveLogon = 2,
34 KerbSmartCardLogon = 6,
35 KerbWorkstationUnlockLogon = 7,
36 KerbSmartCardUnlockLogon = 8,
37 KerbProxyLogon = 9,
38 KerbTicketLogon = 10,
39 KerbTicketUnlockLogon = 11,
40 KerbS4ULogon = 12,
41 KerbCertificateLogon = 13,
42 KerbCertificateS4ULogon = 14,
43 KerbCertificateUnlockLogon = 15,
44 KerbNoElevationLogon = 83,
45 KerbLuidLogon = 84
46} KERB_LOGON_SUBMIT_TYPE,
47 *PKERB_LOGON_SUBMIT_TYPE;
48
49typedef struct
50{
51 KERB_LOGON_SUBMIT_TYPE MessageType;
52 ULONG Flags;
53 ULONG ServiceTicketLength;
54 ULONG TicketGrantingTicketLength;
55 PUCHAR ServiceTicket;
56 PUCHAR TicketGrantingTicket;
58
59#define KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET 0x1
60
61#define MSV1_0_OWF_PASSWORD_LENGTH 16
62
63typedef struct
64{
65 ULONG Version;
66 ULONG Flags;
67 UCHAR LmPassword[MSV1_0_OWF_PASSWORD_LENGTH];
68 UCHAR NtPassword[MSV1_0_OWF_PASSWORD_LENGTH];
70
71#define MSV1_0_CRED_VERSION_REMOTE 0xffff0002
72
73typedef enum _MSV1_0_CREDENTIAL_KEY_TYPE
74{
75 InvalidCredKey,
76 DeprecatedIUMCredKey,
77 DomainUserCredKey,
78 LocalUserCredKey,
79 ExternallySuppliedCredKey
80} MSV1_0_CREDENTIAL_KEY_TYPE;
81
82#define MSV1_0_CREDENTIAL_KEY_LENGTH 20
83#define MSV1_0_CRED_LM_PRESENT 0x1
84#define MSV1_0_CRED_NT_PRESENT 0x2
85#define MSV1_0_CRED_REMOVED 0x4
86#define MSV1_0_CRED_CREDKEY_PRESENT 0x8
87#define MSV1_0_CRED_SHA_PRESENT 0x10
88
89typedef struct
90{
91 UCHAR Data[MSV1_0_CREDENTIAL_KEY_LENGTH];
93
94typedef struct
95{
96 ULONG Version;
97 ULONG Flags;
98 MSV1_0_CREDENTIAL_KEY CredentialKey;
99 MSV1_0_CREDENTIAL_KEY_TYPE CredentialKeyType;
100 ULONG EncryptedCredsSize;
101 UCHAR EncryptedCreds[1];
103
104#endif /* _WIN32 */
105
106#ifndef KERB_LOGON_FLAG_REDIRECTED
107#define KERB_LOGON_FLAG_REDIRECTED 0x2
108#endif
109
110#endif /* WINPR_SECAPI_H_ */