summaryrefslogtreecommitdiff
path: root/src/node_crypto.cc
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2014-12-08 16:45:12 +0300
committerFedor Indutny <fedor@indutny.com>2014-12-11 00:07:58 +0700
commit687dfc9875973bba23ff46ed80cbc02207395a31 (patch)
tree3cdec0ff24bf7cbca3394055f7db02be235ad714 /src/node_crypto.cc
parentac18ebddbdf4b2d3fdfeb4e3b10619e38c87b4ca (diff)
downloadnode-new-687dfc9875973bba23ff46ed80cbc02207395a31.tar.gz
crypto: separate altname extensions with ", "
In newly introduced `SafeX509ExtPrint` I forgot to insert separators between extensions, which lead to the "DNS:...DNS:..." thing for npm. Fix: iojs/io.js#105 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/113.patch
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r--src/node_crypto.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index efaa390ff3..918c2b9089 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1144,6 +1144,9 @@ static bool SafeX509ExtPrint(BIO* out, X509_EXTENSION* ext) {
for (int i = 0; i < sk_GENERAL_NAME_num(names); i++) {
GENERAL_NAME* gen = sk_GENERAL_NAME_value(names, i);
+ if (i != 0)
+ BIO_write(out, ", ", 2);
+
if (gen->type == GEN_DNS) {
ASN1_IA5STRING* name = gen->d.dNSName;