From 0e07af5c6a937fe6495e073f3811386e21d49e11 Mon Sep 17 00:00:00 2001 From: Dimitrij Drus Date: Thu, 5 Mar 2026 09:25:50 +0100 Subject: [PATCH 1/2] chore: set minimal supported go version to 1.24.13 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 465ae88..b71f3ec 100644 --- a/go.mod +++ b/go.mod @@ -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 From b54730f6caa0b232300a48a33d1fdb7fed416b6a Mon Sep 17 00:00:00 2001 From: Dimitrij Drus Date: Thu, 5 Mar 2026 09:33:04 +0100 Subject: [PATCH 2/2] removed test which were using rsa512 as this algorithm is not supported by the used go version anymore --- asymmetric_test.go | 4 ---- signer_test.go | 28 ---------------------------- 2 files changed, 32 deletions(-) diff --git a/asymmetric_test.go b/asymmetric_test.go index 62530dc..17ac46d 100644 --- a/asymmetric_test.go +++ b/asymmetric_test.go @@ -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) @@ -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}, diff --git a/signer_test.go b/signer_test.go index 3d375fd..4c41172 100644 --- a/signer_test.go +++ b/signer_test.go @@ -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") @@ -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",