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