Skip to content
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

Feature Request: Add ability to specify expiration length with gem cert command #1719

Closed
djberg96 opened this issue Sep 21, 2016 · 3 comments · Fixed by #1725
Closed

Feature Request: Add ability to specify expiration length with gem cert command #1719

djberg96 opened this issue Sep 21, 2016 · 3 comments · Fixed by #1725

Comments

@djberg96
Copy link
Contributor

The cert I generated (using gem cert --build) expired after a year.

I would like the ability to add the length of time before the cert expires, in days. At the moment it looks like it's fixed at one year. Perhaps a "-t/--time" command line switch.

@bronzdoc
Copy link
Member

Would -d/--days make more sense?

@djberg96
Copy link
Contributor Author

@bronzdoc Works for me!

homu added a commit that referenced this issue Sep 29, 2016
…nzdoc

Add cert expiration length flag

# Description:
This PR adds the ability to specify an expiration length with the gem cert command using the `-d/--days` flag

closes #1719

cc @djberg96
______________

# Tasks:

- [ ] Describe the problem / feature
- [ ] Write tests
- [ ] Write code to solve the problem
- [ ] Get code review from coworkers / friends

I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
@grempe
Copy link

grempe commented Oct 13, 2016

Just in case anyone is landing on this issue looking for a way to generate longer duration certs for signing ruby gems.

Until this code is released (or if you a pinned to an older version of rubygems), I created a tiny script that simply monkey-patches the Gem::Security::ONE_YEAR constant to be a multiple of years instead of hard-coded to a single year.

I have tested it on a single release of my own and it seems to be ok. Use at your own risk of course. Its a pretty simple change though.

https://gist.github.com/grempe/f2a9822578d46c0545b614ced20d5695

See also:

djberg96/sys-uname#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants