riboseinc / digicert

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

Support for multiple intermediate certificates #109

Closed abunashir closed 7 years ago

abunashir commented 7 years ago

In some rare occasion, Digicert pem includes four certificates, the first one is the certificate, last one is the root certificate and in the middle there could be one/two intermediate certificates

This commit adds support for this rare case scenario. Normally the intermediate_certificate has the value of the certificate, but if there are two intermediate certificates then it is an array of two intermediate certificates.

This commit also add another hash key as text, which is the actual API response body without splitting it.

Solves #108! Cheers.