crypto: add newline to cert and key if not present
authorFedor Indutny <fedor.indutny@gmail.com>
Mon, 20 Jan 2014 00:37:15 +0000 (00:37 +0000)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 21 Jan 2014 22:42:04 +0000 (02:42 +0400)
commitcdde9a386aca90ae151be9ad9455d0d0586d113b
treefa02e253877555404389cc085c31aecbf68b82ed
parent661190af13a82301c61d761c0949b4148e1761f3
crypto: add newline to cert and key if not present

After one of OpenSSL updates we have stopped accepting PEM private keys
and certificates that doesn't end with a newline (`\n`) character.
Handle this regression in `crypto.js` to make less trouble to our users.

fix #6892
lib/crypto.js
test/simple/test-tls-cert-regression.js [new file with mode: 0644]