summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/include
AgeCommit message (Collapse)Author
2020-09-22openpgp: Hide stream::Encryptor::aead_algo from public API.Wiktor Kwapisiewicz
- Mark `aead_algo` as available only during tests, - Remove support for AEAD from `sop`, - Mark `aead` parameter in FFI as unused, - openpgp-ffi: Drop `aead_algo` argument from `pgp_encryptor_new`, - Fixes #550.
2020-09-16openpgp: Update backsig when changing expiration time.Justus Winter
- When updating the expiration time of signing-capable subkeys, also create a new primary key binding signature. - Fixes #534.
2020-06-17openpgp-ffi: Wrap the password handling functionality.Neal H. Walfield
- Wrap functions to create a password-protected certificate (`pgp_cert_builder_set_password`), and to work with keys that are password protected (`pgp_key_has_unencrypted_secret`, `pgp_key_decrypt_secret`).
2020-06-17openpgp-ffi: Fix declaration.Neal H. Walfield
- In 4aee697b1a582be8f7e48e9ebc0f95a06d23e2b2, I changed the type of `pgp_valid_key_amalgamation_set_expiration_time`'s arguments, but I didn't update the declaration. - Fix the declaration.
2020-06-17openpgp-ffi: Restore convenience function.Neal H. Walfield
- Restore the function `pgp_cert_revoke_in_place`.
2020-06-17openpgp-ffi: Change return type.Neal H. Walfield
- Change `pgp_user_id_amalgamation_user_id` and `pgp_valid_user_id_amalgamation_user_id` to return a `pgp_packet_t`, not a `pgp_user_id_t`. - Most functions work with `pgp_packet_t`s, not `pgp_user_id_t`s.
2020-05-28openpgp: Change the `decrypt` proxy in the decryption helper.Justus Winter
- Returning rich errors from this function may compromise secret key material due to Bleichenbacher-style attacks. Change the API to prevent this. - Hat tip to Hanno Böck. - Fixes #507.
2020-05-06openpgp: Streamline iteration over MessageStructure.Justus Winter
- Implement IntoIter and Deref to &'a [MessageLayer<'a>], drop the custom iteration structs.
2020-04-28openpgp: Rework Cert::revoke_in_place.Neal H. Walfield
- Rename `Cert::revoke_in_place` to `Cert::revoke`. - Return the revocation certificate; don't merge it. - Fixes #485.
2020-04-28openpgp: Rename Cert::revoked, etc. to revocation_statusNeal H. Walfield
- Rename `Cert::revoked`, `ValidCert::revoked`, `ValidAmalgamation::revoked`, and `ComponentBundle::revoked` to revocation_status to more accurately match what it does. - Don't rename `ValidComponentAmalgamationIter::revoked` or `ValidKeyAmalgamationIter::revoked`. They don't return the revocation status; they check whether the key is revoked.
2020-04-08openpgp: Move methods mapping and inspect to VerificationHelper.Justus Winter
2020-04-06openpgp: Rename VerificationHelper::get_public_keys to get_certs.Justus Winter
2020-04-03openpgp: Rename KeyIter to KeyAmalgamationIterNeal H. Walfield
- Rename `KeyIter` to `KeyAmalgamationIter`, `ValidKeyIter` to `ValidKeyAmalgamationIter`. - Rename `cert/keyiter.rs` to `cert/amalgamation/iter.rs`.
2020-04-02openpgp-ffi: Use UserIDAmalgamations, not UserIDBundles.Neal H. Walfield
- Add the `UserID`, `UserIDAmalgamation` and `ValidUserIDAmalgamation` types, and some associated methods. - Replace the use of `UserIDBundle` with `UserIDAmalgamation` and `ValidUserIDAmalgamation`.
2020-04-02openpgp-ffo: Fix typo.Neal H. Walfield
2020-04-02openpgp-ffi: A Rust bool is a C _Bool, not a C int.Neal H. Walfield
- Cf. c4f087f886bd66f4177093569db615dc1c1e9e1d
2020-03-27openpgp: Explain binding signature lookup failures.Justus Winter
- If looking up a binding signature fails, don't merely return None, but an Err(_) that explains the lookup failure. For example, a binding signature may be present, but it may not meet the policy. - Fixes #460.
2020-03-25openpgp: Improve performance of detached signature verification.Justus Winter
- Previously, we transformed data and detached signatures into signed messages on the fly, then used the streaming Verifier to verify the message. However, this introduces a nontrivial overhead, even if unnecessary copies are carefully avoided. - Instead, specialize the streaming Decryptor to handle detached signatures. use crypto::hash_buffered_reader to compute the hashes over the data, then attach the computed signatures to the signature packets, and use Decryptor's verification machinery. - While this is arguably less elegant, it is much simpler, and a lot faster. Notably, if we operate on files and can mmap them into memory, we can compute the hash in one call to the compression function. Verification of detached signatures is an important use case, so this speedup outweighs the loss of elegance. - Fixes #457.
2020-03-23openpgp-ffi: Add pgp_valid_key_amalgamation_with_policy.Neal H. Walfield
- Expose ValidKeyAmalgamation::with_policy in the C FFI.
2020-03-20openpgp: Add a function to set the expiry of subkeys using the FFI.Neal H. Walfield
- Expose `ValidKeyAmalgamation::set_expiration_time` to the C FFI.
2020-03-20openpgp-ffi: Change key iterator to return key amalgamations.Neal H. Walfield
- Introduce `KeyAmalgamation` and `ValidKeyAmalgamation` to the C FFI. - Change pgp_cert_key_iter_next and pgp_cert_valid_key_iter_next to return them instead of keys.
2020-03-18openpgp-ffi: Add pgp_cert_builder_set_creation_time.Neal H. Walfield
2020-03-13openpgp: Add a Null Policy.Neal H. Walfield
- Add a new Null Policy, which accepts everything.
2020-03-13openpgp-ffi: Add missing argument to pgp_cert_primary_user_id.Neal H. Walfield
- Make the reference time an argument to pgp_cert_primary_user_id.
2020-03-03openpgp: Only impl Serialize for objects that are normally exported.Neal H. Walfield
- Add two new traits: `Marshal` and `MarshalInto`. - Implement them instead of `Serialize` and `SerializeInto`. - Only implement `Serialize` and `SerializeInto` for data structures that are normally exported. - This should prevent users from accidentally serializing a bare signature (`Signature`) when they meant to serialize a signature packet (`Packet`), for instance. - Fixes #368.
2020-02-26openpgp: Complete the binding -> bundle rename.Neal H. Walfield
- Started in d183e12a3231e4c505f5f2cf48b6c1f881ad258a.
2020-02-19openpgp: Split VerificationResult.Justus Winter
- Split VerificationResult into Result<GoodChecksum, VerificationError>. - Fixes #416.
2020-02-12openpgp: Add optional cipher argument to DecryptionHelper::decrypt.Justus Winter
2020-02-11openpgp: Use absolute expiration time in cert.Justus Winter
- The certificate is a mid-level interface, and should therefore use the more user-friendly way of specifying expiration. - Fixes #429.
2020-02-11openpgp: Call 'expiration time' a 'validity period'.Justus Winter
- The former is a misnomer inherited from the RFC: It is a duration, not a point in time. 'Validity period' makes that clear, and also emphasizes that the key or signature is valid during that period. - See #429.
2020-02-07openpgp: Rename Cert::set_expiry to set_expiration_time.Justus Winter
2020-02-06autocrypt: New crate.Justus Winter
- Move the autocrypt-related functionality to a new crate. - Fixes #424.
2020-02-06openpgp: Rename ComponentBinding to ComponentBundle, etc.Justus Winter
- Likewise KeyBinding, UserIDBinding, UserAttributeBinding, UnknownBinding, etc. - Reason: a self-signature on a component is a binding, but revocations and TPSes are not bindings. - Consistently call collections of components and associated signatures bundles now. Likewise for fields, methods. - Fixes #425.
2020-02-05openpgp-ffi: Provide pgp_armor_writer_finalize.Justus Winter
2020-01-31openpgp: Add a policy object.Neal H. Walfield
- Change all functions that need to evaluate the validity of a signature (either directly or indirectly to take a policy object. - Use the policy object to allow the user to place additional constraints on a signature's validity. - This addresses the first half of #274 (it introduces the policy object, but does not yet implement any policy).
2020-01-29openpgp-ffi: Add a general reader interface.Justus Winter
2020-01-29openpgp-ffi: Add a general writer interface.Justus Winter
2020-01-16openpgp: Remove variant VerificationResult::BadChecksum.Justus Winter
- This is better expressed as an error.
2020-01-13openpgp: Add Error variant to VerificationResult.Neal H. Walfield
- Add an Error variant to VerificationResult.
2020-01-06openpgp: Pass a timestamp to the KeyIter instead of each filter.Neal H. Walfield
- KeyIter::revoked and KeyIter::key_flags (and its variants) didn't take a time stamp so they could only be used for filtering keys based on their current state, not their state at some time in the past. Adding a time stamp to each of the filters would have fixed the problem, but it would have made the interface ugly: callers always want the same time stamp for all filters. - Split KeyIter into two structures: a KeyIter and a ValidKeyIter. - Add KeyIter::policy. It takes a time stamp, which is then used for filters like `alive` and `revoked`, and it returns a ValidKeyIter, which exposes filters that require a time stamp.
2019-12-20openpgp: Simplify key iteration interface.Neal H. Walfield
- Cert::keys_valid() is just a short-cut for Cert::keys_all().alive().revoked(false). - Remove Cert::keys_valid() and rename Cert::keys_all() to Cert::keys().
2019-12-09openpgp: Remove Signature::key_expired.Justus Winter
- Fixes #371.
2019-12-09openpgp: Remove Signature::signature_expired.Justus Winter
- See #371.
2019-12-09openpgp: Return result from Cert::alive, remove Cert::expired.Justus Winter
- See #371.
2019-12-09openpgp: Return Result from Signature::key_alive.Justus Winter
- See #371.
2019-12-09openpgp: Return Result from Signature::signature_alive.Justus Winter
- See #371.
2019-12-09openpgp: New errors Expired and NotYetLive.Justus Winter
2019-12-09openpgp, openpgp-ffi: Fix small issues introduced when renaming TPK.Justus Winter
2019-12-04openpgp: Refine CertBuilder::add_encryption_subkey.Justus Winter
2019-12-04openpgp: Rename KeyFlag's accessors.Justus Winter
- Fixes #359.