Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions asymmetric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ func TestRSASignerSignPayload(t *testing.T) {

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

pk512, err := rsa.GenerateKey(rand.Reader, 512) //nolint:gosec
require.NoError(t, err)

pk2048, err := rsa.GenerateKey(rand.Reader, 2048)
require.NoError(t, err)

Expand All @@ -172,7 +169,6 @@ func TestRSASignerSignPayload(t *testing.T) {
alg SignatureAlgorithm
err error
}{
{uc: "message too long", key: pk512, alg: RsaPkcs1v15Sha512, err: rsa.ErrMessageTooLong},
{uc: "2048 key with RsaPkcs1v15Sha256", key: pk2048, alg: RsaPkcs1v15Sha256},
{uc: "3072 key with RsaPkcs1v15Sha384", key: pk3072, alg: RsaPkcs1v15Sha384},
{uc: "4096 key with RsaPkcs1v15Sha512", key: pk4096, alg: RsaPkcs1v15Sha512},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dadrus/httpsig

go 1.23.12
go 1.24.13

require (
github.com/dunglas/httpsfv v1.1.0
Expand Down
28 changes: 0 additions & 28 deletions signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ func TestSignerSign(t *testing.T) {
pkp384, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
require.NoError(t, err)

pk512, err := rsa.GenerateKey(rand.Reader, 512) //nolint:gosec
require.NoError(t, err)

blockPrivate, _ := pem.Decode([]byte(testPrivKeyRSAPSS))
assert.NotNil(t, blockPrivate, "could not decode test private key pem")

Expand Down Expand Up @@ -415,31 +412,6 @@ func TestSignerSign(t *testing.T) {
require.Error(t, err)
},
},
{
uc: "failed signing payload",
key: Key{KeyID: "test", Algorithm: RsaPkcs1v15Sha512, Key: pk512},
opts: []SignerOption{
WithComponents("@authority"),
},
msg: &Message{
Method: http.MethodPost,
Authority: "example.com",
URL: testURL,
Header: http.Header{
"Host": []string{"example.com"},
"Date": []string{"Tue, 20 Apr 2021 02:07:55 GMT"},
"Content-Type": []string{"application/json"},
"Content-Digest": []string{"sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:"},
"Content-Length": []string{"18"},
},
IsRequest: true,
},
assert: func(t *testing.T, err error, _ http.Header) {
t.Helper()

require.Error(t, err)
},
},
{
// https://www.rfc-editor.org/rfc/rfc9421.html#name-minimal-signature-using-rsa
uc: "B.2.1. minimal signature using rsa-pss-sha512",
Expand Down
Loading