MCPcopy
hub / github.com/mailvelope/mailvelope / initGPG

Function initGPG

src/modules/keyring.js:127–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127async 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

Callers 1

initFunction · 0.85

Calls 5

buildKeyringFunction · 0.85
preVerifyKeysFunction · 0.85
initGPGMethod · 0.80
hasMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected