Some people get this error (when they try to get a valid certificate from the keystore):
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:
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:
The R3 certificate is the intermediate certificate chain from Letsencrypt, as you can see here.
Some people get this error (when they try to get a valid certificate from the keystore):
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:
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:
The R3 certificate is the intermediate certificate chain from Letsencrypt, as you can see here.