mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Run prettier
This commit is contained in:
parent
9db48d627d
commit
6c2aa92187
2 changed files with 10 additions and 7 deletions
|
@ -20,7 +20,8 @@ const keys = require('./keys')
|
||||||
|
|
||||||
const verify = (signature, opts) => {
|
const verify = (signature, opts) => {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
let errors = [], sigData
|
let errors = [],
|
||||||
|
sigData
|
||||||
try {
|
try {
|
||||||
sigData = await openpgp.cleartext.readArmored(signature)
|
sigData = await openpgp.cleartext.readArmored(signature)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -72,7 +73,7 @@ const verify = (signature, opts) => {
|
||||||
errors: errors,
|
errors: errors,
|
||||||
publicKey: keyData,
|
publicKey: keyData,
|
||||||
fingerprint: fingerprint,
|
fingerprint: fingerprint,
|
||||||
claims: claimVerifications
|
claims: claimVerifications,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,9 @@ describe('signatures.verify', () => {
|
||||||
it('should verify the demonstration signature', async () => {
|
it('should verify the demonstration signature', async () => {
|
||||||
const verification = await doipjs.signatures.verify(sigProfile)
|
const verification = await doipjs.signatures.verify(sigProfile)
|
||||||
expect(verification.errors).to.be.length(0)
|
expect(verification.errors).to.be.length(0)
|
||||||
expect(verification.fingerprint).to.be.equal('3637202523e7c1309ab79e99ef2dc5827b445f4b')
|
expect(verification.fingerprint).to.be.equal(
|
||||||
|
'3637202523e7c1309ab79e99ef2dc5827b445f4b'
|
||||||
|
)
|
||||||
expect(verification.claims).to.be.length(1)
|
expect(verification.claims).to.be.length(1)
|
||||||
expect(verification.claims[0].isVerified).to.be.true
|
expect(verification.claims[0].isVerified).to.be.true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue