summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/cert.rs
AgeCommit message (Collapse)Author
2020-04-21openpgp: Rename signature::Builder to signature::SignatureBuilder.Wiktor Kwapisiewicz
- Rename all calls to `Builder` with `SignatureBuilder`. - Fixes #481.
2020-04-07openpgp: Improve documentation for the serialize module.Justus Winter
- Fixes #472.
2020-04-03Change function names to align to Rust naming conventions.Wiktor Kwapisiewicz
- Change `mark_parts_public` to `parts_into_public`, - Change `mark_parts_public_ref` to `parts_as_public`, - Change `mark_parts_secret` to `parts_into_secret`, - Change `mark_parts_secret_ref` to `parts_as_secret`, - Change `mark_parts_unspecified` to `parts_into_unspecified`, - Change `mark_parts_unspecified_ref` to `parts_as_unspecified`, - Fixes #452.
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-26Remove redundant field names.Wiktor Kwapisiewicz
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: Remove unnecessary use of .mark_role_primary{,_ref}().Neal H. Walfield
2020-02-26openpgp: Don't unnecessarily use ComponentAmalgamation::bundle.Neal H. Walfield
- A `ComponentAmalgamation` derefs to a `ComponentBundle`. Don't use `ComponentAmalgamation::bundle` if it is unnecessary and doesn't improve legibility.
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-20openpgp: Add the bundle method to the Amalgamation trait.Neal H. Walfield
- Add the `bundle()` method to the Amalgamation trait instead of implementing it on each struct.
2020-02-20openpgp: Rename the Amalgamation trait to ValidAmalgamation.Neal H. Walfield
- The Amalgamation trait only applies to ValidComponents. Rename it accordingly.
2020-02-18openpgp: Use predicate Key4::has_secret.Justus Winter
2020-02-17openpgp: Move secret predicates.Justus Winter
2020-02-17openpgp: Reduce the number of explicit key conversions.Justus Winter
2020-02-10openpgp: Consider sensitive designated revokers when exporting sigs.Justus Winter
2020-02-06openpgp: Rename methods 'set_policy' to 'with_policy'.Justus Winter
- Fixes #427.
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: Make Cert::into_packets() and to_vec() agree on sig order.Justus Winter
- The signatures are ordered from authenticated and most important to not authenticated and most likely to be abused. The order is: - Self revocations first. They are authenticated and the most important information. - Self signatures. They are authenticated. - Other signatures. They are not authenticated at this point. - Other revocations. They are not authenticated, and likely not well supported in other implementations, hence the least reliable way of revoking keys and therefore least useful and most likely to be abused.
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-24openpgp: Make 'direct_key_signature' a part of trait Amalgamation.Justus Winter
2020-01-24openpgp: Reduce the usage of Cert::primary_key_signature.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: Remove Cert::direct_signatures() and friends.Justus Winter
2020-01-21openpgp: Rename Cert::primary to Cert::primary_key.Neal H. Walfield
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 lookup interface for user attributes.Justus Winter
- Makes Cert::user_attributes behave like Cert::keys. By default, naked &UserAttributes are returned. ComponentIter::policy(t) changes the iterator to return the new ComponentAmalgamation type. Finally, ComponentIter::components() returns all component bindings like Cert::user_attributes() used to do. - The same abstractions can be used for Cert::userids later. - See #414.
2020-01-08openpgp: Remove creation time argument from *::bind.Justus Winter
- This can already be achieved by customizing the signature builder, and by default the signature builder uses the current time.
2020-01-07Fix broken links in the documentation.Justus Winter
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-06openpgp: Rename signature types.Justus Winter
- This aligns our terminology with that of the RFC.
2019-12-04openpgp: Rename KeyFlag's accessors.Justus Winter
- Fixes #359.
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.