-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: sign gems #68
base: master
Are you sure you want to change the base?
feat: sign gems #68
Conversation
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.
Hello @fauno, thank you for your PR. I have some comments on it that could possibly require changes.
As I'm not familiar with recent RubyGems developments around signing, it will be great if you can provide a bit more verbose context/background on the feature and the expected behavior.
Thank you.
if @options[:sign_private_key_file] | ||
gemspec.cert_chain = [@options[:sign_cert_file]] | ||
gemspec.signing_key = @options[:sign_private_key_file] | ||
end |
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.
From what I understand of this, if you provide --sign
via the CLI, it then will take whatever is the value of @options[:sign_cert_file]
as part of the chain, but that option is not validated.
Is OK for the gemspec to have a cert_chain
with [nil]
in it?
If not, then --cert
must be required once --sign
is used and thus, require validation.
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.
Yeah, currently you would have an exception thrown because the cert isn't valid. I'll provide an error message!
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.
Done!
With This PR allows |
adds gem signing to gem-compiler
https://guides.rubygems.org/security/