copy over ARM/MIPS warning
This commit is contained in:
parent
c3ceffd2e2
commit
0a7734c6da
|
@ -23,6 +23,22 @@ module.exports = function (bitlen, exp) {
|
||||||
console.warn("[WARN] rsa-compat: Your version of node does not have crypto.generateKeyPair()");
|
console.warn("[WARN] rsa-compat: Your version of node does not have crypto.generateKeyPair()");
|
||||||
console.warn("[WARN] rsa-compat: Please update to node >= v10.12 or 'npm install ursa'");
|
console.warn("[WARN] rsa-compat: Please update to node >= v10.12 or 'npm install ursa'");
|
||||||
console.warn("[WARN] rsa-compat: Using node-forge as a fallback, but it may be unacceptably slow.");
|
console.warn("[WARN] rsa-compat: Using node-forge as a fallback, but it may be unacceptably slow.");
|
||||||
|
if (/arm|mips/i.test(require('os').arch)) {
|
||||||
|
console.warn("================================================================");
|
||||||
|
console.warn(" WARNING");
|
||||||
|
console.warn("================================================================");
|
||||||
|
console.warn("");
|
||||||
|
console.warn("WARNING: You are generating an RSA key using pure JavaScript on");
|
||||||
|
console.warn(" a VERY SLOW cpu. This could take DOZENS of minutes!");
|
||||||
|
console.warn("");
|
||||||
|
console.warn(" We recommend installing node >= v10.12, or 'gcc' and 'ursa'");
|
||||||
|
console.warn("");
|
||||||
|
console.warn("EXAMPLE:");
|
||||||
|
console.warn("");
|
||||||
|
console.warn(" sudo apt-get install build-essential && npm install ursa");
|
||||||
|
console.warn("");
|
||||||
|
console.warn("================================================================");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return require('./generate-privkey-forge')(bitlen, exp);
|
return require('./generate-privkey-forge')(bitlen, exp);
|
||||||
|
|
Loading…
Reference in New Issue