From 96b491a9c053999eeab4598394706ef3fc8ffeb1 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 6 Oct 2019 02:14:48 -0600 Subject: [PATCH] remove accidental use of node crypto --- lib/acme.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/acme.js b/lib/acme.js index 56f6d2b..46cec2f 100644 --- a/lib/acme.js +++ b/lib/acme.js @@ -988,9 +988,14 @@ ACME._getCertificate = function(me, options) { // a little bit of random to ensure that getZones() // actually returns the zones and not the hosts as zones var dnsHosts = options.domains.map(function(d) { - var rnd = require('crypto') - .randomBytes(2) - .toString('hex'); + var rnd = parseInt( + Math.random() + .toString() + .slice(2), + 10 + ) + .toString(16) + .slice(0, 4); return rnd + '.' + d; }); promiseZones = ACME._getZones(