()
| 125 | } |
| 126 | |
| 127 | async function initGPG() { |
| 128 | await keyringAttr.initGPG(); |
| 129 | if (!keyringAttr.has(GNUPG_KEYRING_ID)) { |
| 130 | return; |
| 131 | } |
| 132 | try { |
| 133 | await buildKeyring(GNUPG_KEYRING_ID); |
| 134 | preVerifyKeys(GNUPG_KEYRING_ID); |
| 135 | } catch (e) { |
| 136 | // could not build GnuPG keyring, remove from keyring attributes |
| 137 | await keyringAttr.delete(GNUPG_KEYRING_ID); |
| 138 | console.log(`Building keyring for id ${GNUPG_KEYRING_ID} failed`, e); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Check if keyring has been loaded for the first time during this session |
no test coverage detected