From 8305d209b2f9ee23c996a5ee70513b324f6d495c Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 8 Dec 2017 14:46:38 +1300 Subject: [PATCH] fix: error message --- src/keychain.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/keychain.js b/src/keychain.js index e71cfa3..20421e9 100644 --- a/src/keychain.js +++ b/src/keychain.js @@ -129,7 +129,7 @@ class Keychain { const dsname = DsName(name) self.store.has(dsname, (err, exists) => { if (err) return _error(callback, err) - if (exists) return _error(callback, `Key '${name}' already exists'`) + if (exists) return _error(callback, `Key '${name}' already exists`) switch (type.toLowerCase()) { case 'rsa': @@ -212,7 +212,7 @@ class Keychain { const pem = res.toString() self.store.has(newDsname, (err, exists) => { if (err) return _error(callback, err) - if (exists) return _error(callback, `Key '${newName}' already exists'`) + if (exists) return _error(callback, `Key '${newName}' already exists`) const batch = self.store.batch() batch.put(newDsname, pem) @@ -266,7 +266,7 @@ class Keychain { const dsname = DsName(name) self.store.has(dsname, (err, exists) => { if (err) return _error(callback, err) - if (exists) return _error(callback, `Key '${name}' already exists'`) + if (exists) return _error(callback, `Key '${name}' already exists`) try { const privateKey = forge.pki.decryptRsaPrivateKey(pem, password) if (privateKey === null) { @@ -295,7 +295,7 @@ class Keychain { const dsname = DsName(name) self.store.has(dsname, (err, exists) => { if (err) return _error(callback, err) - if (exists) return _error(callback, `Key '${name}' already exists'`) + if (exists) return _error(callback, `Key '${name}' already exists`) const privateKeyProtobuf = peer.marshalPrivKey() crypto.keys.unmarshalPrivateKey(privateKeyProtobuf, (err, key) => {