(user)
| 77 | } |
| 78 | |
| 79 | export async function verifyUser(user) { |
| 80 | try { |
| 81 | await user.verify(); |
| 82 | return KEY_STATUS.valid; |
| 83 | } catch (e) { |
| 84 | switch (e.message) { |
| 85 | case 'No self-certifications found': |
| 86 | return KEY_STATUS.no_self_cert; |
| 87 | case 'Self-certification is revoked': |
| 88 | return KEY_STATUS.revoked; |
| 89 | default: |
| 90 | return KEY_STATUS.invalid; |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | export async function verifySubKey(subKey) { |
| 96 | try { |
no test coverage detected