From 4e606c7ed2a2bfc8301209286f9e8c882ba308e3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 16 Jul 2014 17:20:09 -0700 Subject: [PATCH] paypro: move root certs to non-browser. --- browser/generate-trusted.sh | 18 ++++++++++-------- lib/{browser/Trusted.js => RootCerts.js} | 0 2 files changed, 10 insertions(+), 8 deletions(-) rename lib/{browser/Trusted.js => RootCerts.js} (100%) diff --git a/browser/generate-trusted.sh b/browser/generate-trusted.sh index 73c6dc5..a712ead 100755 --- a/browser/generate-trusted.sh +++ b/browser/generate-trusted.sh @@ -2,20 +2,22 @@ # Grab the node root certs. This will be our trusted certs file. -# wget https://raw.githubusercontent.com/joyent/node/master/tools/certdata.txt +# Mozilla Root Certs +# https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/included/ +# https://raw.githubusercontent.com/joyent/node/master/tools/certdata.txt wget https://raw.githubusercontent.com/joyent/node/master/src/node_root_certs.h \ || curl -OJ https://raw.githubusercontent.com/joyent/node/master/src/node_root_certs.h -mv node_root_certs.h lib/browser/Trusted.js -pushd lib/browser &> /dev/null +mv node_root_certs.h lib/RootCerts.js +pushd lib &> /dev/null -sed -i '$s/,$//g' Trusted.js +sed -i '$s/,$//g' RootCerts.js -echo "module.exports = ["$'\n'"$(cat Trusted.js)" > Trusted.js -echo "];" >> Trusted.js +echo "module.exports = ["$'\n'"$(cat RootCerts.js)" > RootCerts.js +echo "];" >> RootCerts.js -sed -i 's/^"/+ "/g' Trusted.js -sed -i 's/^+ "-----B/"-----B/g' Trusted.js +sed -i 's/^"/+ "/g' RootCerts.js +sed -i 's/^+ "-----B/"-----B/g' RootCerts.js popd &> /dev/null diff --git a/lib/browser/Trusted.js b/lib/RootCerts.js similarity index 100% rename from lib/browser/Trusted.js rename to lib/RootCerts.js