From 14ef71002f2fc1e00dda53a614a9a1412d487078 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 19 Mar 2016 14:07:55 -0700 Subject: [PATCH] write the DER cert properly into the csr file --- src/cert/acme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cert/acme.js b/src/cert/acme.js index b5bdf3dbc..a5290fbaf 100644 --- a/src/cert/acme.js +++ b/src/cert/acme.js @@ -333,7 +333,7 @@ Acme.prototype.createKeyAndCsr = function (domain, callback) { var csrDer = execSync(util.format('openssl req -new -key %s -outform DER -subj /CN=%s', privateKeyFile, domain)); if (!csrDer) return callback(new AcmeError(AcmeError.INTERNAL_ERROR, safe.error)); - if (!safe.fs.writeFileSync(csrFile, csrFile)) return callback(new AcmeError(AcmeError.INTERNAL_ERROR, safe.error)); + if (!safe.fs.writeFileSync(csrFile, csrDer)) return callback(new AcmeError(AcmeError.INTERNAL_ERROR, safe.error)); debug('createKeyAndCsr: csr file (DER) saved at %s', csrFile);