-
Notifications
You must be signed in to change notification settings - Fork 0
/
ldif_test.go
506 lines (484 loc) · 29.8 KB
/
ldif_test.go
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
package ldif
import (
"context"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
var PEMCerts = []string{
`-----BEGIN CERTIFICATE-----
MIIGTjCCBDagAwIBAgIQOFGcgEofbpFK8jifxQuE1jANBgkqhkiG9w0BAQsFADBC
MQswCQYDVQQGEwJCVzEMMAoGA1UEChMDR09WMRIwEAYDVQQLEwlNTklHQS1ESUMx
ETAPBgNVBAMTCENTQ0EtQldBMB4XDTE4MTEyMzEzMTgwMVoXDTMyMTEyMzEzMjc1
MFowQjELMAkGA1UEBhMCQlcxDDAKBgNVBAoTA0dPVjESMBAGA1UECxMJTU5JR0Et
RElDMREwDwYDVQQDEwhDU0NBLUJXQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
AgoCggIBALJuau0gSxwZNpsa2AFSEJs8hP9tjKt33/gsPs+79kFjknPeOAr5PpXL
nWzmrE0Knuhulld9WC9V6KUDsucMB5nkrnE6wBlfSWSn62ovyFyvHZc7HqQArGQI
j0Ktq256jpyU/9tqNF7BgooFYLLeREsbNaeowpST/gpsytAjVxVHcJdRz/97ooVy
0GrRvAoV3Eu/Ztvu3kbrYXvkcVY/CoIyxl2rmcI48Tk/6M9FynQugnQXuZbYUXJp
6SK9FTEky1mw7L1tfRiQeOJbnI6n/b054fDkgmGVeXOgwg8PyWMmTZfHC7gth4G0
biNd952KPf3ZU+R3kWg/RGsc3m24zNN1SJiw+A7dyfc1pMAAL/KPvy5JWWtIENjg
1B2nVRrYNGC3MKWsh384e+dy30wJPYYIK3tvEYk1xPwahaqAMD7ENnHZ+VmZuBQp
6HVaNdySMLOXFgXuSsLbeIPpc5QA89jTYL54Qf39V6u/SnG7XJ+glTPVztsTVPYw
YurxEsaUEKBeU2ulMS8b/uarSp0LdvNdz8nsMi4gsdg5pag8T0mfLJq/jbJSV7E5
kaRybFxwUz77z5+8llVaiU65Bh4TQaheecL9JOASDM8+VN/nRI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n: c=BW,dc=data,dc=download,dc=pkd,dc=icao,dc=int
objectClass: top
objectClass: country
c: BW
dn: o=ml,c=BW,dc=data,dc=download,dc=pkd,dc=icao,dc=int
objectClass: top
objectClass: organization
o: ml
dn: cn=CN\=CSCA-BWA\,OU\=MNIGA-DIC\,O\=GOV\,C\=BW,o=ml,c=BW,dc=data,dc=downl
oad,dc=pkd,dc=icao,dc=int
pkdVersion: 119
sn: 1
cn: CN=CSCA-BWA,OU=MNIGA-DIC,O=GOV,C=BW
objectClass: top
objectClass: person
objectClass: pkdMasterList
objectClass: pkdDownload
pkdMasterListContent:: MIIZigYJKoZIhvcNAQcCoIIZezCCGXcCAQMxDTALBglghkgBZQMEA
gEwggvpBgZngQgBAQKgggvdBIIL2TCCC9UCAQAxggvOMIIFeDCCA2CgAwIBAgIQBMZIPFMa/oFB
kNcCnJprMTANBgkqhkiG9w0BAQsFADBBMREwDwYDVQQLEwhNTEhBLURJQzEMMAoGA1UEChMDR09
WMQswCQYDVQQGEwJCVzERMA8GA1UEAxMIQ1NDQS1CV0EwHhcNMDkwOTE1MDc1MjQyWhcNMjkwOT
E1MDgwMTE1WjBBMREwDwYDVQQLEwhNTEhBLURJQzEMMAoGA1UEChMDR09WMQswCQYDVQQGEwJCV
zERMA8GA1UEAxMIQ1NDQS1CV0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqrKmB
NRKHHR47xpX8ArsQxLkzSP+oA1dnbwmbkohYEuaABB3Oy3uchZv1H/i7oovrJIKxkx9k4l73url
yKqn2xIZd/Ci+Uj2jDIBaCMAPm/bbOa8deIfnpPsGDZy9cT08K0eFyAK9yFZs68penXqjxgOZ2f
y4SNCOjymgYGkXCBrDo+aquhzeWkSFWwNuNl5lMVo+7iAa52M+xcnN88O7DN/7VkTvcfGtEFAC0
8U0L655yqAZF0bl+AEFlaLwtTG+S89FXW0dc7E4a73WAvZYn24kgRj49mCMe9zzS6EyQM/ul2qg
iDwisUFTiGDS79ZkIXj2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uiuri8yAAAAAAAMMAsGCWCGSAFlAwQCAaBmMBUGCSqG
SIb3DQEJAzEIBgZngQgBAQIwHAYJKoZIhvcNAQkFMQ8XDTE5MDQyNDEyMjI1MlowLwYJKoZIhvc
NAQkEMSIEINcU1RJ0W6NH+ghaPgOzlzYJoe8KfOg5POp1nXS2NTBMMA0GCSqGSIb3DQEBCwUABI
IBAGM5k+YUZhAvZq8ytcyg+hefemzL1QxawIbqdAPPdwSnijrdJ5ElpSSWWT6tY0/S7ani6ybTf
TU48E8eavIpVNE5kPsJS4m3/3+YyzPcAqJwYfWQl6qp8Gq3PMP2FWSlI5vsHsyLiv6VgZjjeKnn
q1ZE8Q1Soj/a1Lu3BiRuyYNBw404XWsiJCSZXQLnGOH+nQwDg+0MWrwEQ68Q2vScFU1u1y+/6v/
WpMNYMpl4yqseiQ+hnqqhbOmZrxaCTY9gMr0zL70VwL5LclpNAiXUKPfAwiKCCeb71LmvixsYhC
Lxt1hfLUXdMRU4xr7FarchzAnm/J2Gt5wTwoAAFjWHpoI=
`
var ldifData2 = `dn: c=FI,dc=data,dc=download,dc=pkd,dc=icao,dc=int
objectClass: top
objectClass: country
c: FI
dn: o=ml,c=FI,dc=data,dc=download,dc=pkd,dc=icao,dc=int
objectClass: top
objectClass: organization
o: ml
dn: cn=CN\=CSCA Finland\,OU\=VRK\,O\=Finland\,C\=FI,o=ml,c=FI,dc=data,dc=dow
nload,dc=pkd,dc=icao,dc=int
pkdVersion: 153
sn: 1
cn: CN=CSCA Finland,OU=VRK,O=Finland,C=FI
objectClass: top
objectClass: person
objectClass: pkdMasterList
objectClass: pkdDownload
pkdMasterListContent:: MIIpwQYJKoZIhvcNAQcCoIIpsjCCKa4CAQMxDzANBglghkgBZQMEA
gEFADCCIDsGBmeBCAEBAqCCIC8EgiArMIIgJwIBADGCICAwggWIMIIDcKADAgECAgQAmh0gMA0G
CSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAkZJMRYwFAYDVQQKDA1TdW9taSBGa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4LX+IlDijfqrvC4sttNWtBHa6RopvoxR5cuOZgvqotpqPyRx/Pb32n4
nf7PwwD3f5x+4RlmfvzT23NXUjiIE6PBokHHRwRnDmmgXlJWrOkV9sYhTA+lUkZPY6awmp/Wv5j
+G7AdmOTO54XEWxk6hubbUNM50V02QXh7blRCEcKtlNhji+3iiqXP/d3Bzxd5sJyvyAun3ktzF/
Gq3zXLzgv/Krst+aNClRciWs/ietVSSkSqYsrgk1R0ieNLFXfZ7e9Iwheei04KNHL5MScR608x8
itg+9+VDczLlj8DVTK8g3m5aj4pBuD7ikt2JBHXKvClRDnxJASapSBpepY/U/p7KnLqcwFVSHCe
k5em3cWEY+QeT0K/ObBp/Wv4mhBnKg==
`
const (
bucketName = "rarimo-temp"
fileName = "icaopkd-list.ldif"
)
func TestLDIFToPEM1(t *testing.T) {
converter, err := FromReader(strings.NewReader(ldifData))
if err != nil {
t.Fatal(err)
}
for _, entry := range converter.ToPem() {
if entry == PEMCerts[0] || entry == PEMCerts[1] {
continue
}
t.Fatalf("certificates doesn't equal")
}
}
func TestLDIFToPEM2(t *testing.T) {
converter, err := FromReader(strings.NewReader(ldifData2))
if err != nil {
t.Fatal(err)
}
for _, entry := range converter.ToPem() {
if entry == PEMCerts[0] || entry == PEMCerts[1] {
t.Fatalf("certificates equal")
}
}
}
func TestLDIFFromRemote(t *testing.T) {
data, err := FromS3Bucket(context.Background(), bucketName, fileName)
if err != nil {
t.Fatal(err)
}
assert.NotEqual(t, len(data.ToPem()), 0)
}
// TestLDIFToPubKeys along with other tests coverts all functions in this package
func TestLDIFToPubKeys(t *testing.T) {
testCases := []struct {
name string
ldifData string
wantLen int
}{
{"2_different_keys", ldifData, 2},
{"5_different_keys", ldifData + ldifData2, 5},
{"4_total_keys_with_4_unique", ldifData + ldifData, 2},
}
for _, test := range testCases {
t.Run(test.name, func(t *testing.T) {
converter, err := FromReader(strings.NewReader(test.ldifData))
if err != nil {
t.Fatal(err)
}
keys, err := converter.RawPubKeys()
if err != nil {
t.Fatal(err)
}
if len(keys) != test.wantLen {
t.Fatalf("pubKeys count: want %d, got %d", test.wantLen, len(keys))
}
})
}
}