summaryrefslogtreecommitdiffstats
path: root/openpgp/src/tsk.rs
AgeCommit message (Collapse)Author
2019-04-30openpgp: Avoid monomorphization of serializaton functions.Justus Winter
- Change the function signature to take a mut reference to a trait object instead. This trades the cost of a dynamic dispatch for executable size. The results are modest, but a step in the right direction. On my system, libsequoia_openpgp_ffi.so in release mode shrunk by 2.2% (61440 bytes) after stripping. - Fixes #250.
2019-04-29openpgp: New TSK type.Justus Winter
- With a1e226f8f1418de43e577fdaa1d087b68bbb09ae in place, we have a more general way to add components to a TPK. Retire the current `TSK` type and replace it with a thin shim that only allows serialization of secret keys. - Fixes #107.
2019-04-25openpgp: Change TPKBuilder::add_userid() to take an UserId.Justus Winter
2019-04-25openpgp: Generalize signature::Builder::sign_user_attribute_binding.Justus Winter
2019-04-05openpgp: Fix serializing of TPKs and TSKs.Justus Winter
- The unknown components and bad signatures were stripped during serialization.
2019-04-04openpgp: Avoid key.fingerprint.to_keyid()Neal H. Walfield
- Instead of using key.fingerprint.to_keyid(), use key.keyid().
2019-04-03openpgp: Simplify code, improve documentation.Justus Winter
- Also, mark locations where we don't handle encrypted secret keys.
2019-03-26openpgp: Add enum Key.Justus Winter
- Fixes #228.
2019-03-26openpgp: Add enum Signature.Justus Winter
- See #228.
2019-03-21openpgp: Rename `UserID::userid()` to `value()`.Justus Winter
- Fixes #224.
2019-03-21openpgp: Rename UserAttribute's accessors.Justus Winter
- See #224.
2019-03-14openpgp: Replace TPK::select_keys with an iterator.Neal H. Walfield
- TPK::select_keys mixes iterating and filtering. - Make KeyIter an implicit builder, which supports convenient filtering. - Provide a convenience function to key an iterator with a reasonable filter default.
2019-03-08openpgp: Copy signature subkeys when adding a userid.Justus Winter
- Historically, signature subpackets that constrain the primary key, as well as preference and feature subpackets have been stored on userid bindings by GnuPG. - Make an effort to use the same set of subpackets on every userid binding signature. Otherwise, key constraints, preferences, or features may change as a side effect of stripping a userid.
2019-02-27openpgp: add functions to manipulate TSKsKai Michaelis
Adds TSK::sign_{subkey, user_attribute, userid} and TSK::with_{subkey, user_attribute, userid}. Also moves code for signing UserID, UserAttribute and *Subkey packets from TPKBuilder to TSK.
2019-02-18openpgp: Improve documentation.Justus Winter
- Drop trivial docstrings for implementations of Serialize. - Mention failure modes for the encrypted containers.
2019-01-29openpgp: TPKBuilder::autocrypt should not default to an empty UIDNeal H. Walfield
- TPKBuilder::autocrypt created a TPK with a single User ID, as required by the Autocrypt specification. Since no User ID was passed, it used the empty string. - An empty User ID is a bit surprising, and it is unclear if it is even a reasonable default (GnuPG rejects it). But, even if the programmer is aware of this, adding a new user ID does not replace the empty User ID, and removing the empty User ID is a pain. - Change the API to better match typical usage: have the constructor take the User ID. - Nevertheless, preserve the flexibility by making the User ID optional to allow the caller to add a User ID later. In this case, a non-autocrypt compliant TPK with no User ID is created instead of an empty User ID. - Closes #146.
2019-01-29openpgp: Change TPKBuilder::add_userid to take an Into<Cow>>.Neal H. Walfield
- Change TPKBuilder::add_userid to take an Into<Cow<'a, str>>> instead of a &str.
2019-01-02openpgp: Move KeyPair to crypto.Justus Winter
2018-12-28openpgp: Make KeyPair own Key and mpis::SecretKey.Justus Winter
2018-12-19openpgp: Make sign_userid_binding use Signer.Justus Winter
2018-12-14openpgp: impl 3rd party uid certifications.Kai Michaelis
This adds TSK::certify_key(TPK) which signs the primary userid binding. It also adds TSK::certify_userid(key, UserID) to sign a specific UID. Fixes #117
2018-12-14openpgp: Introduce trait Parse.Justus Winter
- Trait Parse introduces a uniform interface to parse packets, messages, keys, and related data structures.
2018-11-02openpgp: Create revocation certificates for TPKs.Justus Winter
- Fixes #95.
2018-10-30openpgp: Implement Serialize for TPK and TSK.Justus Winter
2018-10-26openpgp: Add constructors to TSK, implement Deref{,Mut} for TSK.Justus Winter
2018-10-26openpgp: Fix serializing TSKs.Justus Winter
2018-10-16openpgp: Refactor.Justus Winter
- Move tag to openpgp::packet.
2018-09-24openpgp: Add a function to convert a TSK into a TPKNeal H. Walfield
2018-09-20openpgp: Add proper revocation support to TPKs.Neal H. Walfield
- Change Signature::verify_userid_binding to only check user id certificates. Add Signature::verify_userid_revocation to verify user id revocations. - Add Signature::{verify_primary_key_revocation, verify_subkey_revocation, verify_user_attribute_revocation} to verify other types of revocations. - In TPK, Split self signatures and self revocations, and certifications and other revocations. - Update TPK canonicalization and TPK merging code appropriately. - Change {UserIDBinding,UserAttributeBinding,SubkeyBinding}::binding_signature to return an Option<&Signature> instead of a &Signature. This allows us to keep components for which we have a revocation certificate, but no self-signatures. And, it aligns the API with TPK::primary_key_signature. - Expose {UserIDBinding,UserAttributeBinding,SubkeyBinding}::revoked and TPK::revoked to allowed querying the revocation status of components and TPKs. - See #33
2018-09-20openpgp: When serializing a TPK also serialize certificationsNeal H. Walfield
2018-09-06openpgp: Autocrypt version arg for TPKBuilderKai Michaelis
2018-09-06openpgp: TSK cleanup & direct key sig support.Kai Michaelis
- TSK::serialize handles primary key sigs now. - Removed commented-out functions. - Changed TSK::new making the uid argument optional. - Improved TSK::new doc comment
2018-08-09openpgp: Deprecate TPK::new().Kai Michaelis
Adds a deprecation notice to TPK::new().
2018-07-28openpgp: Allow TSKs to be used in asserts.Neal H. Walfield
- Derive Debug and PartialEq.
2018-07-22openpgp: Rename method.Justus Winter
2018-07-22openpgp: Export TSK and add missing documentation.Justus Winter
2018-07-20openpgp: add missing tsk.rsKai Michaelis