summaryrefslogtreecommitdiffstats
path: root/openpgp
AgeCommit message (Collapse)Author
2019-05-16openpgp: Introduce trait Policy. WIPfix-274Justus Winter
- Add a new trait `sequoia_openpgp::Policy`. Currently, this trait only has one method that returns the current time. This time is used when evaluating signatures. - Use this trait in TPK::{revocation_status,alive,expired}. Remove the corresponding *_at() functions. - Fixes #274.
2019-05-15openpgp: Add an interface to TPKBuilder to set the expiration timeNeal H. Walfield
- Add TPKBuilder::set_expiration to allow the caller to control the expiration time.
2019-05-15openpgp: Support generating 2k RSA keysNeal H. Walfield
2019-05-14openpgp: Clean up test data handling.Justus Winter
- Use the new framework instead of including the files everywhere.
2019-05-14openpgp: Add a filesystem-like framework for test data.Justus Winter
- Fixes #267.
2019-05-14openpgp, openpgp-ffi: Normalize TPK::revoked()Neal H. Walfield
- `TPK::revoked` returns a revocation status, not a boolean. Rename it to `TPK::revocation_status()`, like it is called in the FFI. - Like other methods, provide a `foo_at()` method and a `foo()` method.
2019-05-13openpgp: Include all the test data.Justus Winter
- Fixes #267.
2019-05-13openpgp: New module containing the test data.Justus Winter
2019-05-13openpgp: Fix worst-case estimate of compressed data size.Justus Winter
- For short messages where the signature size dominates, compression algorithms may inflate the message size considerably.
2019-05-13openpgp: Typo.Justus Winter
2019-05-11openpgp: Allow trust packets in TPKsNeal H. Walfield
- Change the KeyringValidator to allow trust packets anywhere a signature packet is allowed. - This is needed to parse GnuPG Keyrings.
2019-05-11openpgp: Include the packet's position in the TPKValidator errorNeal H. Walfield
- To ease debugging, include the path of the packet that caused the parse error.
2019-05-11openpgp: Include the path in the MessageValidator errorNeal H. Walfield
- To ease debugging, include the path of the packet that caused the parse error.
2019-05-11openpgp: Make error message more accurateNeal H. Walfield
- A TPK is not a message in our terminology.
2019-05-11openpgp: Make {is,possible}_{message,keyring,tpk} return a ResultNeal H. Walfield
- PacketParserEOF::is_message, PacketParserEOF::is_keyring, PacketParserEOF::is_tpk, PacketParserResult::possible_message, PacketParserResult::possible_keyring, and PacketParserResult::possible_tpk returned a boolean. - Change them to return a Result<()> instead, which is more Rusty, and, in particular, allows the caller to determine why the message didn't parse.
2019-05-10Release 0.7.0.v0.7.0Justus Winter
2019-05-10openpgp: Add a notation data interface.Justus Winter
- Fixes #122.
2019-05-10openpgp: Add constructor for NotationData.Justus Winter
2019-05-10openpgp: Implement {Into,From}Iterator for SubpacketArea.Justus Winter
- This way we can .collect() into a SubpacketArea.
2019-05-10openpgp: New type for the flags of notation data subpackets.Justus Winter
2019-05-10openpgp: Fix documentation.Justus Winter
2019-05-10openpgp: Add a new parsing mode to the Armor ReaderNeal H. Walfield
- Add a strict "mode" to the armor reader that requires an armor header line, but doesn't care what the header is. - Closes issue #254.
2019-05-10openpgp: Add some context to errorsNeal H. Walfield
2019-05-09openpgp: Fix formatting.Justus Winter
2019-05-09openpgp: Fix documentation.Justus Winter
- Fixes 0ac9db8b1e039b498169d63fcb01cbd11ee204ec. - Fixes #177.
2019-05-09openpgp: Typo.Justus Winter
2019-05-09openpgp: Communicate message structure from the decryptor.Justus Winter
- Fixes #100.
2019-05-08openpgp: Typo.Justus Winter
2019-05-08openpgp: Add a conversion from &[u8] to UserIDNeal H. Walfield
- User IDs don't need to be UTF-8 and at the lowest level we don't assume that they are.
2019-05-08openpgp: Remove unused import.Justus Winter
2019-05-07openpgp: Remove {Subkey,UserID}Binding::new().Justus Winter
- These functions are quite unflexible, and are therefore quite opinionated. Nowadays, we have a more flexible way of adding components to a TPK. - Fixes #175.
2019-05-07openpgp, net: Improve panic messages.Justus Winter
2019-05-07openpgp: Add a method to TPKBuilder to create a general-purpose keyNeal H. Walfield
- Add a convenience method to TPKBuilder to create a typical, general-purpose key, i.e., one with a certification- and signing-capable primary key, and an encryption-capable subkey.
2019-05-07openpgp: Add a Default implementation for CipherSuiteNeal H. Walfield
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-05-07openpgp: Add email address normalizationNeal H. Walfield
- Provide a function to return a normalized email address, which is appropriate when comparing email addresses for equality.
2019-05-07openpgp: Fix commentNeal H. Walfield
2019-05-03openpgp: Account for every octet in the size calculation.Justus Winter
2019-05-03openpgp: Improve test to also SerializeInto.Justus Winter
2019-05-03openpgp: Implement SerializeInto for TPK, TSK.Justus Winter
2019-05-03openpgp: Implement and use trait NetLength.Justus Winter
- Implement NetLength for all the packets that previously didn't implement it, and use it do compute the serialized length.
2019-05-03openpgp: Optimize generic_serialize_into.Justus Winter
- Assume that the object will fit into the buffer, and return the appropriate error on short writes. - Add test demonstrating this behavior.
2019-05-03openpgp: Move TPK/TSK serialization code to mod serialize.Justus Winter
2019-05-03openpgp: Improve base64 decodingNeal H. Walfield
- Change get_base64_prefix to really only return valid base64 data. - Simplify is_armored_pgp_blob to exploit this assumption.
2019-05-03openpgp: Use assert_eq! instead of assert! when asserting equalityNeal H. Walfield
2019-05-03openpgp: More efficiently identify valid ASCII-armorNeal H. Walfield
- Don't decode base64 data that definitely can't possibly contain a valid OpenPGP message.
2019-04-30openpgp: Avoid monomorphization of serializaton functions.Justus Winter
- Change the function signature to take a mut reference to a trait object instead. This trades the cost of a dynamic dispatch for executable size. The results are modest, but a step in the right direction. On my system, libsequoia_openpgp_ffi.so in release mode shrunk by 2.2% (61440 bytes) after stripping. - Fixes #250.
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-04-29openpgp: Rewrite code to avoid the TSK type.Justus Winter
2019-04-26openpgp: Add interface to bind, certify, and revoke.Justus Winter
- This adds a flexible interface to create binding signatures, certificates, and revocation signatures for userids, user attributes, and subkeys.