Conversation
luislavena
left a comment
There was a problem hiding this comment.
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.
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.
Yeah, currently you would have an exception thrown because the cert isn't valid. I'll provide an error message!
With This PR allows |
adds gem signing to gem-compiler
https://guides.rubygems.org/security/