({emails, fingerprint, keyringId, sync})
| 177 | } |
| 178 | |
| 179 | async syncKeyServer({emails, fingerprint, keyringId, sync}) { |
| 180 | let result; |
| 181 | const keyring = await keyringById(keyringId); |
| 182 | const privateKey = keyring.getPrivateKeyByFpr(fingerprint); |
| 183 | if (sync) { |
| 184 | result = await mveloKeyServer.upload({emails, publicKeyArmored: privateKey.toPublic().armor()}); |
| 185 | } else { |
| 186 | let options; |
| 187 | if (emails.length) { |
| 188 | options = {email: emails[0]}; |
| 189 | } else { |
| 190 | const keyId = privateKey.getKeyID().toHex(); |
| 191 | options = {keyId}; |
| 192 | } |
| 193 | result = await mveloKeyServer.remove(options); |
| 194 | } |
| 195 | return result; |
| 196 | } |
| 197 | |
| 198 | async setKeyExDate({fingerprint, keyringId, newExDateISOString}) { |
| 199 | const keyring = await keyringById(keyringId); |
nothing calls this directly
no test coverage detected