summaryrefslogtreecommitdiffstats
path: root/tool/src/commands/key.rs
AgeCommit message (Collapse)Author
2020-10-14sq: Rename module to 'sequoia-sq'.Justus Winter
2020-08-05openpgp: Don't implement Default for the Bitflags types.Justus Winter
- See #525.
2020-08-03openpgp: Change CertBuilder to use a relative expiration time.Neal H. Walfield
- `CertBuilder::set_expiration_time` takes an absolute time. - Most callers use a relative time. - Internally, we need a relative time (that's what the Key Expiration Time packet takes). - Converting the absolute time to a relative time is error prone: should it be relative to the creation time when called or when `CertBuilder` is finalized? - KISS: Change it to just take a relative time. - To better reflect the new semantics, also change the name to `CertBuilder::set_validity_period`.
2020-07-28openpgp: Reimplement the KeyFlags struct using Bitfield.Justus Winter
- This also drops the implementation of PartialOrd since we did not use it in the key selection after all. - Fixes #525.
2020-04-20openpgp: Add armor::Writer::with_headers.Justus Winter
- Add a new constructor that takes headers. This allows us to make the header argument polymorphic.
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-09Reduce use of explicit failure::Fallible.Justus Winter
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-14openpgp: Add an option to change the cipher suite used for subkeys.Neal H. Walfield
- Add a parameter to CipherSuite::add_subkey, which, if not None, overrides the default cipher suite for that subkey. - This makes it easier to create a key with, say, an ECC primary and an RSA subkey.
2020-02-11sq: Don't round-down validity periods.Justus Winter
- This seems very surprising.
2020-02-11openpgp: Use absolute expiration time in cert builder.Justus Winter
- The certificate builder is a mid-level interface, and should therefore use the more user-friendly way of specifying expiration. Furthermore, with this interface we will be able to support setting a new expiration in cases where the keys have different creation times. - See #429.
2020-02-11openpgp: Call 'expiration time' a 'validity period'.Justus Winter
- The former is a misnomer inherited from the RFC: It is a duration, not a point in time. 'Validity period' makes that clear, and also emphasizes that the key or signature is valid during that period. - See #429.
2020-02-07openpgp: Rename CertBuilder::set_expiration.Justus Winter
2020-02-05sq: Fix handling of armored writers.Justus Winter
2019-12-04tool: Rename command line arguments.Justus Winter
- See #359.
2019-12-04openpgp: Refine CertBuilder::add_encryption_subkey.Justus Winter
2019-12-04openpgp: Rename KeyFlag's accessors.Justus Winter
- Fixes #359.
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-11-27openpgp: Allow creation of subkeys with explicit expiration time.Justus Winter
- Fixes #366.
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
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-11-15tool: Clarify default handling.Justus Winter
2019-11-15openpgp: Add tpk::builder::CipherSuite::RSA4k.Leonhard Markert
2019-10-24tool: Allow generation of keys with multiple userids.Justus Winter
- Fixes #347.
2019-09-11openpgp: Move packet::KeyFlags to constants.Justus Winter
2019-08-26tool: Annotate generated keys and revocation certificates.Justus Winter
- Fixes #305.
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-22openpgp: Trait Serialize/Parse cleanup.Justus Winter
- Currently, when we serialize a packet structure, like Signature, we get a full packet with CTB and length, even though we didn't really ask for that. If we want to create an embedded signature, we need to use the special interface Signature::serialize_naked() to get it without frame. - Also consider Key. Here, we don't know whether it is supposed to be primary or subkey, or public or secret. Therefore, we have SerializeKey, which is like Serialize, but also gets a tag. Now, if Key::serialize() would only emit the body, it wouldn't need to know what kind of key to emit. - The same applies to trait Parse. If we use, say, Signature::from_bytes(), the parser expects a framed signature. If we want to parse an embedded signature, we need to use a special interface again. - This patch changes how we parse and serialize packet structures to not expect or emit the frame. If we want to include the frame, we need to explicitly wrap it into an enum Packet. - This patch does not include any cleanups and optimizations to keep the size manageable. - See #255.
2019-05-17tool: Support setting the expiration time on new keysNeal H. Walfield
- Add an option to set the expiration time: --expiry
2019-05-07openpgp: Rename TPKBuilder::default to TPKBuilder::newNeal H. Walfield
- One would think that TPKBuilder::default would return something filled with useful defaults, but it just returns a nearly empty builder. Rename it to TPKBuilder::new, which is less misleading.
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-03-26tool: Read passwords from the tty.Justus Winter
- Fixes #24.
2019-01-15tool: Move key generation to a new module.Justus Winter