fork-openpgpjs/test/general
larabr 0e088aec28
Fix various signature verification issues (#1302)
- Throw on signature parsing (e.g. in `openpgp.readSignature`) if the
  creation time subpacket is missing
- `SignaturePacket.verify` now directly checks for signature creation
  and expiration times. This makes it easier to thoroughly check the
  validity of signatures. Also:
  - `openpgp.revokeKey` now takes a `date` to check the provided
    revocation certificate
  - `openpgp.decryptSessionKeys` now takes a `date` to check the
    validity of the provided private keys
  - whenever a `date` is used internally, the function accepts a
    `date` param to allow passing the correct date
- Add tests for all of the above
- Like `openpgp.generateKey`, `openpgp.reformatKey` now also requires
  `options.userIDs`
- Simplify calling `SubKey.isRevoked/update/getExpirationTime` by
  adding the `SubKey.mainKey` field to hold the reference of the
  corresponding `Key`

Breaking changes in low-level functions:
- Added/removed `date` params:
  - `Key.update(key, config)` -> `update(key, date, config)`
  - `Key.applyRevocationCertificate(revocationCertificate, config)` ->
    `applyRevocationCertificate(revocationCertificate, date, config)`
  - `Key.signAllUsers(privateKeys, config)` ->
    `signAllUsers(privateKeys, date, config)`
  - `Key.verifyAllUsers(keys, config)` ->
    `verifyAllUsers(keys, date, config)`
  - `new SignaturePacket(date)` -> `new SignaturePacket()`
  - `SignaturePacket.sign(key, data, detached)` ->
    `sign(key, data, date, detached)`
  - `Message.sign(primaryKey, privateKeys, config)` ->
    `sign(primaryKey, privateKeys, date, config)`
  - `Message.decrypt(privateKeys, passwords, sessionKeys, config)` ->
    `decrypt(privateKeys, passwords, sessionKeys, date, config)`
  - `Message.decryptSessionKeys(privateKeys, passwords, config)` ->
    `decryptSessionKeys(privateKeys, passwords, date, config)`
- Removed `primaryKey` params:
  - `SubKey.isRevoked(primaryKey, signature, key, date, config)` ->
    `isRevoked(signature, key, date, config)`
  - `SubKey.update(subKey, primaryKey, date, config)` ->
    `update(subKey, date, config)`
  - `SubKey.getExpirationTime(primaryKey, date, config)` ->
    `getExpirationTime(date, config)`
2021-06-08 18:12:48 +02:00
..
armor.js Replace Key with PrivateKey and PublicKey classes (#1300) 2021-05-25 19:18:47 +02:00
biginteger.js Lint all tests (#1235) 2021-02-12 23:00:22 +01:00
brainpool.js Rename public/privateKeys to encryption/decryption/signing/verificationKeys (#1299) 2021-05-17 18:56:28 +02:00
config.js Rename public/privateKeys to encryption/decryption/signing/verificationKeys (#1299) 2021-05-17 18:56:28 +02:00
decompression.js Consolidate read* functions (#1236) 2021-02-17 20:36:33 +01:00
ecc_nist.js Rename public/privateKeys to encryption/decryption/signing/verificationKeys (#1299) 2021-05-17 18:56:28 +02:00
ecc_secp256k1.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00
index.js Remove KeyRing class 2021-03-01 11:58:10 +01:00
key.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00
oid.js Lint all tests (#1235) 2021-02-12 23:00:22 +01:00
openpgp.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00
packet.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00
signature.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00
streaming.js Rename public/privateKeys to encryption/decryption/signing/verificationKeys (#1299) 2021-05-17 18:56:28 +02:00
testInputs.js Store named key params in key objects (#1141) 2021-02-09 19:25:20 +01:00
util.js Use consistent name casing (#1268) 2021-03-25 19:56:59 +01:00
x25519.js Fix various signature verification issues (#1302) 2021-06-08 18:12:48 +02:00