-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patheduroam.ino
364 lines (345 loc) · 22.3 KB
/
eduroam.ino
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
#include "c_types.h"
}
//int wifi_station_set_username(u8 *username, int len);
//void wifi_station_clear_username(void);
unsigned char testuser_cert_pem[] = {
0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x3a, 0x20, 0x33, 0x20, 0x28, 0x30, 0x78, 0x32, 0x29, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x65, 0x72, 0x69,
0x61, 0x6c, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62,
0x39, 0x3a, 0x33, 0x66, 0x3a, 0x37, 0x33, 0x3a, 0x64, 0x39, 0x3a, 0x33,
0x65, 0x3a, 0x32, 0x31, 0x3a, 0x63, 0x39, 0x3a, 0x35, 0x62, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x61,
0x74, 0x75, 0x72, 0x65, 0x20, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74,
0x68, 0x6d, 0x3a, 0x20, 0x73, 0x68, 0x61, 0x31, 0x57, 0x69, 0x74, 0x68,
0x52, 0x53, 0x41, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x73,
0x73, 0x75, 0x65, 0x72, 0x3a, 0x20, 0x43, 0x4e, 0x3d, 0x43, 0x65, 0x72,
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74,
0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65,
0x3a, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, 0x32, 0x20, 0x31, 0x35, 0x3a,
0x34, 0x32, 0x3a, 0x35, 0x31, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x47,
0x4d, 0x54, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x41, 0x66, 0x74, 0x65, 0x72,
0x20, 0x3a, 0x20, 0x46, 0x65, 0x62, 0x20, 0x31, 0x31, 0x20, 0x31, 0x35,
0x3a, 0x34, 0x32, 0x3a, 0x35, 0x31, 0x20, 0x32, 0x30, 0x31, 0x37, 0x20,
0x47, 0x4d, 0x54, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x43, 0x4e, 0x3d,
0x74, 0x65, 0x73, 0x74, 0x75, 0x73, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4b, 0x65, 0x79, 0x20,
0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x20, 0x4b, 0x65, 0x79, 0x20, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74,
0x68, 0x6d, 0x3a, 0x20, 0x72, 0x73, 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x53, 0x41, 0x20, 0x50, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x20, 0x4b, 0x65, 0x79, 0x3a, 0x20, 0x28, 0x31,
0x30, 0x32, 0x34, 0x20, 0x62, 0x69, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x75, 0x73, 0x20, 0x28, 0x31, 0x30,
0x32, 0x34, 0x20, 0x62, 0x69, 0x74, 0x29, 0x3a, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x30, 0x30, 0x3a, 0x64, 0x62, 0x3a, 0x31,
0x62, 0x3a, 0x38, 0x33, 0x3a, 0x30, 0x61, 0x3a, 0x33, 0x61, 0x3a, 0x39,
0x63, 0x3a, 0x63, 0x38, 0x3a, 0x62, 0x35, 0x3a, 0x36, 0x63, 0x3a, 0x33,
0x36, 0x3a, 0x35, 0x62, 0x3a, 0x39, 0x34, 0x3a, 0x39, 0x63, 0x3a, 0x38,
0x32, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x36,
0x34, 0x3a, 0x39, 0x66, 0x3a, 0x63, 0x36, 0x3a, 0x62, 0x38, 0x3a, 0x32,
0x33, 0x3a, 0x33, 0x62, 0x3a, 0x35, 0x30, 0x3a, 0x32, 0x64, 0x3a, 0x38,
0x34, 0x3a, 0x34, 0x63, 0x3a, 0x32, 0x63, 0x3a, 0x33, 0x38, 0x3a, 0x31,
0x39, 0x3a, 0x32, 0x39, 0x3a, 0x38, 0x61, 0x3a, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x38, 0x63, 0x3a, 0x36, 0x33, 0x3a, 0x34,
0x34, 0x3a, 0x33, 0x39, 0x3a, 0x64, 0x61, 0x3a, 0x63, 0x35, 0x3a, 0x62,
0x34, 0x3a, 0x66, 0x34, 0x3a, 0x34, 0x35, 0x3a, 0x34, 0x37, 0x3a, 0x35,
0x65, 0x3a, 0x31, 0x35, 0x3a, 0x64, 0x62, 0x3a, 0x32, 0x34, 0x3a, 0x30,
0x33, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x37,
0x30, 0x3a, 0x66, 0x34, 0x3a, 0x39, 0x39, 0x3a, 0x32, 0x36, 0x3a, 0x62,
0x63, 0x3a, 0x63, 0x65, 0x3a, 0x34, 0x64, 0x3a, 0x39, 0x31, 0x3a, 0x66,
0x36, 0x3a, 0x62, 0x62, 0x3a, 0x63, 0x62, 0x3a, 0x37, 0x30, 0x3a, 0x33,
0x65, 0x3a, 0x66, 0x38, 0x3a, 0x64, 0x36, 0x3a, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x35, 0x64, 0x3a, 0x38, 0x64, 0x3a, 0x36,
0x38, 0x3a, 0x38, 0x36, 0x3a, 0x61, 0x61, 0x3a, 0x33, 0x32, 0x3a, 0x31,
0x65, 0x3a, 0x33, 0x32, 0x3a, 0x30, 0x66, 0x3a, 0x33, 0x65, 0x3a, 0x64,
0x31, 0x3a, 0x38, 0x31, 0x3a, 0x38, 0x39, 0x3a, 0x63, 0x65, 0x3a, 0x66,
0x34, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
0x63, 0x3a, 0x65, 0x64, 0x3a, 0x36, 0x30, 0x3a, 0x61, 0x65, 0x3a, 0x64,
0x62, 0x3a, 0x66, 0x32, 0x3a, 0x65, 0x63, 0x3a, 0x39, 0x64, 0x3a, 0x64,
0x62, 0x3a, 0x65, 0x31, 0x3a, 0x64, 0x64, 0x3a, 0x61, 0x34, 0x3a, 0x64,
0x64, 0x3a, 0x37, 0x37, 0x3a, 0x35, 0x32, 0x3a, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x39, 0x31, 0x3a, 0x64, 0x64, 0x3a, 0x37,
0x66, 0x3a, 0x61, 0x34, 0x3a, 0x65, 0x33, 0x3a, 0x30, 0x37, 0x3a, 0x33,
0x62, 0x3a, 0x37, 0x35, 0x3a, 0x33, 0x33, 0x3a, 0x38, 0x35, 0x3a, 0x66,
0x37, 0x3a, 0x31, 0x61, 0x3a, 0x66, 0x38, 0x3a, 0x64, 0x65, 0x3a, 0x35,
0x37, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
0x39, 0x3a, 0x65, 0x30, 0x3a, 0x64, 0x38, 0x3a, 0x61, 0x61, 0x3a, 0x36,
0x64, 0x3a, 0x63, 0x64, 0x3a, 0x38, 0x39, 0x3a, 0x35, 0x62, 0x3a, 0x64,
0x37, 0x3a, 0x64, 0x32, 0x3a, 0x34, 0x34, 0x3a, 0x61, 0x66, 0x3a, 0x65,
0x37, 0x3a, 0x35, 0x66, 0x3a, 0x66, 0x36, 0x3a, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x31, 0x38, 0x3a, 0x31, 0x37, 0x3a, 0x35,
0x30, 0x3a, 0x36, 0x36, 0x3a, 0x63, 0x36, 0x3a, 0x33, 0x65, 0x3a, 0x33,
0x32, 0x3a, 0x61, 0x64, 0x3a, 0x62, 0x39, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x36, 0x35,
0x35, 0x33, 0x37, 0x20, 0x28, 0x30, 0x78, 0x31, 0x30, 0x30, 0x30, 0x31,
0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35,
0x30, 0x39, 0x76, 0x33, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20,
0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
0x61, 0x69, 0x6e, 0x74, 0x73, 0x3a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x43, 0x41, 0x3a, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4e, 0x65, 0x74,
0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
0x74, 0x3a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4f, 0x70, 0x65, 0x6e,
0x53, 0x53, 0x4c, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
0x64, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x53, 0x75, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x39, 0x44, 0x3a, 0x38, 0x31, 0x3a, 0x35, 0x41, 0x3a, 0x43,
0x44, 0x3a, 0x35, 0x33, 0x3a, 0x30, 0x39, 0x3a, 0x31, 0x44, 0x3a, 0x32,
0x30, 0x3a, 0x39, 0x45, 0x3a, 0x41, 0x39, 0x3a, 0x34, 0x32, 0x3a, 0x39,
0x31, 0x3a, 0x34, 0x36, 0x3a, 0x34, 0x32, 0x3a, 0x35, 0x45, 0x3a, 0x42,
0x37, 0x3a, 0x33, 0x44, 0x3a, 0x44, 0x31, 0x3a, 0x37, 0x31, 0x3a, 0x39,
0x43, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x58, 0x35, 0x30, 0x39, 0x76, 0x33, 0x20, 0x41, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x4b, 0x65, 0x79, 0x20, 0x49,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x6b, 0x65, 0x79, 0x69, 0x64, 0x3a, 0x45, 0x32,
0x3a, 0x33, 0x43, 0x3a, 0x35, 0x45, 0x3a, 0x41, 0x38, 0x3a, 0x34, 0x38,
0x3a, 0x31, 0x41, 0x3a, 0x42, 0x41, 0x3a, 0x37, 0x42, 0x3a, 0x46, 0x37,
0x3a, 0x39, 0x36, 0x3a, 0x32, 0x44, 0x3a, 0x38, 0x43, 0x3a, 0x39, 0x42,
0x3a, 0x36, 0x31, 0x3a, 0x37, 0x43, 0x3a, 0x36, 0x38, 0x3a, 0x43, 0x38,
0x3a, 0x43, 0x39, 0x3a, 0x42, 0x38, 0x3a, 0x32, 0x39, 0x0a, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x20, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x3a, 0x20,
0x73, 0x68, 0x61, 0x31, 0x57, 0x69, 0x74, 0x68, 0x52, 0x53, 0x41, 0x45,
0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x37, 0x31, 0x3a, 0x35, 0x66, 0x3a,
0x37, 0x61, 0x3a, 0x31, 0x63, 0x3a, 0x32, 0x65, 0x3a, 0x37, 0x65, 0x3a,
0x30, 0x31, 0x3a, 0x64, 0x65, 0x3a, 0x39, 0x64, 0x3a, 0x66, 0x37, 0x3a,
0x33, 0x39, 0x3a, 0x33, 0x61, 0x3a, 0x36, 0x31, 0x3a, 0x39, 0x36, 0x3a,
0x30, 0x66, 0x3a, 0x66, 0x63, 0x3a, 0x37, 0x31, 0x3a, 0x37, 0x39, 0x3a,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x38, 0x62, 0x3a,
0x62, 0x66, 0x3a, 0x64, 0x38, 0x3a, 0x63, 0x34, 0x3a, 0x39, 0x39, 0x3a,
0x61, 0x64, 0x3a, 0x34, 0x38, 0x3a, 0x31, 0x30, 0x3a, 0x34, 0x33, 0x3a,
0x36, 0x66, 0x3a, 0x38, 0x61, 0x3a, 0x33, 0x64, 0x3a, 0x62, 0x35, 0x3a,
0x37, 0x30, 0x3a, 0x63, 0x30, 0x3a, 0x63, 0x64, 0x3a, 0x63, 0x61, 0x3a,
0x31, 0x61, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x61, 0x33, 0x3a, 0x31, 0x37, 0x3a, 0x66, 0x63, 0x3a, 0x30, 0x36, 0x3a,
0x34, 0x64, 0x3a, 0x61, 0x65, 0x3a, 0x66, 0x64, 0x3a, 0x35, 0x31, 0x3a,
0x33, 0x64, 0x3a, 0x38, 0x61, 0x3a, 0x64, 0x32, 0x3a, 0x39, 0x64, 0x3a,
0x33, 0x66, 0x3a, 0x35, 0x36, 0x3a, 0x36, 0x38, 0x3a, 0x31, 0x38, 0x3a,
0x36, 0x30, 0x3a, 0x37, 0x39, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x63, 0x65, 0x3a, 0x30, 0x32, 0x3a, 0x64, 0x39, 0x3a,
0x31, 0x62, 0x3a, 0x37, 0x65, 0x3a, 0x33, 0x34, 0x3a, 0x61, 0x34, 0x3a,
0x39, 0x61, 0x3a, 0x63, 0x63, 0x3a, 0x63, 0x66, 0x0a, 0x2d, 0x2d, 0x2d,
0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54,
0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
0x0a, 0x4d, 0x49, 0x49, 0x42, 0x37, 0x54, 0x43, 0x43, 0x41, 0x5a, 0x65,
0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a, 0x41, 0x4c, 0x6b,
0x2f, 0x63, 0x39, 0x6b, 0x2b, 0x49, 0x63, 0x6c, 0x62, 0x4d, 0x41, 0x30,
0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45,
0x42, 0x42, 0x51, 0x55, 0x41, 0x4d, 0x43, 0x49, 0x78, 0x49, 0x44, 0x41,
0x65, 0x42, 0x67, 0x4e, 0x56, 0x0a, 0x42, 0x41, 0x4d, 0x54, 0x46, 0x30,
0x4e, 0x6c, 0x63, 0x6e, 0x52, 0x70, 0x5a, 0x6d, 0x6c, 0x6a, 0x59, 0x58,
0x52, 0x70, 0x62, 0x32, 0x34, 0x67, 0x51, 0x58, 0x56, 0x30, 0x61, 0x47,
0x39, 0x79, 0x61, 0x58, 0x52, 0x35, 0x4d, 0x42, 0x34, 0x58, 0x44, 0x54,
0x45, 0x32, 0x4d, 0x44, 0x49, 0x78, 0x4d, 0x6a, 0x45, 0x31, 0x4e, 0x44,
0x49, 0x31, 0x4d, 0x56, 0x6f, 0x58, 0x44, 0x54, 0x45, 0x33, 0x0a, 0x4d,
0x44, 0x49, 0x78, 0x4d, 0x54, 0x45, 0x31, 0x4e, 0x44, 0x49, 0x31, 0x4d,
0x56, 0x6f, 0x77, 0x45, 0x7a, 0x45, 0x52, 0x4d, 0x41, 0x38, 0x47, 0x41,
0x31, 0x55, 0x45, 0x41, 0x78, 0x4d, 0x49, 0x64, 0x47, 0x56, 0x7a, 0x64,
0x48, 0x56, 0x7a, 0x5a, 0x58, 0x49, 0x77, 0x67, 0x5a, 0x38, 0x77, 0x44,
0x51, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41,
0x51, 0x45, 0x42, 0x0a, 0x42, 0x51, 0x41, 0x44, 0x67, 0x59, 0x30, 0x41,
0x4d, 0x49, 0x47, 0x4a, 0x41, 0x6f, 0x47, 0x42, 0x41, 0x4e, 0x73, 0x62,
0x67, 0x77, 0x6f, 0x36, 0x6e, 0x4d, 0x69, 0x31, 0x62, 0x44, 0x5a, 0x62,
0x6c, 0x4a, 0x79, 0x43, 0x5a, 0x4a, 0x2f, 0x47, 0x75, 0x43, 0x4d, 0x37,
0x55, 0x43, 0x32, 0x45, 0x54, 0x43, 0x77, 0x34, 0x47, 0x53, 0x6d, 0x4b,
0x6a, 0x47, 0x4e, 0x45, 0x4f, 0x64, 0x72, 0x46, 0x0a, 0x74, 0x50, 0x52,
0x46, 0x52, 0x31, 0x34, 0x56, 0x32, 0x79, 0x51, 0x44, 0x63, 0x50, 0x53,
0x5a, 0x4a, 0x72, 0x7a, 0x4f, 0x54, 0x5a, 0x48, 0x32, 0x75, 0x38, 0x74,
0x77, 0x50, 0x76, 0x6a, 0x57, 0x58, 0x59, 0x31, 0x6f, 0x68, 0x71, 0x6f,
0x79, 0x48, 0x6a, 0x49, 0x50, 0x50, 0x74, 0x47, 0x42, 0x69, 0x63, 0x37,
0x30, 0x7a, 0x4f, 0x31, 0x67, 0x72, 0x74, 0x76, 0x79, 0x37, 0x4a, 0x33,
0x62, 0x0a, 0x34, 0x64, 0x32, 0x6b, 0x33, 0x58, 0x64, 0x53, 0x6b, 0x64,
0x31, 0x2f, 0x70, 0x4f, 0x4d, 0x48, 0x4f, 0x33, 0x55, 0x7a, 0x68, 0x66,
0x63, 0x61, 0x2b, 0x4e, 0x35, 0x58, 0x79, 0x65, 0x44, 0x59, 0x71, 0x6d,
0x33, 0x4e, 0x69, 0x56, 0x76, 0x58, 0x30, 0x6b, 0x53, 0x76, 0x35, 0x31,
0x2f, 0x32, 0x47, 0x42, 0x64, 0x51, 0x5a, 0x73, 0x59, 0x2b, 0x4d, 0x71,
0x32, 0x35, 0x41, 0x67, 0x4d, 0x42, 0x0a, 0x41, 0x41, 0x47, 0x6a, 0x65,
0x7a, 0x42, 0x35, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x64, 0x45,
0x77, 0x51, 0x43, 0x4d, 0x41, 0x41, 0x77, 0x4c, 0x41, 0x59, 0x4a, 0x59,
0x49, 0x5a, 0x49, 0x41, 0x59, 0x62, 0x34, 0x51, 0x67, 0x45, 0x4e, 0x42,
0x42, 0x38, 0x57, 0x48, 0x55, 0x39, 0x77, 0x5a, 0x57, 0x35, 0x54, 0x55,
0x30, 0x77, 0x67, 0x52, 0x32, 0x56, 0x75, 0x5a, 0x58, 0x4a, 0x68, 0x0a,
0x64, 0x47, 0x56, 0x6b, 0x49, 0x45, 0x4e, 0x6c, 0x63, 0x6e, 0x52, 0x70,
0x5a, 0x6d, 0x6c, 0x6a, 0x59, 0x58, 0x52, 0x6c, 0x4d, 0x42, 0x30, 0x47,
0x41, 0x31, 0x55, 0x64, 0x44, 0x67, 0x51, 0x57, 0x42, 0x42, 0x53, 0x64,
0x67, 0x56, 0x72, 0x4e, 0x55, 0x77, 0x6b, 0x64, 0x49, 0x4a, 0x36, 0x70,
0x51, 0x70, 0x46, 0x47, 0x51, 0x6c, 0x36, 0x33, 0x50, 0x64, 0x46, 0x78,
0x6e, 0x44, 0x41, 0x66, 0x0a, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x53, 0x4d,
0x45, 0x47, 0x44, 0x41, 0x57, 0x67, 0x42, 0x54, 0x69, 0x50, 0x46, 0x36,
0x6f, 0x53, 0x42, 0x71, 0x36, 0x65, 0x2f, 0x65, 0x57, 0x4c, 0x59, 0x79,
0x62, 0x59, 0x58, 0x78, 0x6f, 0x79, 0x4d, 0x6d, 0x34, 0x4b, 0x54, 0x41,
0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30,
0x42, 0x41, 0x51, 0x55, 0x46, 0x41, 0x41, 0x4e, 0x42, 0x0a, 0x41, 0x48,
0x46, 0x66, 0x65, 0x68, 0x77, 0x75, 0x66, 0x67, 0x48, 0x65, 0x6e, 0x66,
0x63, 0x35, 0x4f, 0x6d, 0x47, 0x57, 0x44, 0x2f, 0x78, 0x78, 0x65, 0x59,
0x75, 0x2f, 0x32, 0x4d, 0x53, 0x5a, 0x72, 0x55, 0x67, 0x51, 0x51, 0x32,
0x2b, 0x4b, 0x50, 0x62, 0x56, 0x77, 0x77, 0x4d, 0x33, 0x4b, 0x47, 0x71,
0x4d, 0x58, 0x2f, 0x41, 0x5a, 0x4e, 0x72, 0x76, 0x31, 0x52, 0x50, 0x59,
0x72, 0x53, 0x0a, 0x6e, 0x54, 0x39, 0x57, 0x61, 0x42, 0x68, 0x67, 0x65,
0x63, 0x34, 0x43, 0x32, 0x52, 0x74, 0x2b, 0x4e, 0x4b, 0x53, 0x61, 0x7a,
0x4d, 0x38, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44,
0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45,
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a
};
unsigned int testuser_cert_pem_len = 2538;
unsigned char testuser_key_pem[] = {
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x52,
0x53, 0x41, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b,
0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43,
0x58, 0x51, 0x49, 0x42, 0x41, 0x41, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x62,
0x47, 0x34, 0x4d, 0x4b, 0x4f, 0x70, 0x7a, 0x49, 0x74, 0x57, 0x77, 0x32,
0x57, 0x35, 0x53, 0x63, 0x67, 0x6d, 0x53, 0x66, 0x78, 0x72, 0x67, 0x6a,
0x4f, 0x31, 0x41, 0x74, 0x68, 0x45, 0x77, 0x73, 0x4f, 0x42, 0x6b, 0x70,
0x69, 0x6f, 0x78, 0x6a, 0x52, 0x44, 0x6e, 0x61, 0x78, 0x62, 0x54, 0x30,
0x0a, 0x52, 0x55, 0x64, 0x65, 0x46, 0x64, 0x73, 0x6b, 0x41, 0x33, 0x44,
0x30, 0x6d, 0x53, 0x61, 0x38, 0x7a, 0x6b, 0x32, 0x52, 0x39, 0x72, 0x76,
0x4c, 0x63, 0x44, 0x37, 0x34, 0x31, 0x6c, 0x32, 0x4e, 0x61, 0x49, 0x61,
0x71, 0x4d, 0x68, 0x34, 0x79, 0x44, 0x7a, 0x37, 0x52, 0x67, 0x59, 0x6e,
0x4f, 0x39, 0x4d, 0x7a, 0x74, 0x59, 0x4b, 0x37, 0x62, 0x38, 0x75, 0x79,
0x64, 0x32, 0x2b, 0x48, 0x64, 0x0a, 0x70, 0x4e, 0x31, 0x33, 0x55, 0x70,
0x48, 0x64, 0x66, 0x36, 0x54, 0x6a, 0x42, 0x7a, 0x74, 0x31, 0x4d, 0x34,
0x58, 0x33, 0x47, 0x76, 0x6a, 0x65, 0x56, 0x38, 0x6e, 0x67, 0x32, 0x4b,
0x70, 0x74, 0x7a, 0x59, 0x6c, 0x62, 0x31, 0x39, 0x4a, 0x45, 0x72, 0x2b,
0x64, 0x66, 0x39, 0x68, 0x67, 0x58, 0x55, 0x47, 0x62, 0x47, 0x50, 0x6a,
0x4b, 0x74, 0x75, 0x51, 0x49, 0x44, 0x41, 0x51, 0x41, 0x42, 0x0a, 0x41,
0x6f, 0x47, 0x42, 0x41, 0x4d, 0x36, 0x6b, 0x7a, 0x74, 0x79, 0x70, 0x31,
0x4d, 0x35, 0x53, 0x6c, 0x4b, 0x46, 0x62, 0x6b, 0x2f, 0x68, 0x62, 0x33,
0x65, 0x7a, 0x32, 0x72, 0x52, 0x6e, 0x46, 0x53, 0x65, 0x50, 0x7a, 0x76,
0x79, 0x65, 0x42, 0x4c, 0x50, 0x49, 0x4a, 0x30, 0x6b, 0x65, 0x59, 0x77,
0x2f, 0x75, 0x35, 0x74, 0x4f, 0x55, 0x67, 0x4a, 0x61, 0x50, 0x74, 0x64,
0x77, 0x55, 0x72, 0x0a, 0x48, 0x62, 0x41, 0x43, 0x64, 0x51, 0x39, 0x69,
0x66, 0x72, 0x51, 0x6f, 0x41, 0x49, 0x74, 0x6f, 0x37, 0x47, 0x73, 0x68,
0x4f, 0x5a, 0x41, 0x78, 0x51, 0x62, 0x61, 0x70, 0x78, 0x48, 0x78, 0x70,
0x4d, 0x74, 0x6f, 0x56, 0x6a, 0x31, 0x59, 0x59, 0x2b, 0x6e, 0x77, 0x4a,
0x4b, 0x64, 0x4f, 0x48, 0x6d, 0x6b, 0x64, 0x56, 0x4d, 0x58, 0x77, 0x6d,
0x45, 0x6e, 0x77, 0x71, 0x54, 0x50, 0x39, 0x53, 0x0a, 0x37, 0x39, 0x33,
0x2b, 0x62, 0x58, 0x31, 0x77, 0x42, 0x74, 0x58, 0x63, 0x66, 0x37, 0x7a,
0x63, 0x6b, 0x6a, 0x68, 0x4c, 0x37, 0x78, 0x55, 0x4c, 0x64, 0x4f, 0x57,
0x76, 0x50, 0x55, 0x44, 0x4a, 0x74, 0x53, 0x4a, 0x58, 0x64, 0x49, 0x2f,
0x69, 0x43, 0x37, 0x63, 0x47, 0x52, 0x36, 0x43, 0x52, 0x41, 0x6b, 0x45,
0x41, 0x38, 0x61, 0x59, 0x6b, 0x42, 0x75, 0x56, 0x67, 0x37, 0x58, 0x72,
0x37, 0x0a, 0x63, 0x6e, 0x6d, 0x79, 0x65, 0x46, 0x4e, 0x72, 0x33, 0x6a,
0x6e, 0x56, 0x74, 0x53, 0x51, 0x53, 0x36, 0x37, 0x61, 0x72, 0x36, 0x54,
0x6d, 0x66, 0x31, 0x46, 0x77, 0x73, 0x71, 0x50, 0x79, 0x44, 0x2f, 0x59,
0x61, 0x35, 0x2f, 0x55, 0x61, 0x4f, 0x49, 0x4f, 0x34, 0x67, 0x49, 0x74,
0x75, 0x69, 0x30, 0x45, 0x54, 0x33, 0x7a, 0x4e, 0x66, 0x30, 0x4c, 0x6e,
0x55, 0x35, 0x71, 0x66, 0x77, 0x54, 0x0a, 0x74, 0x69, 0x69, 0x32, 0x52,
0x4f, 0x76, 0x31, 0x56, 0x51, 0x4a, 0x42, 0x41, 0x4f, 0x67, 0x65, 0x71,
0x6e, 0x70, 0x49, 0x36, 0x72, 0x39, 0x41, 0x50, 0x43, 0x7a, 0x4d, 0x67,
0x58, 0x39, 0x6d, 0x6a, 0x6a, 0x39, 0x31, 0x67, 0x69, 0x6c, 0x51, 0x62,
0x6a, 0x77, 0x58, 0x64, 0x76, 0x36, 0x51, 0x67, 0x6a, 0x6c, 0x71, 0x78,
0x32, 0x58, 0x68, 0x6e, 0x72, 0x52, 0x4d, 0x77, 0x63, 0x6a, 0x55, 0x0a,
0x4b, 0x4a, 0x65, 0x32, 0x77, 0x43, 0x52, 0x69, 0x50, 0x72, 0x52, 0x68,
0x55, 0x51, 0x54, 0x68, 0x6e, 0x76, 0x6e, 0x6e, 0x39, 0x57, 0x46, 0x62,
0x63, 0x73, 0x63, 0x78, 0x36, 0x50, 0x75, 0x68, 0x56, 0x74, 0x55, 0x43,
0x51, 0x47, 0x35, 0x46, 0x46, 0x46, 0x65, 0x5a, 0x51, 0x48, 0x76, 0x65,
0x44, 0x50, 0x51, 0x57, 0x47, 0x4a, 0x7a, 0x54, 0x35, 0x48, 0x74, 0x4b,
0x42, 0x50, 0x31, 0x64, 0x0a, 0x38, 0x73, 0x78, 0x68, 0x56, 0x56, 0x31,
0x65, 0x45, 0x46, 0x4e, 0x46, 0x70, 0x4a, 0x4f, 0x51, 0x64, 0x32, 0x4b,
0x76, 0x6f, 0x68, 0x75, 0x7a, 0x6f, 0x4a, 0x50, 0x69, 0x56, 0x67, 0x50,
0x53, 0x47, 0x68, 0x2f, 0x54, 0x2b, 0x51, 0x67, 0x65, 0x32, 0x36, 0x78,
0x2f, 0x6a, 0x63, 0x72, 0x46, 0x33, 0x76, 0x44, 0x57, 0x37, 0x79, 0x58,
0x51, 0x54, 0x75, 0x6b, 0x43, 0x51, 0x51, 0x43, 0x76, 0x0a, 0x34, 0x52,
0x79, 0x58, 0x6a, 0x38, 0x79, 0x66, 0x6f, 0x5a, 0x4a, 0x32, 0x39, 0x33,
0x5a, 0x67, 0x44, 0x46, 0x74, 0x59, 0x5a, 0x6a, 0x64, 0x38, 0x43, 0x6e,
0x2b, 0x63, 0x64, 0x4d, 0x4d, 0x72, 0x58, 0x46, 0x2f, 0x77, 0x46, 0x61,
0x4b, 0x45, 0x35, 0x68, 0x49, 0x55, 0x31, 0x39, 0x77, 0x31, 0x79, 0x64,
0x77, 0x41, 0x4b, 0x4f, 0x38, 0x71, 0x49, 0x6d, 0x38, 0x55, 0x79, 0x6e,
0x42, 0x54, 0x0a, 0x58, 0x49, 0x6e, 0x54, 0x48, 0x68, 0x6c, 0x6c, 0x37,
0x5a, 0x37, 0x6f, 0x70, 0x44, 0x36, 0x2b, 0x2b, 0x35, 0x38, 0x4a, 0x41,
0x6b, 0x41, 0x67, 0x69, 0x49, 0x76, 0x4a, 0x34, 0x78, 0x6e, 0x47, 0x30,
0x69, 0x31, 0x51, 0x47, 0x47, 0x44, 0x32, 0x32, 0x39, 0x50, 0x38, 0x65,
0x41, 0x4b, 0x76, 0x39, 0x31, 0x70, 0x5a, 0x70, 0x39, 0x2b, 0x6c, 0x64,
0x51, 0x6a, 0x50, 0x35, 0x38, 0x69, 0x38, 0x0a, 0x45, 0x71, 0x6d, 0x36,
0x58, 0x38, 0x41, 0x32, 0x62, 0x2f, 0x67, 0x45, 0x35, 0x4d, 0x31, 0x4a,
0x68, 0x71, 0x38, 0x62, 0x6f, 0x6b, 0x68, 0x62, 0x6d, 0x35, 0x52, 0x45,
0x44, 0x71, 0x35, 0x48, 0x64, 0x6c, 0x45, 0x6d, 0x50, 0x2f, 0x4c, 0x56,
0x72, 0x77, 0x76, 0x79, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e,
0x44, 0x20, 0x52, 0x53, 0x41, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54,
0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a
};
unsigned int testuser_key_pem_len = 887;
const char* ssid = "eduroam";
const char* password = "";
const char* host = "ipinfo.io";
unsigned char identity[] = "testuser";
void setup() {
Serial.begin(115200);
delay(100);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.mode(WIFI_STA);
wifi_station_set_username(identity, sizeof(identity));
if( wifi_station_set_cert_key(testuser_cert_pem, testuser_cert_pem_len, testuser_key_pem, testuser_key_pem_len, NULL, 0) == 0 ) {
Serial.println("set cert key");
}
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
wifi_station_clear_cert_key();
wifi_station_clear_username();
}
void loop() {
delay(5000);
Serial.print("connecting to ");
Serial.println(host);
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
client.print(String("GET ") + "/ip" + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(500);
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
return;
}