1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
#include "idl_types.h"
/*
NEGOEX interface definition
See http://ietfreport.isoc.org/all-ids/draft-zhu-negoex-04.txt
*/
import "misc.idl";
[
uuid("fcc30ddc-98d0-11e5-8a56-83e9a6706f2f"),
helper("../librpc/ndr/ndr_negoex.h"),
helpstring("NEGOEX messages")
]
interface negoex
{
typedef [nopush,nopull,noprint] struct {
#if 0
[relative,size_is(length)] uint8 *data;
uint32 length;
#else
DATA_BLOB blob;
/*
* internal helper variable */
uint32 _length;
/*
* the dummy pointer is needed in order to let the
* callers use NDR_BUFFERS
*/
[relative] uint8 *_dummy;
#endif
} negoex_BYTE_VECTOR;
typedef [public] struct {
GUID guid;
} negoex_AUTH_SCHEME;
typedef [nopush,nopull] struct {
[relative,size_is(count)] negoex_AUTH_SCHEME *array;
uint32 count;
} negoex_AUTH_SCHEME_VECTOR;
typedef [v1_enum] enum {
NEGOEX_EXTENSION_TYPE_TODO = 0 /* TODO */
} negoex_ExtensionTypes;
typedef [public] struct {
negoex_ExtensionTypes type;
negoex_BYTE_VECTOR value;
} negoex_EXTENSION;
typedef [nopush,nopull] struct {
[relative,size_is(count)] negoex_EXTENSION *array;
uint32 count;
} negoex_EXTENSION_VECTOR;
typedef [v1_enum] enum {
NEGOEX_CHECKSUM_SCHEME_RFC3961 = 1
} negoex_ChecksumSchemes;
typedef struct {
[value(20)] uint32 header_length;
negoex_ChecksumSchemes scheme;
uint32 type;
negoex_BYTE_VECTOR value;
} negoex_CHECKSUM;
typedef [v1_enum] enum {
NEGOEX_ALERT_VERIFY_NO_KEY = 1
} negoex_AlertReason;
typedef [public] struct {
[value(4)] uint32 header_length; /* TODO: is 4 correct? */
negoex_AlertReason reason;
} negoex_ALERT_PULSE;
typedef [v1_enum] enum {
NEGOEX_ALERT_TYPE_PULSE = 1
} negoex_AlertTypes;
typedef [public] struct {
negoex_AlertTypes type;
negoex_BYTE_VECTOR value;
} negoex_ALERT;
typedef [nopush,nopull] struct {
[relative,size_is(count)] negoex_ALERT *array;
uint32 count;
} negoex_ALERT_VECTOR;
typedef [public,v1_enum] enum {
NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO = 0,
NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO = 1,
NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA = 2,
NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA = 3,
NEGOEX_MESSAGE_TYPE_CHALLENGE = 4,
NEGOEX_MESSAGE_TYPE_AP_REQUEST = 5,
NEGOEX_MESSAGE_TYPE_VERIFY = 6,
NEGOEX_MESSAGE_TYPE_ALERT = 7
} negoex_MESSAGE_TYPE;
const uint32 NEGOEX_PROTOCOL_VERSION_0 = 0;
typedef [flag(NDR_PAHEX)] struct {
[flag(NDR_PAHEX)] uint8 random[32];
[value(NEGOEX_PROTOCOL_VERSION_0)] udlong protocol_version;
negoex_AUTH_SCHEME_VECTOR auth_schemes;
negoex_EXTENSION_VECTOR extensions;
} negoex_NEGO_PAYLOAD;
typedef struct {
negoex_AUTH_SCHEME auth_scheme;
negoex_BYTE_VECTOR exchange;
} negoex_EXCHANGE_PAYLOAD;
typedef struct {
negoex_AUTH_SCHEME auth_scheme;
negoex_CHECKSUM checksum;
} negoex_VERIFY_PAYLOAD;
typedef struct {
negoex_AUTH_SCHEME auth_scheme;
NTSTATUS status;
negoex_ALERT_VECTOR alerts;
} negoex_ALERT_PAYLOAD;
typedef [public,nodiscriminant] union {
[case(NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO)] negoex_NEGO_PAYLOAD nego;
[case(NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO)] negoex_NEGO_PAYLOAD nego;
[case(NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA)] negoex_EXCHANGE_PAYLOAD exchange;
[case(NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA)] negoex_EXCHANGE_PAYLOAD exchange;
[case(NEGOEX_MESSAGE_TYPE_CHALLENGE)] negoex_EXCHANGE_PAYLOAD exchange;
[case(NEGOEX_MESSAGE_TYPE_AP_REQUEST)] negoex_EXCHANGE_PAYLOAD exchange;
[case(NEGOEX_MESSAGE_TYPE_VERIFY)] negoex_VERIFY_PAYLOAD verify;
[case(NEGOEX_MESSAGE_TYPE_ALERT)] negoex_ALERT_PAYLOAD alert;
} negoex_PAYLOAD;
typedef [public,relative_base,gensize,nopull] struct {
[charset(DOS),value("NEGOEXTS")] uint8 signature[8];
negoex_MESSAGE_TYPE type;
uint32 sequence_number;
[value(ndr_negoex_MESSAGE_header_length(r))] uint32 header_length;
[value(ndr_size_negoex_MESSAGE(r, ndr->flags))] uint32 message_length;
GUID conversation_id;
[switch_is(type)] negoex_PAYLOAD p;
} negoex_MESSAGE;
typedef [public,nopush,nopull,flag(NDR_NOALIGN)] struct {
uint32 count;
negoex_MESSAGE messages[count];
} negoex_MESSAGE_ARRAY;
}
|