diff --git a/src/key/factory.js b/src/key/factory.js index ad542640..e66eaa10 100644 --- a/src/key/factory.js +++ b/src/key/factory.js @@ -257,7 +257,7 @@ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, conf key: secretKeyPacket }; const signatureProperties = secretKeyPacket.version !== 6 ? getKeySignatureProperties() : {}; - signatureProperties.signatureType = enums.signature.certGeneric; + signatureProperties.signatureType = enums.signature.certPositive; if (index === 0) { signatureProperties.isPrimaryUserID = true; } diff --git a/src/key/helper.js b/src/key/helper.js index 9425ebf8..2388a39a 100644 --- a/src/key/helper.js +++ b/src/key/helper.js @@ -35,6 +35,8 @@ export async function generateSecretKey(options, config) { * Returns the valid and non-expired signature that has the latest creation date, while ignoring signatures created in the future. * @param {Array} signatures - List of signatures * @param {PublicKeyPacket|PublicSubkeyPacket} publicKey - Public key packet to verify the signature + * @param {module:enums.signature} signatureType - Signature type to determine how to hash the data (NB: for userID signatures, + * `enums.signatures.certGeneric` should be given regardless of the actual trust level) * @param {Date} date - Use the given date instead of the current time * @param {Object} config - full configuration * @returns {Promise} The latest valid signature.