Age | Commit message (Collapse) | Author |
|
- Fixes #834.
|
|
- We validate certificate structures based on packet tags. In the
past, this lead to problems where a secret key packet was parsed
to an unknown packet because the secret bits were malformed. This
lead to a crash in the generated parser because it was assuming to
see a secret key packet, but got an unknown packet.
- This was changed in cd5eb82edfb326d7cbde29ee105f9f88e045c240 so
that we validate the certificate structure based on packet kinds,
i.e. we would only consider a packet a secret key packet if we
managed to parse it into one. However, this caused the parser to
be overly strict, causing problems with forward compatibility, and
the parser to return an Error::MalformedCert instead of an
Error::UnsupportedCert (see #170).
- Return to validating on packet tags, but make the parser code
aware that we may have parsed some packets (like secret key
packets) to unknown packets.
- This effectively reverts commit
cd5eb82edfb326d7cbde29ee105f9f88e045c240.
- Fixes #170.
|
|
|
|
|
|
- Fixes #587
|
|
|
|
- lalpop v0.19 a default features we do not use, we should not build
them, either.
- lalrpop v0.17, which we allow for Debian's benefit, does not have
any explicit features. In this case, stating
"default-features = false" in Cargo.toml does not hurt.
|
|
- Fixes inspecting of packets during signature verification.
|
|
- Output a cargo:warning with paths for generated shell completion
files, or a warning if generation failed.
|
|
Change sq command line handling from using clap version 2 to version 3,
and adapt to all the breaking changes.
Clap version 3 is a major new version with a number of breaking
changes. It also adds functionality to allow a structopt style
declarative way of defining command line syntax. We want to use that,
but first we need to port the old "builder style" of defining the
command line syntax to clap version 3. The change to use the "derive
style" comes later.
The semantics of clap version 2's .multiple function were hard to
understand and it was replaced with .multiple_occurences. Care was taken
to preserve the original intention regarding an argument's number of
occurrences and number of values.
There are some changes to help output (in src/sq-usage.rs). These are
mostly from upstream changes and we think the differences are minor so
we are okay with following upstream's lead. In summary: FLAGS and
OPTIONS are merged into just OPTIONS; the layout of subcommand lists are
a little different (split into two lines); there is no "[--]" before
filename arguments anymore; default and allowed values for options are
on a separate line now; --version isn't repeated for every subcommand
anymore; help is listed for each subcommand separately.
In addition, we will help clap upstream fix a problem where the
help output doesn't have a "..." to indicate that an option may be used
several times.
Further, upstream has changed --help text to be of the form "Print
help", when it earlier was "Prints help". We will change our own help
texts to follow suite in a future commit. We don't do it in this commit,
to avoid making an even larger diff.
By default, clap v3 now colors its help output. However, this does not
support custom sections like our examples. Clap is tracking this as
https://github.com/clap-rs/clap/issues/3108. In the meantime, disable
colors.
|
|
- The subplot scenario "File is signed with all required keys" has
a mistake, it uses a wrong argument, `--signer-key` instead of
`--signer-cert`.
- The issue was hidden, as the command was expected to fail with exit
code 1, coincidentally the same exit code that clap 2 uses for usage
errors. Clap 3 exits with 2 instead of 1, so now the test failed.
- Fix the wrong argument.
|
|
|
|
|
|
|
|
|
|
- See #812.
|
|
- Rename `iv_size` to `nonce_size`.
- Introduce `iv_size` that forwards to `nonce_size` for compatibility
reasons.
- Change all calls to `iv_size` to `nonce_size`.
|
|
|
|
- This returns a short, human-readable description of the
cryptographic backend for use in version strings to improve bug
reports.
- Fixes #818.
|
|
- This harmonizes the docstring across the different backends.
Also, it avoids monomorphization of the backend functions.
|
|
|
|
|
|
|
|
|
|
- Fixes #794.
|
|
|
|
|
|
|
|
- And update the other key generation scenarios to handle
authentication-capable subkeys.
|
|
- Generate an authentication-capable subkey by default.
- Add the flags `--can-authenticate` and `--cannot-authenticate` to sq
key generate, analogous to `--can{not}-sign`.
- Closes #844.
|
|
- Also warn about the potential deletion of this function in version
2.0.
|
|
|
|
|
|
- Select an appropriate hash algorithm for the ECDH KDF and an
appropriate cipher for the ECDH KEK depending on the curve.
Harmonize that for import and generation.
- Fixes #841.
|
|
|
|
- Even though the documentation warns that this function returns
rich errors that must not be returned to the user, and the mid-level
streaming decryption's API prevents leaking rich errors, including
decrypted data in the error message seems dicey.
|
|
|
|
- Currently, if we don't understand a compression algorithm, parsing
a compressed data packet fails and it is turned into an Unknown
packet. This is rather unfortunate, and deviates from what we do
for the encryption containers.
- Encryption containers are either not decrypted, in which case they
have a Body::Unprocessed, decrypted with Body::Processed, or
decrypted and parsed Body::Structured.
- Likewise, if we don't understand a compression algorithm, we
should simply return a compressed data packet with an unprocessed
body. This change does exactly that.
- Fixes #830.
|
|
|
|
- This goes back a long way, to
e304deb0fc7a92801cf3ba58aafeb14ce2301aed where the flag was called
`decrypted`, and every packet but SEIP had decrypted set to
`true`. At some point, we inverted the flag, but for some reason
decided to mark Unknown packets as encrypted, which makes no
sense, and changing it doesn't seem to break
documented (i.e. tested) behavior.
|
|
- Previously, Cert::merge_public_and_secret was not predictable with
respect to which secrets are kept (due to unstable sorting). It
also didn't document which secrets would be kept. All in all that
made the function unpredictable, and hence unsafe and not usable.
- Document that the secrets in `other` are preferred over the ones
in `self`. Implement that by first sorting components using a
stable sort algorithm, then preferring the merged in (now
predictably the latter) secrets over existing ones. Add a test.
- Fixes #843.
|
|
|
|
|
|
|
|
|
|
- Previously, there were two issues:
- There is an implicit policy that constraints the symmetric
algorithm to AES. RFC6637 doesn't forbid other ciphers, so
arguably this should be made explicit and moved to the standard
policy. Only using AES seems to be a sane default choice and will
not impede interoperability in practice (notably, GnuPG constrains
to AES as well).
- We constrain hashes only based on their output length, and are
hence willing to use dubious combinations like (AES128, MD5).
- Constrain the parameters in StandardPolicy::key. Mention this in
the documentation.
- Fixes #839.
|
|
- The CRC24 checksum is optional (and has been since at least
RFC2440, released in 1998), expensive to compute, doesn't add a
meaningful integrity check, and will be more strongly discouraged
in the next revision of OpenPGP.
- This changes our armor::Reader to not compute it in the first
place. This improves reading performance.
|
|
- backtrace and quickcheck_macros are unused.
- found with cargo-udeps (https://github.com/est31/cargo-udeps).
|
|
|
|
|