Skip to content

Commit

Permalink
Remove runtime patch for SHA1 support in X.509 certs (#24243)
Browse files Browse the repository at this point in the history
This code only executes when the Vault version is <1.11,
so is now dead code and can be removed safely.
  • Loading branch information
Christopher Swenson authored Nov 27, 2023
1 parent 511ce92 commit 904c08e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 71 deletions.
6 changes: 0 additions & 6 deletions builtin/credential/aws/pkcs7/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ import (
"fmt"
"math/big"
"time"

"github.com/hashicorp/vault/internal"
)

func init() {
internal.PatchSha1()
}

// SignedData is an opaque data structure for creating signed data payloads
type SignedData struct {
sd signedData
Expand Down
59 changes: 0 additions & 59 deletions internal/go118_sha1_patch.go

This file was deleted.

6 changes: 0 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ import (
"os"

"github.com/hashicorp/vault/command"
"github.com/hashicorp/vault/internal"
)

func init() {
// this is a good place to patch SHA-1 support back into x509
internal.PatchSha1()
}

func main() {
os.Exit(command.Run(os.Args[1:]))
}

0 comments on commit 904c08e

Please sign in to comment.