Age | Commit message (Collapse) | Author |
|
- This creates a new crate, 'sequoia-openpgp-ffi', and moves a
handful of functions from 'sequoia-ffi' to it.
- The 'sequoia-ffi' crate is a superset of the 'sequoia-openpgp-ffi'
crate. This is accomplished by some include! magic.
- My first attempt involved having 'sequoia-ffi' depend on
'sequoia-openpgp-ffi', so that the former just re-exports the
symbols. However, that turned out to be unreliable, and might be
not what we want, because it could also duplicate parts of Rust's
standard library.
- Fixes #144.
|
|
|
|
|
|
For the sake of symmetry and writing tests.
|
|
Adds an argument to *::revoked to give a timepoint. The function will
then return the revokation status at this time instead of now.
|
|
- Fixes error handling in the Python bindings.
|
|
- This prepares us for the FFI crate split.
- Fixes #158.
|
|
- First, for the two existing functions with an error-pointer.
|
|
- Express existing context-based error handling using the new set of
macros.
|
|
|
|
|
|
- Use the parenthesis token to preserve location information.
|
|
- Introduce a macro that emits local macros that implicitly use the
given context to store complex errors.
- This prepares us to decouple error handling from contexts, at
least for the functions that otherwise do not use the context.
|
|
- This prevents stack unwinding across the FFI boundary.
- Fixes #161.
|
|
- This crate contains macros for Sequoia's FFI crate(s). Having it
in a separate crate means that we can share it when we split the
FFI crate into two.
- More importantly, we need a separate crate if we want to create
procedural macros.
- As first macro, this patch adds ffi_catch_abort that wraps a
function's body in a catch_unwind block, aborting on panics.
|
|
- Allocate all returned strings using libc's allocator. This has
the advantage that the user can easily use strings and free them
using free(3).
- Fixes #157.
|
|
|
|
|
|
Adds UserIDBinding::revoke() and a test
|
|
- AppSettings::ArgRequiredElseHelp makes sure this doesn't happen.
|
|
- And move the key generation subcommand there, calling it
`generate`.
- Fixes #163.
|
|
|
|
- Using `crypto::Signer`s has several benefits. First, it shifts
the decision which key to use to the caller, moving policy out of
the caller. Second, it forces the caller to deal with encrypted
keys. Finally, it allows us to use remote keys like smart cards
in the future.
- Fixes #142.
|
|
|
|
- When building the bindings first, testing them later, the tests
fail most of the time. I have not found the reason yet.
- Reverts 9549da4b2bfa29519bb453a1f4fdd9baa536b57b.
|
|
|
|
|
|
|
|
|
|
Previously we just used a random 32 byte value. Correct X25519 keys
require bits 0 to 2 of the first byte and bit 7 of the last byte to
be 0.
Closes #162
|
|
- The bingings support basic manipulation of OpenPGP data, but are
quite incomplete. Furthermore, the Python API is not very
pythonic in some places, so expect it to break in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- We must use &c_char here instead of *const c_char, because the
former can not be NULL, hence Option<&c_char> gets
NULLable-pointer-optimized (see
https://doc.rust-lang.org/nomicon/ffi.html#the-nullable-pointer-optimization).
|
|
|
|
|
|
- This reflects the fact that destructors may be called with NULL.
|
|
- Previously, Option<&T> was used, primarily because it was more
ergonomic in Rust. However, this gave the impression that the
argument was optional.
- Likewise for mutable references.
- This patch addresses all pointers to Rust values.
- See #149.
|
|
|
|
|
|
|
|
|
|
- `tpk_refs_raw` is a `*mut _`, forgetting it is a nop.
|
|
|
|
|