cchandler / certificate_authority

Ruby gem for managing the core functions outlined in RFC-3280 for PKI
https://github.com/cchandler/certificate_authority
194 stars 44 forks source link

Sign CSRs with their private key #27

Closed elijh closed 11 years ago

elijh commented 12 years ago

For a CSR to be valid, it must be signed by the private key that corresponds to the CSR.

There is a handy tool to validate CSRs here: http://certlogik.com/decoder/

This small patch ensures that the CSR is signed.

CosmicCat commented 11 years ago

Oh wows, I was about to submit a patch for this. Let's get this change out!

elijh commented 11 years ago

So far, crickets from cchandler. At some point, it might be time to fork. There are a bunch of other patches I would like to submit, but I have held off until life appears again in this project.

CosmicCat commented 11 years ago

It looks like your patch will break if the CSR is loaded from a file and to_x509_csr is called. Raising an error on lack of private key would at least prevent that. Of course that behavior probably falls outside of the use case for this gem.

cchandler commented 11 years ago

Sorry! I've been an OSS jerk :-). I had an overly aggressive email filter... Let me try and take a solid look at this, this weekend.

elijh commented 11 years ago

Cool! No worries. Glad to hear you are back.

cchandler commented 11 years ago

Thanks for the contribution! Merged.