Skip to content

Commit 5d6716f

Browse files
committed
fix: do not use uuid library
1 parent 762fc6e commit 5d6716f

3 files changed

Lines changed: 143 additions & 153 deletions

File tree

lib/acme-challenge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const { normalizeDomain } = require('./tools');
44
const { Settings } = require('./settings');
55
const msgpack = require('msgpack5')();
6-
const { v4: uuid } = require('uuid');
6+
const crypto = require('crypto');
77

88
// Unfinished challenges are deleted after this amount of time
99
const DEFAULT_TTL = 2 * 3600 * 1000; // milliseconds
@@ -17,7 +17,7 @@ class AcmeChallenge {
1717
this.config = config;
1818
const { redis, ttl, namespace } = this.config;
1919

20-
this.uuid = uuid();
20+
this.uuid = crypto.randomUUID();
2121
this.redis = redis;
2222
this.ttl = ttl || DEFAULT_TTL;
2323

0 commit comments

Comments
 (0)