paypro: script to generate trusted.js from node.js root certs.
This commit is contained in:
parent
0d68e429fc
commit
ee61422361
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Grab the node root certs. This will be our trusted certs file.
|
||||
|
||||
# wget 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
|
||||
|
||||
sed -i '$s/,$//g' Trusted.js
|
||||
|
||||
echo "module.exports = ["$'\n'"$(cat Trusted.js)" > Trusted.js
|
||||
echo "];" >> Trusted.js
|
||||
|
||||
sed -i 's/^"/+ "/g' Trusted.js
|
||||
sed -i 's/^+ "-----B/"-----B/g' Trusted.js
|
||||
|
||||
popd &> /dev/null
|
Loading…
Reference in New Issue