summaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2020-02-26openpgp: Rework KeyAmalgamation to preserve the key's role.Neal H. Walfield
- Introduce three KeyAmalgamation variants: `PrimaryKeyAmalgamation`, `SubordinateKeyAmalgamation`, and `ErasedKeyAmalgamation`. - Unlike a `Key` or a `KeyBundle` with an `UnspecifiedRole`, an `ErasedKeyAmalgamation` remembers its role. This means that an `ErasedKeyAmalgamation` can implement the correct semantics even though the role marker has been erased (hence the name). - Have `Cert::keys` return `ErasedKeyAmalgamation`s. Recall: `Cert::keys` can't return a more specific type, because it returns an iterator that can contain both primary and subordinate keys. - We use a concrete type instead of a trait object so that when the user converts a `KeyAmalgamation` to a `ValidKeyAmalgamation` (via `with_policy`), the `ValidKeyAmalgamation` retains the type information about the `KeyAmalgamation`'s role. - Preserving this type information increases type safety for users of this API.
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-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-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-20openpgp: Rename ComponentAmalgamation::component_binding.Justus Winter
2020-01-20openpgp: Rename {Key,Component}Amalgamation::component.Justus Winter
2020-01-20openpgp: Use the new framework for Cert::userid.Justus Winter
- Fixes #414.
2020-01-18openpgp: Use Cert::keys instead of Cert::subkeys.Justus Winter
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-09-18openpgp: Rename selfsigs to self_signatures.Neal H. Walfield
- There are {TPK, ComponenBinding}::{certifications, self_revocations, other_revocations}. Don't abbreviate self signtures either.
2019-09-18openpgp: Make Parse::from_bytes polymorphic over AsRef<[u8]>.Justus Winter
- A drawback of this change is that currently AsRef<[u8]> is not implemented for [u8; _], only for specific lengths. This is a compiler limitation that may be lifted in the future. This limitation required fixing some tests, notably those using include_bytes!. - Fixes #296.
2019-09-18store: Rename store::Store to Mapping.Justus Winter
- Fixes #88.
2019-08-23openpgp: Rename SubkeyBinding to KeyBinding.Neal H. Walfield
- Also rename the `subkey` method to `key`.
2019-07-15Prepare for Rust 2018.Justus Winter
- This is the result of running `cargo fix --edition`, with some manual adjustments. - The vast majority of changes merely qualify module paths with 'crate::'. - Two instances of adding an anonymous pattern to a trait's function. - `async` is a keyword in Rust 2018, and hence it needs to be escaped (e.g. in the case of the net::r#async module). - The manual adjustments were needed due to various shortcomings of the analysis employed by `cargo fix`, e.g. unexpanded macros, procedural macros, lalrpop grammars.
2019-05-15core, store, tool: Use realm instead of domain.Justus Winter
- Remove the domain parameter from core::Context. - Replace it with a realm to be passed in when opening a store. - For sq, merge store name and realm into the --store parameter. - Fixes #105.
2019-02-19openpgp: Return &[Signature] from TPK accessors.Justus Winter
- Fixes #196.
2019-02-06openpgp: Remove the armored! macro.Justus Winter
- The packet parser now digests armored data, so there is no need to use this even in examples or tests, just use the appropriate .from_bytes(..) function. - Fixes #169.
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-24Rename the openpgp crate to sequoia-openpgp.Justus Winter
2018-07-09Fix links in examplesWiktor Kwapisiewicz
Working links do not use "preview" subdomain.
2018-06-13openpgp: Rename Message to PacketPileNeal H. Walfield
- RFC 4880 defines an OpenPGP message to be a sequence of packets with a particular structure (Section 11.3; https://tools.ietf.org/html/rfc4880#section-11.3). Since there is no term for an unstructured sequence of packets, we invent one.
2018-03-23openpgp: Move the TPK type definition to openpgp proper.Justus Winter
- We define all types in the root of the openpgp crate, and their implementations in separate modules. This makes using these types much simpler, yet keeps the root from getting too crowded. - Also fix all users accordingly.
2018-02-06openpgp: Improve armored! macro.Justus Winter
- Use $crate to refer to the current crate making this macro easier to use. - Simplify examples accordingly.
2018-01-31Add the code from the guide as examples.Justus Winter
2017-12-14ffi: Move the examples.Justus Winter
- Move the 'example.c' to sequoia-ffi. - Fix and improve Makefile.
2017-12-08Rework the context.Justus Winter
- Create default context with 'Context::new', create builder with 'Context::configure'. - Rename 'Pre' to 'Config'. - Expose builder to ffi.
2017-12-06Add 'domain' to the context.Justus Winter
- The domain uniquely identifies the application. It should be a property of the context.
2017-12-01Create context objects.Justus Winter
- Context objects can be used to tweak the library configuration. Currently, a home and lib directory can be set. Reasonable defaults are provided. - Add ffi functions.
2017-11-23Add a foreign function interface.Justus Winter
- For now, we keep the ffi in this crate, later on we may want to move it to sequoia-ffi. - Example code how to use the library from C is added as well.