MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / verifyUserCertificate

Function verifyUserCertificate

src/modules/key.js:328–341  ·  view source on GitHub ↗
(user, certificate, key)

Source from the content-addressed store, hash-verified

326}
327
328export async function verifyUserCertificate(user, certificate, key) {
329 try {
330 await user.verifyCertificate(certificate, [key]);
331 return KEY_STATUS.valid;
332 } catch (e) {
333 switch (e.message) {
334 case 'User certificate is revoked':
335 case 'Primary user is revoked':
336 return KEY_STATUS.revoked;
337 default:
338 return KEY_STATUS.invalid;
339 }
340 }
341}
342
343export function checkKeyId(sourceKey, keyring) {
344 const primaryKeyId = sourceKey.getKeyID();

Callers 3

key-test.jsFile · 0.90
verifyCertFunction · 0.90
mapUsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected