cchandler/certificate_authority — pull request #29 by reedloden (2013-06-04 01:36:00+00:00)
Title: Random improvements/changes that folks may enjoy

I worked on a side project that used this gem, and I've now become too busy to continue working on this, but I at least wanted to submit a PR so that perhaps others could use some of the changes I made. Sorry that it's all in one commit and that it lacks complete tests. I wish I had more time. :(

List of various improvements:
* Use https:// for rubygems.org gem source
* Add activesupport gem for useful helper functions
* Cap not_before and not_after to the hour
* Use UTC for not_before and not_after
* Add support for setting the criticality of extensions
* Add support for producing a CSR based from an extension
* Add support for importing data from X.509 certificate
* Instead of having to list each extension manually, use ObjectSpace magic to dynamically find them
* Add support for parsing extension information from existing certificates
* Add new serialNumber option to the distinguished name
* Convert openssl_identifier method to use a constant
* Correct documentation for AuthorityKeyIdentifier
* Add support for caIssuers in AuthorityInfoAccess extension
* Remove clientAuth from default extendedKeyUsage extension usage
* Add support for deprecated nsComment and nsCertType extensions
* Initialize the serial_number to be a random number (2^128)
* Add support for parsing extension information from existing CSRs
* Require a private key before trying to produce a valid CSR
* Add/update some tests

TODO: Tests for all my changes

Anyway, best of luck!