summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
AgeCommit message (Collapse)Author
2020-03-13ffi, openpgp-ffi: Properly use LDLIBS to link against Sequoia.Justus Winter
- Fixes linking tests and examples with ld --as-needed.
2020-03-13openpgp: Add a Null Policy.Neal H. Walfield
- Add a new Null Policy, which accepts everything.
2020-03-13openpgp: Change pgp_writer_stack_message to take a reference.Neal H. Walfield
- pgp_writer_stack_message should take a reference to the writer and not take ownership of the writer. - This is essential for the armor writer, which needs to be explicitly finalized.
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-11openpgp-ffi: Avoid undefined behavior.Justus Winter
- Dropping a zeroed instant of that type is not safe as it contains references.
2020-03-09Switch from failure to anyhow.Justus Winter
- Use the anyhow crate instead of failure to implement the dynamic side of our error handling. anyhow::Error derefs to dyn std::error::Error, allowing better interoperability with other stdlib-based error handling libraries. - Fixes #444.
2020-03-09Reduce use of explicit failure::Fallible.Justus Winter
2020-03-04Release 0.15.0.v0.15.0Justus Winter
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-27openpgp: Make KeyIter and ValidKeyIter generic over the key's role.Neal H. Walfield
2020-02-26openpgp: Complete the binding -> bundle rename.Neal H. Walfield
- Started in d183e12a3231e4c505f5f2cf48b6c1f881ad258a.
2020-02-26openpgp: Add a prelude file to import things related to certificatesNeal H. Walfield
- Add `openpgp/src/cert/prelude.rs` to import most types and traits related to certificates. - Use it instead of using the types and traits individually.
2020-02-24openpgp: Check critical notations against good-list.Justus Winter
- See #274.
2020-02-20openpgp: Split the ValidAmalgamation trait.Neal H. Walfield
- Split the ValidAmalgamation trait into two traits, Amalgamation and ValidAmalgamation, so that the functionality made available by the Amalgamation trait can be provided by a ComponentAmalgamation, which doesn't have a policy.
2020-02-20openpgp: Rename the Amalgamation trait to ValidAmalgamation.Neal H. Walfield
- The Amalgamation trait only applies to ValidComponents. Rename it accordingly.
2020-02-19openpgp: Move RevocationStatus to module types.Justus Winter
2020-02-19openpgp: Split VerificationResult.Justus Winter
- Split VerificationResult into Result<GoodChecksum, VerificationError>. - Fixes #416.
2020-02-17openpgp: Make Recipient::new polymorphic over key variants.Justus Winter
2020-02-13openpgp-ffi, ffi: Always remake all examples.Justus Winter
- Due to missing tracking of header files as inputs, make may miss changes there and not rebuild an example. Always rebuilding all examples should be quick enough, and avoids this problem.
2020-02-13openpgp-ffi: Fix example.Justus Winter
2020-02-12openpgp: Add optional cipher argument to DecryptionHelper::decrypt.Justus Winter
2020-02-12openpgp: Add optional cipher argument to PKESK3::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-09openpgp: Add new error, PolicyViolation.Neal H. Walfield
2020-02-07Release 0.14.0.v0.14.0Justus Winter
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 methods 'set_policy' to 'with_policy'.Justus Winter
- Fixes #427.
2020-02-06openpgp, openpgp-ffi, ipc: Add missing dyn.Justus Winter
2020-02-06openpgp: Expose all component-related types in cert::components.Justus Winter
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-02-05openpgp-ffi: Specialize armor writers.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-24openpgp: Impl Amalgamation for ValidKeyAmalgamation.Justus Winter
2020-01-22openpgp: Rework default component lookup functions.Justus Winter
2020-01-21openpgp: Rename Cert::primary to Cert::primary_key.Justus Winter
2020-01-21openpgp: Avoid use of Cert::primary_key.Justus Winter
2020-01-21openpgp: Rename Cert::primary to Cert::primary_key.Neal H. Walfield
2020-01-21openpgp: Change KeyIter to return KeyAmalgamations.Neal H. Walfield
- Change KeyIter to return KeyAmalgamations instead of Keys. - Given a `KeyAmalgamation`, it is possible to turn it into a `ValidKeyAmalgamation`. This is not possible with a `Key`. - With a `KeyAmalgamation`, it is still possible to query things about the certificate.
2020-01-21openpgp: Make the various keyflags() methods return an Option.Justus Winter
- This signals the absence of a subpacket. - Likewise for features(), key_server_preferences().
2020-01-21openpgp: Enforce that KeyAmalgamations have a binding signature.Neal H. Walfield
- ValidKeyIter enforces that KeyAmalgamations have a valid binding signature. - Enforce this constraint when constructing a KeyAmalgamation and when modifying a KeyAmalgamation's policy.
2020-01-20openpgp: Rename ComponentIter::components to bindings.Neal H. Walfield
- `ComponentIter::components` returns `ComponentBindings`. It is more accurate to call it `ComponentIter::component_bindings`. But, since it is called on a component, just use the shorter name, `ComponentIter::bindings`.
2020-01-20openpgp: Use the new framework for Cert::userid.Justus Winter
- Fixes #414.
2020-01-20openpgp: New module cert::components.Justus Winter
2020-01-16openpgp: Remove variant VerificationResult::BadChecksum.Justus Winter
- This is better expressed as an error.
2020-01-14openpgp: Rework stream verification logic.Neal H. Walfield
- Select keys only when verifying the signatures: the relevant keys depend on the timestamp in the signature, and different signatures may have different time stamps. - If the signature doens't have a Signature Creation Time stamp, return that the signature is invalid.