MCPcopy
hub / github.com/mailvelope/mailvelope / verifyPrimaryKey

Function verifyPrimaryKey

src/modules/key.js:62–77  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

60}
61
62export async function verifyPrimaryKey(key) {
63 try {
64 await key.verifyPrimaryKey();
65 return KEY_STATUS.valid;
66 } catch (e) {
67 switch (e.message) {
68 case 'Primary key is revoked':
69 case 'Primary user is revoked':
70 return KEY_STATUS.revoked;
71 case 'Primary key is expired':
72 return KEY_STATUS.expired;
73 default:
74 return KEY_STATUS.invalid;
75 }
76 }
77}
78
79export async function verifyUser(user) {
80 try {

Callers 8

parseKeysForEMailFunction · 0.90
getKeyDataMethod · 0.90
importKeyMethod · 0.90
updateKeyMethod · 0.90
hasPrivateKeyMethod · 0.90
mapKeysFunction · 0.85
mapSubKeysFunction · 0.85
mapUsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected