forked from nymsio/pgpmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestkeys_test.go
447 lines (406 loc) · 19.7 KB
/
testkeys_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
package pgpmail
import (
"math/rand"
"strings"
"time"
"golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/packet"
)
var testKeys KeySource
type determRand struct {
*rand.Rand
}
func (d *determRand) Read(p []byte) (int, error) {
for i := range p {
p[i] = byte(d.Int())
}
return len(p), nil
}
type nullRand int
func (nullRand) Read(p []byte) (int, error) {
for i := range p {
p[i] = 0
}
return len(p), nil
}
func init() {
pub, sec := loadTestKeyring()
testKeys = &testKeySource{pub, sec}
timeHook := func() time.Time {
return time.Unix(0, 0)
}
testingRandHook = &determRand{rand.New(rand.NewSource(0))}
openpgpConfig = &packet.Config{Rand: testingRandHook, Time: timeHook}
}
type testData struct {
pubkey string
seckey string
}
type testKeySource struct {
pubkeys openpgp.EntityList
seckeys openpgp.EntityList
}
func (tks *testKeySource) GetPublicKeyRing() openpgp.EntityList {
return tks.pubkeys
}
func (tks *testKeySource) GetPublicKey(address string) (*openpgp.Entity, error) {
return firstKeyByEmail(address, tks.pubkeys), nil
}
func (tks *testKeySource) GetAllPublicKeys(address string) (openpgp.EntityList, error) {
return keysByEmail(address, tks.pubkeys), nil
}
func (tks *testKeySource) GetPublicKeyById(keyid uint64) *openpgp.Entity {
return keyById(keyid, tks.pubkeys)
}
func (tks *testKeySource) GetSecretKeyRing() openpgp.EntityList {
return tks.seckeys
}
func (tks *testKeySource) GetSecretKey(address string) (*openpgp.Entity, error) {
return firstKeyByEmail(address, tks.seckeys), nil
}
func (tks *testKeySource) GetAllSecretKeys(address string) (openpgp.EntityList, error) {
return keysByEmail(address, tks.seckeys), nil
}
func (tks *testKeySource) GetSecretKeyById(keyid uint64) *openpgp.Entity {
return keyById(keyid, tks.seckeys)
}
func keyById(keyid uint64, keys openpgp.EntityList) *openpgp.Entity {
ks := keys.KeysById(keyid)
if len(ks) == 0 {
return nil
}
return ks[0].Entity
}
func firstKeyByEmail(email string, keys openpgp.EntityList) *openpgp.Entity {
ks := keysByEmail(email, keys)
if len(ks) == 0 {
return nil
}
return ks[0]
}
func keysByEmail(email string, keys openpgp.EntityList) openpgp.EntityList {
var matching openpgp.EntityList
for _, e := range keys {
if matchesEmail(email, e) {
matching = append(matching, e)
}
}
return matching
}
func matchesEmail(email string, e *openpgp.Entity) bool {
for _, v := range e.Identities {
if v.UserId.Email == email {
return true
}
}
return false
}
func loadTestKeyring() (pub, sec openpgp.EntityList) {
pub = openpgp.EntityList{}
sec = openpgp.EntityList{}
for _, v := range testDataMap {
pub = append(pub, toEntity(v.pubkey))
sec = append(sec, toEntity(v.seckey))
}
return pub, sec
}
func toEntity(k string) *openpgp.Entity {
es, err := openpgp.ReadArmoredKeyRing(strings.NewReader(k))
if err != nil {
logger.Panicf("Error reading key: %v", err)
} else if len(es) != 1 {
logger.Panicf("Expecting a single entity, got len = %d", len(es))
}
return es[0]
}
var testDataMap = map[string]testData{
// pub 1024R/29DE5FB4 2014-05-13
// Key fingerprint = 537C 889B FADD D765 38A0 4198 61B5 566D 29DE 5FB4
// uid Test User 1 <user1@example.com>
// sub 1024R/D1056A44 2014-05-13
"user1": testData{
`-----BEGIN PGP PUBLIC KEY BLOCK-----
mI0EU3HPmwEEANbC5eeBWivZS+taHeKlvhuYfQuthY0daQNbhw0HitIU+57ySxi1
f88o6yqSw2sxzk3G9Jdfjq7zUOQwbOBKDdfzhNxWcUXP407M8rBp0Y8xiWwn1NSP
Q4PIGFhKO+FRUz74A1aG6bC9Bs92Ns2DfhfHFjkmuZJxAVcs8OQQeMF3ABEBAAG0
H1Rlc3QgVXNlciAxIDx1c2VyMUBleGFtcGxlLmNvbT6ItwQTAQoAIQUCU3HPmwIb
AwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBhtVZtKd5ftIlyA/4iRQEWNUAk
TajfCE8KJ06HzhSN37RB6BXcDkBUSh2Ge/QO1T6aCs9Urh69a0mV93qI42wfdPln
OSNuTaXCwD2efRuxqwEqFKjqlY7J8aDK3Lwd0+2URn1MQMdNNfk893B892Z20PrZ
RQl+5OwY1Dxd3RG7xFQq8HoB3lYaSVu0z7iNBFNxz5sBBADIC8CJ7SS9zAKhCH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+6bN5fKXOkD17vxPZiC9mQkVh717FrvybcKDsax7z3I0I/5sWm+pO8bF
ccZ8PIdt0D021xSTT2uQvdnriuaLPnQL9Oovf2qYCrNd
=B3Dj
-----END PGP PRIVATE KEY BLOCK-----
`},
//pub 1024R/441EFFBB 2014-05-13
// Key fingerprint = 02C5 D723 E22B F908 EEB5 7E24 6154 BDCE 441E FFBB
//uid Test User 2 <user2@example.com>
// sub 1024R/34E60110 2014-05-13
"user2": testData{
`-----BEGIN PGP PUBLIC KEY BLOCK-----
mI0EU3HcewEEAMBYSfn7JlorQIAqh3NwFs5o8jWwWbF+K7rFHxo28JaHJ/a8XBmX
mv1lBlUmFuMUcvydegRIDwm1HEzyA4K6mckT35c5009GtA4l53pH1zTIyXZ9swFT
1D4+YjKbd0hQhItsYrmiNCHzKnswvvyjK4o6hFLtLFkwUC41QrNEoeHtABEBAAG0
H1Rlc3QgVXNlciAyIDx1c2VyMkBleGFtcGxlLmNvbT6ItwQTAQoAIQUCU3HcewIb
AwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBhVL3ORB7/uwjdA/wOJO5V/178
ks8hNWW5Dmtfj3aGh2obPUrefyzdalarumYYvpxbmFta7sDXbwWv1gDNRxfbx1Eo
m+J9L9gAnYQkWs90F1UaXSITO36SPeB58hYOmhVKqCXnWiFeJF/ng3XBQDmVEU3y
eYmnwBKwV4yuG1EMn7t2bdRz7FWhZ9vjtriNBFNx3HsBBADQKB90u7fg9FW08/cG
ZvcFKscmuI37qVjUNILmFN2jZnfxt2SzUgFUi08CR4wYNOWcwHOkvq8WBp60wpkD
rRN/j398uLec2Wgq/Jz0SxhCXWIxfJ8Q5596459KnQFsgg3y1thtYirp4ckGncRF
FHKAqCUjbHBm98v1TG19jKuBuwARAQABiJ8EGAEKAAkFAlNx3HsCGwwACgkQYVS9
zkQe/7uEQwP9FZfYJUlDShHShoOTSDXF59HkT3rmyTIGPLGaOmclfIQI+dFTg5Qp
+4qYWwFGXQ9pJZiK6yej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AOZURTfJ5iafA
ErBXjK4bUQyfu3Zt1HPsVaFn2+O2nQHYBFNx3HsBBADQKB90u7fg9FW08/cGZvcF
KscmuI37qVjUNILmFN2jZnfxt2SzUgFUi08CR4wYNOWcwHOkvq8WBp60wpkDrRN/
j398uLec2Wgq/Jz0SxhCXWIxfJ8Q5596459KnQFsgg3y1thtYirp4ckGncRFFHKA
qCUjbHBm98v1TG19jKuBuwARAQABAAP+OvJRzh3muZaXutGnr7Fy3Iy7rvRuiMjx
Nc7VDtDz3vUCnHnh04IyjD2TF0MpoiVArL43QX0aWfNv+CJvcIIP1flqcdRJTwCa
98ph5GtWus9eVITOpEeifoY8pyId5yamr5iCFZN1BDfSclCJFJ8DRz04umI4mD4q
w2qU9GVi2DkCANEC1o5SXQ3+Ygij/7iE76WoNqRpKOesuTHvUuzfXUzN5d4jEAX6
7ACAhgYHMr2hpd1kfttlwUvpc6NOxczrPI0CAP70HTzgmoSVDQHMXNLBleuBs9iD
BsUiaYOEVR3uewNYp84FWqKf3UKBwjlekV2I6pC1XWsp+vnR54mG5yrl+WcB+gIL
j8Z6ioe0h589uAw/ZY/NaOKsgB32NZSCqXEHR3K+/O01FLnR5kz46pOjsEtxy9q/
IQbjvoZxYYT+d5kHuDGqk4ifBBgBCgAJBQJTcdx7AhsMAAoJEGFUvc5EHv+7hEMD
/RWX2CVJQ0oR0oaDk0g1xefR5E965skyBjyxmjpnJXyECPnRU4OUKfuKmFsBRl0P
aSWYiusnoyeUyuyJlHtZFsCotcyt3ySndZUM8VbPvo1gSPPGvudoFeehPmxBQlA1
oxTtc+D5EwBQdXFYm+UTHOCeRJMWaQ5NARUWuTJMgxOd
=Y1Ut
-----END PGP PRIVATE KEY BLOCK-----
`},
// pub 2048R/2D3B0D32 2014-08-10
// uid [ultimate] Test User 3 <user3@example.com>
// sub 2048R/2151F2AB 2014-08-10
// (encrypted secret key with passphrase 'testure')
"user3": testData{
`-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFPnNyIBC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whVFLC1QVuS
oaaeAktAGWS2gBfX6DcBE1T2fUqOq+eTS2Lwz4kTDubJ8aahnuTVkwgpQWUkI/5J
EZ36ZItI9b3HVdgJen/gUd2UYvoV5ehvGhNHXWfMsc0vPYnUe3d5M+le0BBCJik4
eyGpHD/OzIptrzk2vkWZpUQ9qaLwudJJSFJ+LQX8yyCohHRMqJOAO+GH8QbQrFGo
0T0SdAlondB9X/k5nfx7VZFqUIiH6ZWtXiMU3dKPqMRA5BoH29t0Tka2Y4ykNLUP
fLUQ6pKo4ufZ2L9wmahFL90VhejPMGGsDcCR7frnzduo4gWBNpynrQIrpaSs/zLy
TQAAUL7Wvt/+C3WkjTrHdwmCzeO2kYpIy4HSHvKNwiX7W5xEz8LdjYOhlfW3BNSG
cArUl6hSdkSOQW9f6IkBHwQYAQoACQUCU+c3IgIbDAAKCRBRaVfjLTsNMrTCB/47
886qGdpqPOt93uozjCUsJ7tWca53wQElWXyMd19FkRn4xN+PRv8dx+4t4T/XiXnl
prqjWrsuHQxLdNyN1t3p9fqir2rkKYZdPO+4Da1gjDGD+u6WAVftJbJCUu3oJD69
BJqecbTtRfUxq/78IJpcxfTIi2PMBJOn3Xvr0Ekr0xEkMenWpyJEqyFl8qdRWZ70
5DN5DIcpbpP//e+xXSh+GYD6uycBQY4w4EMNrKhWanuREYxx8VdHihWWjpSBdJLp
qDfebqKCRNBxJgFDBdltTN3v+w+77AS99aCGudtsZ1V1YTdbO7MlUcs9AzCNkd5+
zEAulT3jecwpYiucf+6Q
=N5iu
-----END PGP PRIVATE KEY BLOCK-----
`},
// pub 2048R/2F7DF019 2014-07-03
// Key fingerprint = 33F5 2D08 B3E4 EADD 2786 0413 0A91 2176 2F7D F019
// uid [ultimate] Test User <user4@example.com>
// sub 2048R/E5D0C257 2014-07-03
"user4": testData{
`-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFO1GiUBCADMTX7vyetvij3oEjxPqaBcgF+w7zYpuo9Ww1QRgBLOe3R8S+Yv
/L+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