summaryrefslogtreecommitdiffstats
path: root/store/src
AgeCommit message (Collapse)Author
2020-11-27openpgp: Add Cert::merge_public and Cert::merge_public_and_secret.Justus Winter
- Secret key material is not authenticated by OpenPGP, so care must be taken when merging certificates. - Rename Cert::merge to Cert::merge_public_and_secret. - Add new function Cert::merge_public. This function can be used to merge certificates from untrusted sources as it ignores secret key material that cannot be authenticated by OpenPGP. - Fixes #584.
2020-10-23store: Migrate to std::futuresIgor Matuszewski
2020-10-14Use 'Examples' for the examples section.Justus Winter
- See #480.
2020-10-14Replace most 'extern crate' directives with 'use'.Justus Winter
- See #480.
2020-04-02openpgp: Drop Fingerprint::from_hex in favor of FromStr.Justus Winter
- See #462.
2020-03-31ipc: Inherit a TCP socket via env var on WindowsIgor Matuszewski
2020-03-30Allow unused parens on generated codeIgor Matuszewski
Since around Rust 1.40 the unused parens lint is more aggressive. Since all of these warnings are from generated code (effectively false positives), let's just silence the warnings.
2020-03-20openpgp: Remove `to_hex` in KeyHandle, KeyID and Fingerprint.Wiktor Kwapisiewicz
- Replace all usages of `to_hex` with formatting string with :X specifier. - Fixes #456.
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-09store: Define store::Error using thiserror.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-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-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-19openpgp: Change KeyIter to return a struct instead of a tuple.Neal H. Walfield
- A tuple is just an unnamed, inflexible struct. Use a struct instead. - Fixes #400.
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-11-26openpgp: Implement From<Fingerprint> for KeyID.Justus Winter
- Remove Fingerprint::to_keyid, use From instead.
2019-11-21openpgp: Replace time crate with std::time.Justus Winter
- In sq and sqv, use chrono to interface with the user. - Fixes #341.
2019-10-27Fix more spelling errors caught by codespellDaniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-09-27linting: Clear up bare trait object warningsDaniel Silverstone
Newer Rust compilers requre `dyn` marking trait objects. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
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::Pool to Store.Justus Winter
2019-09-18store: Rename store::Store to Mapping.Justus Winter
- Fixes #88.
2019-08-26openpgp: Implement FromStr for some types.Justus Winter
- This implements std::str::FromStr for types that have string-representations and are reasonably likely to be encountered by downstream users, e.g. fingerprints or messages. This allows us to do `"xxx".parse()?`. - Fixes #320.
2019-08-23Bump rusqlite to 0.19.Justus Winter
- 0.20 requires a newer rustc.
2019-08-20net: Drop SKS pool in favor of keys.openpgp.org.Justus Winter
2019-08-19net: Drop the sync variant.Justus Winter
- The sync wrapper hide the async nature of the implementation, and while this may seem convenient, it may cause subtle problems if it is invoked from a different event loop. - Furthermore, 'async' is a reserved keyword in the 2018 edition, requiring awkward escaping. - Fixes #307.
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-06-10net: Drop unused parameter.Justus Winter
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-05-03ipc: New crate.Justus Winter
2019-04-04openpgp: Avoid key.fingerprint.to_keyid()Neal H. Walfield
- Instead of using key.fingerprint.to_keyid(), use key.keyid().
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-01-29store: Fix documentation.Neal H. Walfield
- In a1eba557ff62f09bef2c7e379a238c643ac240d7, I changed the store to insert all subkeys into the key_to_keyid table. Update the documentation to reflect this change.
2018-12-17openpgp: Change KeyIter to also return the RevocationStatus.Neal H. Walfield
- A Key's revocation status is a property of its binding, but the binding is not exposed by KeyIter. Expose it.
2018-12-14openpgp: Introduce trait Parse.Justus Winter
- Trait Parse introduces a uniform interface to parse packets, messages, keys, and related data structures.
2018-12-07Normalize test module names.Justus Winter
2018-11-24Rename the openpgp crate to sequoia-openpgp.Justus Winter
2018-11-20store: Insert all subkeys into the key_by_keyid table.Neal H. Walfield
- A PKESK may contain the keyid of the encryption key that the session key was encrypted for. When doing a reply to all, it is useful to use this information to do key discovery. Currently, the Store only includes signing and certification capable subkeys in the key_to_keyid table. This change includes all keys, which enables this use case.
2018-11-19store: Avoid use of deprecated function.Justus Winter
2018-10-30openpgp: Implement Serialize for TPK and TSK.Justus Winter
2018-10-25net: Improve IPC interface.Justus Winter
- Use our Result, communicate errors when making backends.
2018-09-27store: Add function to query keys by subkeyid from the pool.Justus Winter
2018-09-27store: Rename method.Justus Winter
- Make clear that this lookup also looks for subkeys.
2018-09-25store: Import into and lookup from the common key pool.Justus Winter
- Fixes #102.
2018-09-06store: Delete logs once binding, store, or key is deleted.Justus Winter
- Fixes #85.
2018-08-29store: Add method to lookup keys by keyid.Justus Winter
2018-08-29store: Add method to query a binding's label.Justus Winter
2018-08-29store: Typo.Justus Winter
2018-08-24openpgp: Make functions parsing key ids, fingerprints return Result.Justus Winter
- Fixes #13.