-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed LoadKeyFromSSLibBytes to Support RSA Keys #60
Changed LoadKeyFromSSLibBytes to Support RSA Keys #60
Conversation
neilnaveen
commented
Nov 7, 2023
- Changed LoadKeyFromSSLibBytes to support RSA keys
- Seperated LoadRSAPSSKeyFromFile into helper function LoadRSAPSSKeyFromBytes so that data can be passed as a byte array or as a file name.
- Made LoadRSAPSSKeyFromBytes into an exported function to use in Support Loading Key for RSA gittuf/gittuf#174
- Added test for RSA key to SSLibKey for LoadKeyFromSSLibbytes
- Changed LoadKeyFromSSLibBytes to support RSA keys - Seperated LoadRSAPSSKeyFromFile into helper function LoadRSAPSSKeyFromBytes so that data can be passed as a byte array or as a file name. - Made LoadRSAPSSKeyFromBytes into an exported function to use in gittuf/gittuf#174 - Added test for RSA key to SSLibKey for LoadKeyFromSSLibbytes Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, make sure to run go fmt ./...
!
Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I don't have permissions. @adityasaky may have other comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, but I think this is fine. @mnm678 can you take a look too? Thanks!
signerverifier/rsa.go
Outdated
|
||
// LoadRSAPSSKeyFromFile returns an SSLibKey instance for an RSA key stored in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some information about the expected encoding of the key in the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have expanded on this, if their is something else you would like to add, tell me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you indicate the RSA key is expected to be PEM encoded on disk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Also, looks like |
Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>