Age | Commit message (Collapse) | Author |
|
|
|
|
|
- Change both functions to return a vector of Result<Cert>. First,
the keyserver may return more than one cert for both user ID
searches as well as searches by key handle. Second, we may
understand not all certs returned by the server, and that is okay,
and we shouldn't let the whole query fail because of that.
- Previously, the functions made an attempt at validating the
results. However, that is flawed. First, in the case of
retrieval by key handle, the test was brittle and easily
circumvented by a key server. Second, the server may have good
reason to return an additional cert, even if it doesn't have the
key handle that the user asked for. For example, it may know that
a cert is superseded and return the new one too, as a courtesy.
draft-shaw-openpgp-hkp-00 doesn't forbid that.
- In the case of search by email address, the server may know the
association between the queried email address and the cert, even
if said association is not recorded in the cert itself.
- Remove the brittle checks, return all certs returned by the
server, add a warning to the documentation of KeyServer::get.
|
|
- As we use types from reqwest in our API, re-export it as a
courtesy for downstream consumers. This way, they can use the
re-exported reqwest and be confident that they use the correct
version.
|
|
- Now that we use OnceCell for the cache, we can hand out references
to the cached data. This closes the gap between UserID and
ConventionallyParsedUserID, hence I think this addresses the
concern in #377.
- Deprecate the allocating variants.
- Fixes #377.
|
|
|
|
- Fixes #992.
|
|
|
|
- This seems over-engineered in retrospect.
|
|
- Add dane::get.
- Make EmailAddress functions pub(crate) to use them from the DANE
module.
- Add tests for generating correct FQDN.
- See #865.
|
|
|
|
|
|
This allows futures with a Keyserver in scope to be Send, allowing them
to be used with multithreaded async libraries such as tokio.
|
|
- Detected by the rustdoc::bare-urls lint.
|
|
- Add sequoia_net::pks::unlock_signer.
- Add sequoia_net::pks::unlock_decryptor.
|
|
An if condition is an expression and can be as complex as the
programmer wants. However, the more complex a condition is, the harder
it tends to be to understand. I marked functions with such if
conditions so that clippy won't complain about the code. I probably
should have simplified the code, perhaps by extracting the condition
to its own function, but it would have been much harder to do, so I
didn't.
Found by clippy lint blocks_in_if_conditions:
https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
|
|
The extra & in a pattern (match arm or if let) is unnecessary and only
makes the code harder to read. In most places it's enough to just
remove the & from the pattern, but in a few places a dereference (*)
needs to be added where the value captured in the pattern is used, as
removing the & changes the type of the captured value to be a
reference.
Overall, the changes are almost mechanical. Although the diff is huge,
it should be easy to read.
The clippy lint match_ref_pats warns about this. See:
https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
|
|
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
|
|
|
|
|
|
|
|
- Move core::NetworkPolicy to net::Policy, update all code
accordingly.
|
|
|
|
|
|
|
|
|
|
- See #480.
|
|
- See #480.
|
|
- Add a new constructor that takes headers. This allows us to make
the header argument polymorphic.
|
|
- See #462.
|
|
|
|
- Replace all usages of `to_hex` with formatting string with :X
specifier.
- Fixes #456.
|
|
- 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.
|
|
|
|
|
|
|
|
- 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.
|
|
- 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().
|
|
- A tuple is just an unnamed, inflexible struct. Use a struct
instead.
- Fixes #400.
|
|
- Fixes #387.
|
|
- Remove Fingerprint::to_keyid, use From instead.
|
|
- Arguably, the user wanted to fetch a key with a certain ID. If the
server returns something different, we throw an error. That error
contains both the expected keyid as well as the TPK from the
server, in case the consumer wants to inspect the problem or make
use of the key regardless.
|
|
- The rfc2822 crate doesn't implement all of RFC 2822. Moreover, it
includes a number of extensions. This makes rfc2822 a misnomer.
- RFC 2822 is actually obsoleted by RFC 5322. This means that if we
ever add support for RFC 5322, it will be an even worse misnomer.
- Move the whole crate into the openpgp crate. Note: we don't
directly export the API; it is only used internally by
packet::userid.
- Closes #279.
|
|
Newer Rust compilers requre `dyn` marking trait objects.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
|
|
|
|
- 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.
|