diff --git a/lib/letsencrypt-forge.js b/lib/letsencrypt-forge.js index 2e9c768..122867e 100644 --- a/lib/letsencrypt-forge.js +++ b/lib/letsencrypt-forge.js @@ -5,6 +5,7 @@ 'use strict'; var crypto = require("crypto"); +var tls = require("tls"); var forge = require("node-forge"); var util = require("./acme-util.js"); @@ -359,7 +360,7 @@ module.exports = { var privateKey = importPrivateKey(keyPair.privateKey); var derCert = bufferToBytes(util.b64dec(cert)); var realCert = forge.pki.certificateFromAsn1(forge.asn1.fromDer(derCert)); - return crypto.createCredentials({ + return tls.createSecureContext({ key: forge.pki.privateKeyToPem(privateKey), cert: forge.pki.certificateToPem(realCert) }).context;