mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-19 04:36:39 +00:00

- Add `User.mainKey` field to store a reference to the corresponding `Key`, allowing to simplify calling some `User` methods. - Rename `User.sign` to `User.certify`, since it's used for third-party certifications and not as a counterpart of `User.verify`, which deals with self-signatures. - Change `Key.update` behaviour to store a copy of newly added users and subkeys. Pointing to the same instance could give issues as the lists of certifications and signatures could be altered by both the source key and the updated one. Breaking changes in `User` methods: - `User.constructor(userPacket)` -> `constructor(userPacket, mainKey)` - `User.sign(primaryKey, signingKeys, date, config)` -> `.certify(signingKeys, date, config)` - `User.verify(primaryKey, date = new Date(), config)` -> `.verify(date = new Date(), config)` - `User.verifyCertificate(primaryKey, certificate, verificationKeys, date = new Date(), config)` -> `.verifyCertificate(certificate, verificationKeys, date = new Date(), config)` - `User.verifyAllCertifications(primaryKey, verificationKeys, date = new Date(), config)` -> `.verifyAllCertifications(verificationKeys, date = new Date(), config)` - `User.isRevoked(primaryKey, certificate, keyPacket, date = new Date(), config)` -> `.isRevoked(certificate, keyPacket, date = new Date(), config)` - `User.update(sourceUser, primaryKey, date, config)` -> `.update(sourceUser, date, config)`