Skip to content

Commit

Permalink
Expanded on LoadRSAPSSKeyFromBytes definition
Browse files Browse the repository at this point in the history
Signed-off-by: neilnaveen <[email protected]>
  • Loading branch information
neilnaveen committed Nov 20, 2023
1 parent 49cfbde commit d3e2d41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions signerverifier/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ func LoadRSAPSSKeyFromFile(path string) (*SSLibKey, error) {
if err != nil {
return nil, fmt.Errorf("unable to load RSA key from file: %w", err)
}

return LoadRSAPSSKeyFromBytes(contents)
}

// LoadRSAPSSKeyFromFile returns an SSLibKey instance for an RSA key stored in a
// byte array.
// LoadRSAPSSKeyFromBytes is a function that takes a byte array as input, which represents an RSA key.
// It returns an SSLibKey instance, which is a struct that holds the key data.

func LoadRSAPSSKeyFromBytes(contents []byte) (*SSLibKey, error) {
pemData, keyObj, err := decodeAndParsePEM(contents)
if err != nil {
Expand Down

0 comments on commit d3e2d41

Please sign in to comment.