riboseinc / digicert

Ruby bindings for the Digicert Services API
https://www.digicert.com/services/v2/documentation
MIT License
8 stars 10 forks source link

Dynamically generate CSR using OpenSSL #88

Closed abunashir closed 7 years ago

abunashir commented 7 years ago

This commit adds a CSR generator, which expects two hash keys and it will generate the CSR content that can be used to request any certificate through Digicert. We separated it as separate support helper so we can use it from any of the specs file. Usage

Digicert::CSRGenerator.generate(
  domain: domain_name, organization: organization,
)
ronaldtse commented 7 years ago

Nice stuff @abunashir ! Since we're cleaning this up, I'd like to add that some SSL certificates can have more than one domain name.

The first domain name is the "CN" (Common Name), and any extra domain names are called the "SAN" (Subject Alternative Names).

Here's a link on how to insert the SANs in a CSR using Ruby

abunashir commented 7 years ago

@ronaldtse: I just updated the generation process, please check it out and let me know.

ronaldtse commented 7 years ago

Yup, looks good, thanks.