Skip to content

Commit

Permalink
Make SHA256KeyID public again
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Sirish <aditya@saky.in>
  • Loading branch information
adityasaky committed May 2, 2023
1 parent e6e1a9e commit 872fa47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsse/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (ev *EnvelopeVerifier) Verify(ctx context.Context, e *Envelope) ([]Accepted

// Verifiers that do not provide a keyid will be generated one using public.
if err != nil || keyID == "" {
keyID, err = sha256KeyID(v.Public())
keyID, err = SHA256KeyID(v.Public())
if err != nil {
keyID = ""
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func NewMultiEnvelopeVerifier(threshold int, p ...Verifier) (*EnvelopeVerifier,
return &ev, nil
}

func sha256KeyID(pub crypto.PublicKey) (string, error) {
func SHA256KeyID(pub crypto.PublicKey) (string, error) {
// Generate public key fingerprint
sshpk, err := ssh.NewPublicKey(pub)
if err != nil {
Expand Down

0 comments on commit 872fa47

Please sign in to comment.