summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
AgeCommit message (Collapse)Author
2019-09-10openpgp: Make 'LiteralWriter::new's arguments optional.Justus Winter
2019-09-06Release 0.10.0.v0.10.0Justus Winter
2019-09-06openpgp: Rework streaming encryptor.Justus Winter
- Instead of giving a set of TPKs to the encryptor, hand in a set of recipients, which are (keyid, key)-tuples, conveniently created from key queries over TPKs. This simplifies the encryptor, and makes the key selection explicit. - Drop the EncryptionMode type. - As a nice side effect, we can now generate encrypted messages with wildcard recipient addresses.
2019-09-06openpgp: New filters for encryption-capable keys.Justus Winter
2019-08-27openpgp: Limit size of non-data packets.Justus Winter
- This introduces a configurable limit for non-data (i.e. non-container) packets. This prevents a trivial DoS on our parser, which previously assumed that all non-data packets can be buffered. - Fixes #242.
2019-08-23openpgp: Use marker types to denote a Key's type.Neal H. Walfield
- In addition to providing some added protection, this allows us to implement 'From<Key<_, _>> for Packet'.
2019-08-23openpgp: Use a KeyBinding to store the primary key binding in a TPKNeal H. Walfield
2019-08-20openpgp: Make choice of AEAD algorithm explicit.Justus Winter
- Automatically using AEAD if all recipients claim support is a policy decision, which we'd rather avoid in the openpgp crate. - Fixes #293.
2019-08-20openpgp-ffi: Fix pointer signedness.Justus Winter
2019-08-20openpgp-ffi, ffi: Honor CFLAGS in c-tests, add -Wall.Justus Winter
2019-08-20openpgp-ffi: Typos.Justus Winter
2019-07-15Switch to Rust 2018.Justus Winter
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-07-08Release 0.9.0.v0.9.0Justus Winter
2019-07-02openpgp: Simplify SessionKey::new.Justus Winter
2019-06-28openpgp-ffi: Use PublicKey::bits().Justus Winter
- See #154.
2019-06-27openpgp: Rework secret key handling.Justus Winter
- Introduce two new types, `Encrypted` and `Unencrypted`, to make the fields of enum `SecretKey` private. Add accessors, implement From<..> to make the new types ergonomic to use, update callsites.
2019-06-26openpgp-ffi, ffi, ffi-macros: Avoid deprecated integer types.Justus Winter
2019-06-14Release 0.8.0.v0.8.0Justus Winter
2019-06-01ffi: Install all headersNeal H. Walfield
2019-05-31ffi: Add bindings for User ID constructorsNeal H. Walfield
- Add bindings for the new User ID constructors, UserID::from_address and UserID::from_unchecked_address.
2019-05-31ffi: Explicitly coerce errors to failure::ErrorNeal H. Walfield
- Change ffi_try! to explicitly coerce errors to failure::Error so that the caller doesn't need to do it.
2019-05-30openpgp: Make PKESK::decrypt use crypto::Decryptor.Justus Winter
2019-05-28openpgp-ffi: Add bindings for new UserID methodsNeal H. Walfield
- Providing bindings for UserID::other and UserID::address_or_other. - Improve related documentation to reflect the changes to the parser.
2019-05-28Bump memsec to 0.5.6.Hussein
- 0.5.6 fixes cross-building from macOS for Android. - Fixes #284.
2019-05-21openpgp: New error for unsupported compression algorithms.Justus Winter
2019-05-17openpgp-ffi: Typo.Justus Winter
2019-05-17Spelling.Neal H. Walfield
2019-05-17openpgp-ffi: Fix documentation.Neal H. Walfield
- The documentation for pgp_tpk_key_iter_all and pgp_tpk_key_iter_valid was backwards.
2019-05-15openpgp-ffi: Add some bindings for Literal data packetsNeal H. Walfield
2019-05-15openpgp-ffi: Expose the inspect callback in the C APINeal H. Walfield
- DecryptionHelper has a default NULL implementation of the inspect callback. Allow C code to override it by exposing it in the pgp_decryptor_new API.
2019-05-15openpgp: Support generating 2k RSA keysNeal H. Walfield
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-ffi, ffi: Improve c-tests.rs.Justus Winter
- Use failure, improve error message when invoking make fails.
2019-05-13openpgp-ffi: Only include unistd.h when neededNeal H. Walfield
- sequoia/openpgp.h doesn't require <unistd.h> so don't include it there. - Several examples do need <unistd.h> for STDIN_FILENO. So, include it locally. - Note: <unistd.h> is not available on Windows. This change makes <sequoia/openpgp.h> work there. (Although the examples now fail.)
2019-05-13openpgp-ffi: Use the C ABI, not the system ABINeal H. Walfield
Reported-by: Thomas Muenz
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 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-ffi: Use new-style unwrapping for packetsNeal H. Walfield
- pgp_tpk_merge_packets was still using old-style unwrapping for the array of Packets although Packets now use new-style wrapping. - Likewise pgp_signature_into_packet.
2019-05-10Fix typo.Neal H. Walfield
2019-05-09openpgp: Communicate message structure from the decryptor.Justus Winter
- Fixes #100.
2019-05-09openpgp-ffi: Wrap RevocationStatus.Justus Winter
2019-05-09openpgp-ffi: Fix commentNeal H. Walfield
2019-05-09openpgp-ffi: Add some bindings for TPKParserNeal H. Walfield
2019-05-08openpgp-ffi: Fix indentationNeal H. Walfield
2019-05-08openpgp-ffi: Use extern "C", not extern "system"Neal H. Walfield
2019-05-08openpgp-ffi: Add functions to instantiate UserIDsNeal H. Walfield
- Add pgp_user_id_new to instantiate from a c string. - Add pgp_user_id_from_raw to instantiate from a not-NUL-terminated buffer.
2019-05-08openpgp-ffi: Deal with name-mangling, 2nd try.Justus Winter
- Apparently, some platforms use name mangling to differentiate calling conventions. Deal with that in `make check-headers`. - Fixes 8ed5842580a1c172fc8d5ebe5d0444ee5e011a01.
2019-05-07openpgp-ffi, ffi: Reword.Justus Winter