Just noting down this error:
Failed to send message due to: Error: Error encrypting message: Could not find valid self-signature in key c8ab232c7f675ec4
Based on my experience, it is possible that key to use is using an insecure hash algorithm. For verifying and troubleshooting, the following raw openpgp.js snippet can be used:
constpublicKey=awaitopenpgp.readKey({armoredKey: pubKeyArmored});for(constuserofpublicKey.users){console.log(`User ID: ${user.userID?.userID}`);for(constsigofuser.selfCertifications){console.log(` Self-sig created: ${sig.created}`);console.log(` Hash algorithm used: ${sig.hashAlgorithm} (${openpgp.enums.hash[sig.hashAlgorithm]})`);if(sig.preferredHashAlgorithms){constreadable=sig.preferredHashAlgorithms.map(id=>openpgp.enums.hash[id]);console.log(` Preferred hash algos: ${sig.preferredHashAlgorithms} (${readable.join(", ")})`);}}}Then compare the result of preferred hash against opgp.config.rejectHashAlgorithms.
Just noting down this error:
Failed to send message due to: Error: Error encrypting message: Could not find valid self-signature in key c8ab232c7f675ec4
Based on my experience, it is possible that key to use is using an insecure hash algorithm. For verifying and troubleshooting, the following raw openpgp.js snippet can be used:
Then compare the result of preferred hash against
opgp.config.rejectHashAlgorithms.