Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Dec 6, 2017
1 parent 658a4d7 commit 409a999
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CMS {
throw new Error('keystore is required')
}

this.keystore = keystore;
this.keystore = keystore
}

createAnonymousEncryptedData (name, plain, callback) {
Expand Down Expand Up @@ -53,7 +53,7 @@ class CMS {
const self = this
let cms
try {
const buf = forge.util.createBuffer(cmsData.toString('binary'));
const buf = forge.util.createBuffer(cmsData.toString('binary'))
const obj = forge.asn1.fromDer(buf)
cms = forge.pkcs7.messageFromAsn1(obj)
} catch (err) {
Expand Down Expand Up @@ -82,7 +82,7 @@ class CMS {
(cb) => self.keystore.findKeyById(r.keyId, cb),
(key, cb) => self.keystore._getPrivateKey(key.name, cb)
], (err, pem) => {
if (err) return callback(err);
if (err) return callback(err)

const privateKey = forge.pki.decryptRsaPrivateKey(pem, self.keystore._())
cms.decrypt(r.recipient, privateKey)
Expand All @@ -91,7 +91,6 @@ class CMS {
}
)
}

}

module.exports = CMS

0 comments on commit 409a999

Please sign in to comment.