Skip to content

Commit

Permalink
Revert "Remove unused GetPublicKeys"
Browse files Browse the repository at this point in the history
This reverts commit 3daaeeb.
  • Loading branch information
ethan-lowman-dd committed Mar 27, 2022
1 parent 3daaeeb commit dbe6a4d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1528,3 +1528,15 @@ func (r *Repo) timestampFileMeta(roleFilename string) (data.TimestampFileMeta, e
}
return util.GenerateTimestampFileMeta(bytes.NewReader(b), r.hashAlgorithms...)
}

func (r *Repo) GetPublicKeys(role string) ([]*data.PublicKey, error) {
signers, err := r.local.GetSigners(role)
if err != nil {
return nil, err
}
pubkeys := []*data.PublicKey{}
for _, signer := range signers {
pubkeys = append(pubkeys, signer.PublicData())
}
return pubkeys, nil
}

0 comments on commit dbe6a4d

Please sign in to comment.