Skip to content

Commit 27b7ce7

Browse files
committed
refactor(utilities): improve formatting in ParseRsaPublicKey function
1 parent 27e570e commit 27b7ce7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utilities/utilities.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ func ParseRsaPublicKey(key []byte) (*rsa.PublicKey, error) {
152152
return nil, err
153153
}
154154

155-
publicKey, ok := value.(*rsa.PublicKey)
156-
if !ok {
157-
return nil,fmt.Errorf("not an rsa key")
158-
}
159-
return publicKey, nil
155+
publicKey, ok := parsedKey.(*rsa.PublicKey)
156+
if !ok {
157+
return nil, fmt.Errorf("not an rsa key")
158+
}
159+
return publicKey, nil
160160
}
161161

162162
// MustParseRsaPublicKey parses a public key in PEM format and returns the rsa.PublicKey object.

0 commit comments

Comments
 (0)