bartbutenaers / node-red-contrib-letsencrypt

A Node-RED node to request and renew LetsEncrypt certificates.
Apache License 2.0
7 stars 2 forks source link

Support certificate chain #3

Open bartbutenaers opened 2 years ago

bartbutenaers commented 2 years ago

Some people get this error (when they try to get a valid certificate from the keystore):

image

Following this issue, the Length of buffer does not match length of ASN.1 sequence is caused when a certificate chain is used instead of only the server certificate.

And indeed in one of the cases that I examined, a certificate chain was being used:

image

So instead of sending a single certificate in the output message, I need to split the pem file based on newlines. Then I can send the certificate chain as an array in the output message:

image

The R3 certificate is the intermediate certificate chain from Letsencrypt, as you can see here.