summaryrefslogtreecommitdiffstats
path: root/ffi/include
AgeCommit message (Collapse)Author
2021-01-15net: Decouple from core.Justus Winter
- Move core::NetworkPolicy to net::Policy, update all code accordingly.
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
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-09-18store: Rename store::Store to Mapping.Justus Winter
- Fixes #88.
2019-08-20net: Drop SKS pool in favor of keys.openpgp.org.Justus Winter
2019-05-15core, store, tool: Use realm instead of domain.Justus Winter
- Remove the domain parameter from core::Context. - Replace it with a realm to be passed in when opening a store. - For sq, merge store name and realm into the --store parameter. - Fixes #105.
2019-01-17openpgp-ffi: Change prefix from 'sq' to 'pgp'.Justus Winter
- This change is the result of the following command, which can also be used to automatically convert existing users of Sequoia's C API: git grep -il sq_ | while read F ; do sed -E -i -e 's/sq_(arbitrary_writer_new|armor_reader_from_bytes|armor_reader_from_file|armor_reader_headers|armor_reader_kind|armor_reader_new|armor_writer_new|decrypt|encryptor_new|error_free|error_status|error_string|fingerprint_as_bytes|fingerprint_clone|fingerprint_equal|fingerprint_free|fingerprint_from_bytes|fingerprint_from_hex|fingerprint_hash|fingerprint_to_hex|fingerprint_to_keyid|fingerprint_to_string|keyid_clone|keyid_equal|keyid_free|keyid_from_bytes|keyid_from_hex|keyid_hash|keyid_to_hex|keyid_to_string|key_pair_as_signer|key_pair_free|key_pair_new|literal_writer_new|packet_free|packet_kind|packet_parser_buffer_unread_content|packet_parser_decrypt|packet_parser_eof_free|packet_parser_eof_is_message|packet_parser_finish|packet_parser_free|packet_parser_from_bytes|packet_parser_from_file|packet_parser_from_reader|packet_parser_next|packet_parser_packet|packet_parser_recurse|packet_parser_recursion_depth|packet_parser_result_eof|packet_parser_result_free|packet_parser_result_packet_parser|packet_parser_result_tag|packet_pile_clone|packet_pile_free|packet_pile_from_bytes|packet_pile_from_file|packet_pile_from_reader|packet_pile_serialize|packet_tag|pkesk_decrypt|pkesk_recipient|p_key_alive|p_key_alive_at|p_key_clone|p_key_creation_time|p_key_expired|p_key_expired_at|p_key_fingerprint|p_key_into_key_pair|p_key_keyid|p_key_public_key_algo|p_key_public_key_bits|reader_free|reader_from_bytes|reader_from_fd|reader_from_file|reader_read|revocation_status_free|revocation_status_variant|secret_cached|signature_alive|signature_alive_at|signature_can_authenticate|signature_can_certify|signature_can_encrypt_at_rest|signature_can_encrypt_for_transport|signature_can_sign|signature_expired|signature_expired_at|signature_free|signature_is_group_key|signature_is_split_key|signature_issuer|signature_issuer_fingerprint|signature_to_packet|signer_free|signer_new|signer_new_detached|skesk_decrypt|tag_to_string|tpk_alive|tpk_alive_at|tpk_builder_add_certification_subkey|tpk_builder_add_encryption_subkey|tpk_builder_add_signing_subkey|tpk_builder_add_userid|tpk_builder_autocrypt|tpk_builder_default|tpk_builder_free|tpk_builder_generate|tpk_builder_set_cipher_suite|tpk_clone|tpk_dump|tpk_equal|tpk_expired|tpk_expired_at|tpk_fingerprint|tpk_free|tpk_from_bytes|tpk_from_file|tpk_from_packet_parser|tpk_from_packet_pile|tpk_from_reader|tpk_into_tsk|tpk_is_tsk|tpk_key_iter|tpk_key_iter_free|tpk_key_iter_next|tpk_merge|tpk_merge_packets|tpk_primary|tpk_primary_user_id|tpk_revocation_status|tpk_revoke|tpk_revoke_in_place|tpk_serialize|tpk_set_expiry|tpk_user_id_binding_iter|tsk_free|tsk_into_tpk|tsk_new|tsk_serialize|tsk_tpk|user_attribute_value|user_id_binding_iter_free|user_id_binding_iter_next|user_id_binding_selfsig|user_id_binding_user_id|user_id_value|verification_result_code|verification_result_level|verification_results_at_level|verification_result_signature|verify|writer_alloc|writer_free|writer_from_bytes|writer_from_fd|writer_from_file|writer_stack_finalize|writer_stack_finalize_one|writer_stack_message|writer_stack_write|writer_stack_write_all|writer_write|reader|writer|packet_parser|packet_parser_result|packet_parser_eof|keyid|fingerprint|revocation_status|revocation_status_variant|armor_kind|armor_header|tag|unknown|signature|one_pass_sig|p_key|user_id|user_attribute|literal|compressed_data|pkesk|skesk|seip|mdc|packet|packet_pile|reason_for_revocation|user_id_binding|user_id_binding_iter|tpk_key_iter|tpk|tsk|tpk_builder|tpk_cipher_suite|public_key_algorithm|writer_stack|encryption_mode|secret|verification_results|verification_result|verification_result_code|sequoia_decrypt_get_public_keys_cb_t|sequoia_decrypt_get_secret_keys_cb_t|sequoia_decrypt_check_signatures_cb_t|mpi|signer|key_pair|p_key|status|error)/pgp_\1/g' -e 's/SQ_(ARMOR_KIND_ANY|ARMOR_KIND_FILE|ARMOR_KIND_FORCE_WIDTH|ARMOR_KIND_MESSAGE|ARMOR_KIND_PUBLICKEY|ARMOR_KIND_SECRETKEY|ARMOR_KIND_SIGNATURE|ENCRYPTION_MODE_AT_REST|ENCRYPTION_MODE_FOR_TRANSPORT|PUBLIC_KEY_ALGO_DSA|PUBLIC_KEY_ALGO_ECDH|PUBLIC_KEY_ALGO_ECDSA|PUBLIC_KEY_ALGO_EDDSA|PUBLIC_KEY_ALGO_ELGAMAL_ENCRYPT|PUBLIC_KEY_ALGO_ELGAMAL_ENCRYPT_SIGN|PUBLIC_KEY_ALGO_FORCE_WIDTH|PUBLIC_KEY_ALGO_RSA_ENCRYPT|PUBLIC_KEY_ALGO_RSA_ENCRYPT_SIGN|PUBLIC_KEY_ALGO_RSA_SIGN|REASON_FOR_REVOCATION_FORCE_WIDTH|REASON_FOR_REVOCATION_KEY_COMPROMISED|REASON_FOR_REVOCATION_KEY_RETIRED|REASON_FOR_REVOCATION_KEY_SUPERSEDED|REASON_FOR_REVOCATION_UID_RETIRED|REASON_FOR_REVOCATION_UNSPECIFIED|REVOCATION_STATUS_COULD_BE|REVOCATION_STATUS_FORCE_WIDTH|REVOCATION_STATUS_NOT_AS_FAR_AS_WE_KNOW|REVOCATION_STATUS_REVOKED|STATUS_BAD_SIGNATURE|STATUS_FORCE_WIDTH|STATUS_INDEX_OUT_OF_RANGE|STATUS_INVALID_ARGUMENT|STATUS_INVALID_OPERATION|STATUS_INVALID_PASSWORD|STATUS_INVALID_SESSION_KEY|STATUS_IO_ERROR|STATUS_MALFORMED_MESSAGE|STATUS_MALFORMED_PACKET|STATUS_MALFORMED_TPK|STATUS_MANIPULATED_MESSAGE|STATUS_MISSING_SESSION_KEY|STATUS_NETWORK_POLICY_VIOLATION|STATUS_SUCCESS|STATUS_UNKNOWN_ERROR|STATUS_UNSUPPORTED_AEAD_ALGORITHM|STATUS_UNSUPPORTED_ELLIPTIC_CURVE|STATUS_UNSUPPORTED_HASH_ALGORITHM|STATUS_UNSUPPORTED_PUBLICKEY_ALGORITHM|STATUS_UNSUPPORTED_SIGNATURE_TYPE|STATUS_UNSUPPORTED_SYMMETRIC_ALGORITHM|STATUS_UNSUPPORTED_TPK|TAG_COMPRESSED_DATA|TAG_LITERAL|TAG_MARKER|TAG_MDC|TAG_ONE_PASS_SIG|TAG_PKESK|TAG_PRIVATE|TAG_PUBLIC_KEY|TAG_PUBLIC_SUBKEY|TAG_RESERVED|TAG_SECRET_KEY|TAG_SECRET_SUBKEY|TAG_SED|TAG_SEIP|TAG_SIGNATURE|TAG_SKESK|TAG_TRUST|TAG_UNASSIGNED|TAG_USER_ATTRIBUTE|TAG_USER_ID|TPK_CIPHER_SUITE_CV|TPK_CIPHER_SUITE_FORCE_WIDTH|TPK_CIPHER_SUITE_RSA|VERIFICATION_RESULT_CODE_BAD_CHECKSUM|VERIFICATION_RESULT_CODE_FORCE_WIDTH|VERIFICATION_RESULT_CODE_GOOD_CHECKSUM|VERIFICATION_RESULT_CODE_MISSING_KEY)/PGP_\1/g' $F ; done
2019-01-17openpgp-ffi: New crate.Justus Winter
- 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.
2019-01-17ffi: Do not use a context where an errp suffices.Justus Winter
- This prepares us for the FFI crate split. - Fixes #158.
2019-01-15ffi: Allocate returned strings using libc.Justus Winter
- 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.
2019-01-10openpgp: Use Signer when revoking TPKs.Justus Winter
2019-01-10ffi: New function sq_p_key_into_key_pair.Justus Winter
2019-01-10ffi: New module openpgp/crypto.Justus Winter
2019-01-08ffi: Add sq_p_key_clone.Justus Winter
2018-12-28ffi: Add sq_signature_to_packet.Justus Winter
2018-12-28ffi: Add sq_tpk_merge_packets.Justus Winter
2018-12-27ffi: Fix function prototype and formatting.Justus Winter
2018-12-27ffi: Add sq_signature_free.Justus Winter
2018-12-17ffi: Fix sq_binding_delete's signature.Neal H. Walfield
- The C binding forgot the context parameter.
2018-12-17ffi: Add support to sq_verify for verifying detached signatures.Neal H. Walfield
- This changes sq_verify's API.
2018-12-17ffi: Add a function to return the value of a TPK's primary user idNeal H. Walfield
2018-12-17ffi: Add a function to return a UserID Binding's self signature.Neal H. Walfield
2018-12-17ffi: Add function to query a Key's the public key algo.Neal H. Walfield
- Add sq_p_key_public_key_algo for returning the algorithm and sq_p_key_public_key_bits for returning the strength.
2018-12-17ffi: Add a function to get the tag of a packet in a PacketParserResultNeal H. Walfield
- To get the tag of the packet in a PacketParserResult, it is necessary to convert the PacketParserResult to a PacketParser, get the current packet, and then query its tag. That's particularly annoying in C. And, it is doubly annoying when we have to convert the PacketParser back to a PacketParserResult as is the case of a demuxer that just passes the PacketParserResult to something like TPK::from_packet_parser according to the current packet's type.
2018-12-17ffi: Wrap TPK::from_packet_parser.Neal H. Walfield
2018-12-17ffi: Wrap Key's alive and expired methods.Neal H. Walfield
- Wrap Key::expired, Key::expired_at, Key::alive, and Key::alive_at.
2018-12-17ffi: Wrap TPK's alive and expired methods.Neal H. Walfield
- We currently wrap TPK::expired. Also wrap TPK::expired_at, TPK::alive, and TPK::alive_at.
2018-12-17ffi: Wrap Signature's alive and expired methods.Neal H. Walfield
- Wrap Signature::signature_alive, Signature::signature_alive_at, Signature::signature_expired, and Signature::signature_expired_at. - Rely on the time crate to convert time_t to a time::Tm.
2018-12-17ffi: Export getters for signature key flags.Neal H. Walfield
2018-12-17openpgp: Change KeyIter to also return the RevocationStatus.Neal H. Walfield
- A Key's revocation status is a property of its binding, but the binding is not exposed by KeyIter. Expose it.
2018-12-17ffi: Avoid inline function.Justus Winter
- Inline functions make python-cffi choke on the header file.
2018-11-26ffi: Add new error code.Neal H. Walfield
2018-11-22Fix typos.Neal H. Walfield
2018-11-22ffi: Fix sq_tsk_new's signature.Neal H. Walfield
2018-11-22ffi: Add a convenience function to convert a tag to a string.Neal H. Walfield
- sq_tag_to_string.
2018-11-22ffi: Wrap PacketParserEOF::is_message.Neal H. Walfield
- Add sq_packet_parser_eof_is_message.
2018-11-22ffi: Wrap the Decrypt and Verifier interfaces.Neal H. Walfield
2018-11-22ffi: Wrap PKESK::Recipient.Neal H. Walfield
- Add sq_pkesk_recipient.
2018-11-22ffi: Wrap PKESK::decrypt.Neal H. Walfield
- Add sq_pkesk_decrypt.
2018-11-22ffi: Wrap Secret.Neal H. Walfield
2018-11-22ffi: Provide an interface to iterate over Keys in a TPK.Neal H. Walfield
- Add sq_tpk_key_iter, sq_tpk_key_iter_free, and sq_tpk_key_iter_next.
2018-11-22ffi: Wrap tpk::UserIDBinding.Neal H. Walfield
- Add sq_user_id_binding_user_id to return the value of the UserID from a UserIDBinding. - Export an interface to iterate over UserIDBindings, sq_tpk_user_id_binding_iter, fn sq_user_id_binding_iter_free, sq_user_id_binding_iter_next.
2018-11-22ffi: Wrap TPK.Neal H. Walfield
- In particular, add sq_tpk_primary, sq_tpk_revocation_status, sq_tpk_revoke, sq_tpk_revoke_in_place, sq_tpk_expired, sq_tpk_set_expiry, and sq_tpk_is_tsk.
2018-11-22ffi: Provide an interface to convert a tsk into a tpk.Neal H. Walfield
2018-11-22ffi: Wrap Key::creation_time.Neal H. Walfield
2018-11-22ffi: Wrap some of Signature's methods.Neal H. Walfield
2018-11-22ffi: Wrap RevocationStatus.Neal H. Walfield
2018-11-22ffi: Wrap Pool::lookup_by_keyid and Pool::lookup_by_subkeyid.Neal H. Walfield
2018-11-22ffi: Add sq_writer_stack_write_all.Neal H. Walfield
2018-11-02openpgp: Create revocation certificates for TPKs.Justus Winter
- Fixes #95.