Age | Commit message (Collapse) | Author |
|
- 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.
|
|
|
|
- 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.
|
|
|
|
- A `ComponentAmalgamation` derefs to a `ComponentBundle`. Don't
use `ComponentAmalgamation::bundle` if it is unnecessary and
doesn't improve legibility.
|
|
- 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.
|
|
- Add the `bundle()` method to the Amalgamation trait instead of
implementing it on each struct.
|
|
- The Amalgamation trait only applies to ValidComponents. Rename it
accordingly.
|
|
|
|
|
|
|
|
|
|
- Fixes #427.
|
|
- 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.
|
|
- 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.
|
|
- 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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- `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`.
|
|
- Fixes #414.
|
|
- 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.
|
|
- This can already be achieved by customizing the signature builder,
and by default the signature builder uses the current time.
|
|
|
|
- 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.
|
|
- 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().
|
|
- This aligns our terminology with that of the RFC.
|
|
- Fixes #359.
|
|
- Fixes #387.
|