-
Notifications
You must be signed in to change notification settings - Fork 46
/
algo_rs_test.go
339 lines (317 loc) · 17.6 KB
/
algo_rs_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
package jwt
import (
"crypto/rsa"
"testing"
)
func TestRS(t *testing.T) {
testCases := []struct {
alg Algorithm
privateKey *rsa.PrivateKey
publicKey *rsa.PublicKey
wantErr error
}{
{RS256, rsaPrivateKey256, rsaPublicKey256, nil},
{RS384, rsaPrivateKey384, rsaPublicKey384, nil},
{RS512, rsaPrivateKey512, rsaPublicKey512, nil},
{RS512, rsaPrivateKey512Other, rsaPublicKey512Other, nil},
{RS256, rsaPrivateKey256, rsaPublicKey256Another, ErrInvalidSignature},
{RS384, rsaPrivateKey384, rsaPublicKey384Another, ErrInvalidSignature},
{RS512, rsaPrivateKey512, rsaPublicKey512Another, ErrInvalidSignature},
{RS256, rsaPrivateKey256Another, rsaPublicKey256, ErrInvalidSignature},
{RS384, rsaPrivateKey384Another, rsaPublicKey384, ErrInvalidSignature},
{RS512, rsaPrivateKey512Another, rsaPublicKey512, ErrInvalidSignature},
{RS512, rsaPrivateKey512Other, rsaPublicKey512, ErrInvalidSignature},
}
for _, tc := range testCases {
signer, errSigner := NewSignerRS(tc.alg, tc.privateKey)
mustOk(t, errSigner)
verifier, errVerifier := NewVerifierRS(tc.alg, tc.publicKey)
mustOk(t, errVerifier)
token, err := NewBuilder(signer).Build(simplePayload)
mustOk(t, err)
err = verifier.Verify(token)
mustEqual(t, err, tc.wantErr)
}
}
func TestRS_BadKeys(t *testing.T) {
testCases := []struct {
err error
wantErr error
}{
{getErr(NewSignerRS(RS256, nil)), ErrNilKey},
{getErr(NewSignerRS(RS384, nil)), ErrNilKey},
{getErr(NewSignerRS(RS512, nil)), ErrNilKey},
{getErr(NewSignerRS("foo", rsaPrivateKey384)), ErrUnsupportedAlg},
{getErr(NewVerifierRS(RS256, nil)), ErrNilKey},
{getErr(NewVerifierRS(RS384, nil)), ErrNilKey},
{getErr(NewVerifierRS(RS512, nil)), ErrNilKey},
{getErr(NewVerifierRS("boo", rsaPublicKey384)), ErrUnsupportedAlg},
}
for _, tc := range testCases {
mustEqual(t, tc.err, tc.wantErr)
}
}
var (
rsaPrivateKey256 = mustParseRSAKey(testKeyRSA1024)
rsaPrivateKey384 = mustParseRSAKey(testKeyRSA2048)
rsaPrivateKey512 = mustParseRSAKey(testKeyRSA4096)
rsaPrivateKey512Other = mustParseRSAKey(testKeyRSA4096Other)
rsaPublicKey256 = &rsaPrivateKey256.PublicKey
rsaPublicKey384 = &rsaPrivateKey384.PublicKey
rsaPublicKey512 = &rsaPrivateKey512.PublicKey
rsaPublicKey512Other = &rsaPrivateKey512Other.PublicKey
rsaPrivateKey256Another = mustParseRSAKey(testKeyRSA1024Another)
rsaPrivateKey384Another = mustParseRSAKey(testKeyRSA2048Another)
rsaPrivateKey512Another = mustParseRSAKey(testKeyRSA4096Another)
rsaPublicKey256Another = &rsaPrivateKey256Another.PublicKey
rsaPublicKey384Another = &rsaPrivateKey384Another.PublicKey
rsaPublicKey512Another = &rsaPrivateKey512Another.PublicKey
)
// To generate keys:
// RS256
// openssl genrsa -out rs256-1024-private.rsa 1024
// RS384
// openssl genrsa -out rs384-2048-private.rsa 2048
// RS512
// openssl genrsa -out rs512-4096-private.rsa 4096
const (
testKeyRSA1024 = `-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDZY2zMlYH8Onz1eAxYc6IdyPT5AmVsae/Q2+wuhFcf6DrGRrBj
cHDFBuVYm7zwlCdqjfGIxN4iYLG+TCRHhwY2dGCtDysgsQE4QiLZom5xRLW1CSJV
Z0rmL3/wmWdrCJQd7FMreaqwZyHMOAt/jHEZGMz09LpVL/OtOHxvwhmY8wIDAQAB
AoGAOm0cesfcDbxyhU7kkolRkwvFu39HXyIB0HKrQb1T5UF3On8ZPUClLm8yCOSi
nU5UYbEQr5+pzDeMzgaM4aSKqG0z13BTHwDF5nNXz7gPj8VOEfzKP3tdCh9vqlNQ
VbYc4/JSXBI+JbreUB3NaqFh4nCFy5vhYcs+64gAYdr3ioECQQDzfNLUgqhgcOlO
1Q4+xUimuVp7VAPrkVCQkdff57QMv6mBrBvoRrciFx50l1pkYeEZyBMct1Fokns9
JyPrafrTAkEA5I9BgSscQjDrUSjzPjtfQIGNd9s4brlcAGW+OOwm2+8NCLCPbam8
nplUQxjdsj1/SyTpudMz9s7T4D5G0cDVYQJBANZO0HZRRggUeZV0OySOmkJ8tCIG
saieb02/wEUH+FacP4KtzKZlz3yG4rx2Fw5xhCIgEopc459qBmSt1ZS35BcCQEqu
XHL+SR9/qIQ+YyyEbd0/95+gK9JSErO2iu9Cinf2pkWem17zxUP1SckayOXCnmNJ
Tm1/i00ry6NL9gv3fE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