reaperhulk/r509 — pull request #60 by reaperhulk (2013-08-26 04:16:35+00:00)
Title: Extension + Config Refactor

This pull request addresses #50 and dramatically refactors extensions and configs.

* The CertProfile object now immediately instantiates extension objects, which are then just passed to the ProfileEnforcer as is.
* Each extension class has been split into its own file
* Each extension now has more robust validation when checking to see if it's an existing extension that should be parsed or a hash to create a new extension
* Extension hashes now use :value on extensions where only one set of values is expected (e.g., KeyUsage, ExtendedKeyUsage, et cetera). This is in contrast to the previous model where each extension had a different hash key.
* Many extension attr readers have changed
* ocsp_location and ca_issuers_location YAML nodes hav been refactored and now appear under authority_info_access
* cdp_location has been renamed to crl_distribution_points
* Any extension that can take a GeneralName now requires you to pass a hash of type/value (e.g., AuthorityInfoAccess ocsp_location/ca_issuers_location and crl_distribution_points)
* R509::ASN1::* policy objects that are helper classes for CertificatePolicies have been moved into R509::Cert::Extensions::CertificatePolicies::*
* Improved test coverage on R509::Engine.instance.load
* Refactor R509::ValidationMixin. Most methods went into the individual extension classes, but some stayed in the mixin and were placed in R509::Cert::Extensions::ValidationMixin
* Each extension can now serialize to YAML or a hash (to_h and to_yaml methods)
* CertProfile can now serialize to YAML
* Improved test coverage
* Documentation updates (This is WIP)