Skip to content

Commit b54730f

Browse files
committed
removed test which were using rsa512 as this algorithm is not supported by the used go version anymore
1 parent 0e07af5 commit b54730f

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

asymmetric_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ func TestRSASignerSignPayload(t *testing.T) {
154154

155155
message := []byte("test message")
156156

157-
pk512, err := rsa.GenerateKey(rand.Reader, 512) //nolint:gosec
158-
require.NoError(t, err)
159-
160157
pk2048, err := rsa.GenerateKey(rand.Reader, 2048)
161158
require.NoError(t, err)
162159

@@ -172,7 +169,6 @@ func TestRSASignerSignPayload(t *testing.T) {
172169
alg SignatureAlgorithm
173170
err error
174171
}{
175-
{uc: "message too long", key: pk512, alg: RsaPkcs1v15Sha512, err: rsa.ErrMessageTooLong},
176172
{uc: "2048 key with RsaPkcs1v15Sha256", key: pk2048, alg: RsaPkcs1v15Sha256},
177173
{uc: "3072 key with RsaPkcs1v15Sha384", key: pk3072, alg: RsaPkcs1v15Sha384},
178174
{uc: "4096 key with RsaPkcs1v15Sha512", key: pk4096, alg: RsaPkcs1v15Sha512},

signer_test.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ func TestSignerSign(t *testing.T) {
291291
pkp384, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
292292
require.NoError(t, err)
293293

294-
pk512, err := rsa.GenerateKey(rand.Reader, 512) //nolint:gosec
295-
require.NoError(t, err)
296-
297294
blockPrivate, _ := pem.Decode([]byte(testPrivKeyRSAPSS))
298295
assert.NotNil(t, blockPrivate, "could not decode test private key pem")
299296

@@ -415,31 +412,6 @@ func TestSignerSign(t *testing.T) {
415412
require.Error(t, err)
416413
},
417414
},
418-
{
419-
uc: "failed signing payload",
420-
key: Key{KeyID: "test", Algorithm: RsaPkcs1v15Sha512, Key: pk512},
421-
opts: []SignerOption{
422-
WithComponents("@authority"),
423-
},
424-
msg: &Message{
425-
Method: http.MethodPost,
426-
Authority: "example.com",
427-
URL: testURL,
428-
Header: http.Header{
429-
"Host": []string{"example.com"},
430-
"Date": []string{"Tue, 20 Apr 2021 02:07:55 GMT"},
431-
"Content-Type": []string{"application/json"},
432-
"Content-Digest": []string{"sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:"},
433-
"Content-Length": []string{"18"},
434-
},
435-
IsRequest: true,
436-
},
437-
assert: func(t *testing.T, err error, _ http.Header) {
438-
t.Helper()
439-
440-
require.Error(t, err)
441-
},
442-
},
443415
{
444416
// https://www.rfc-editor.org/rfc/rfc9421.html#name-minimal-signature-using-rsa
445417
uc: "B.2.1. minimal signature using rsa-pss-sha512",

0 commit comments

Comments
 (0)