summaryrefslogtreecommitdiffstats
path: root/openpgp/src
AgeCommit message (Collapse)Author
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-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: 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.
2019-04-26openpgp: Add some missing items to packet::prelude.Justus Winter
2019-04-26openpgp: Remove TPK::filter_into_tsk().Justus Winter
- We found this function to be not very useful for filtering, and it also turns the TPK into a TSK at the same time, which mixes two concerns. Drop it. We will eventually replace it with something more useful. See also #21.
2019-04-25openpgp: Add TPKBuilder::add_user_attribute().Justus Winter
2019-04-25openpgp: Change TPKBuilder::add_userid() to take an UserId.Justus Winter
2019-04-25openpgp: Generalize signature::Builder::sign_user_attribute_binding.Justus Winter
2019-04-25openpgp: Implement From<Cow<'a, str>> for UserID.Justus Winter
2019-04-25openpgp: Improve map of the frame.Justus Winter
- Refine field 'frame' to 'CTB' and 'length'.
2019-04-24openpgp: Fix roundtripping of packets with unknown MPIs.Justus Winter
- MPI::parse() is used to parse MPIs from unknown algorithms, which may use an encoding unknown to us. Therefore, we need to be extra careful only to consume the data once we found a well-formed MPI.
2019-04-24openpgp: Make {PublicKey,Curve}::bits() return Option<usize>.Justus Winter
- Return `None` on unknown public keys and curves.