We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA certs may be many in number, in which case they can be parsed and served as an array of certs, as noted in this article: http://nodejs.md/blog/https-server-with-multiple-domains-on-same-port-and-instance/
This is the relevant code:
function sslCAdecode(source) { var ca = []; if (!source || typeof(source) !== "string") return ca; ca = source.split(/-----END CERTIFICATE-----[\s\n]+-----BEGIN CERTIFICATE-----/).map(function (v, k, arr) { if (k) { v = '-----BEGIN CERTIFICATE-----' + v; } if (k !== arr.length - 1) { v = v + '-----END CERTIFICATE-----'; } v = v.replace(/^\n+/,'').replace(/\n+$/,''); return v; }); return ca; };
Use:
creds.ca = sslCAdecode( fs.readFileSync( site.credentials.ca, 'utf8') );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
CA certs may be many in number, in which case they can be parsed and served as an array of certs, as noted in this article:
http://nodejs.md/blog/https-server-with-multiple-domains-on-same-port-and-instance/
This is the relevant code:
Use:
The text was updated successfully, but these errors were encountered: