Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

@ -1,35 +1,15 @@
#!/usr/bin/env node
'use strict';
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
var RSA = require('../').RSA;
var path = require('path');
var fs = require('fs');
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
var bitlen = 2048;
var exp = 65537;
var opts = { public: true, pem: true };
var cwd = process.cwd();
var privkeyPath = path.join(cwd, 'privkey.pem');
var pubkeyPath = path.join(cwd, 'pubkey.pem');
if (fs.existsSync(privkeyPath)) {
console.error(privkeyPath, "already exists");
process.exit(1);
}
RSA.generateKeypair(bitlen, exp, opts, function (err, keypair) {
console.info('');
console.info('');
fs.writeFileSync(privkeyPath, keypair.privateKeyPem, 'ascii');
console.info(privkeyPath + ':');
console.info('');
console.info(keypair.privateKeyPem);
console.info('');
fs.writeFileSync(pubkeyPath, keypair.publicKeyPem, 'ascii');
console.info(pubkeyPath + ':');
console.info('');
console.info(keypair.publicKeyPem);
});
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../rsa-compat/bin/rsa-keygen.js" "$@"
ret=$?
else
node "$basedir/../rsa-compat/bin/rsa-keygen.js" "$@"
ret=$?
fi
exit $ret