-
Notifications
You must be signed in to change notification settings - Fork 818
Closed
Description
- OpenPGP.js version: 6.0.0 & 6.0.1
- Affected platform (Browser or Node.js version): Browser
I'm doing the openpgp.sign()-example from your Frontpage:
const publicKeyArmored = PortalHelper.getKeyPairs()[0].public;
const privateKeyArmored = PortalHelper.getKeyPairs()[0].private; // decrypted private key
const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
const privateKey = await openpgp.readPrivateKey({ armoredKey: privateKeyArmored });
const unsignedMessage = await openpgp.createCleartextMessage({ text: 'Hello, World!' });
const cleartextMessage = await openpgp.sign({
message: unsignedMessage, // CleartextMessage or Message object
signingKeys: privateKey
});
and your getPreferredHashAlgo(...) throws an error: 'Error signing message: supportedAlgos is null'.
The exact same code runs in the older OpenPGP Version 5.11.1.
It dies here, because supportedAlgos is null at this point.

That happens because a few lines above
selfCertification.preferredHashAlgorithms is null, too.
selfCertification.hashAlgorithm is 8, but seems to get ignored.
thie primaryKey has Version = 4 and userID is {}.
config contains the preferredHashAlgorithm = 10.
Yet even if I change it to 8, as seems to have been the standard in 5.11.1, this changes nothing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


