aboutsummaryrefslogtreecommitdiffstats
path: root/src/status-table.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Parse STATUS_CANCELED_BY_USER.Ben Kibbey2020-11-041-0/+1
| | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_CANCELED_BY_USER): New. * src/status-table.c (status_table_s): Add "CANCELED_BY_USER". * src/passphrase.c (_gpgme_passphrase_status_handler): Return GPG_ERR_CANCELED during GPGME_STATUS_CANCELED_BY_USER. Signed-off-by: Ben Kibbey <[email protected]>
* Add SPDX identifiers to most source filesWerner Koch2018-11-161-20/+20
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* Add flag 'is_de_vs' to decryption results and signatures.Justus Winter2017-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Update. * lang/cpp/src/decryptionresult.cpp (DecryptionResult::isDeVs): New function. * lang/cpp/src/decryptionresult.h (DecryptionResult::isDeVs): New prototype. * lang/cpp/src/verificationresult.cpp (Signature::isDeVs): New function. * lang/cpp/src/verificationresult.h (Signature::isDeVs): New prototype. * lang/python/src/results.py (DecryptResult): Turn field 'is_de_vs' into a boolean. (Signature): Likewise. * src/decrypt.c (_gpgme_decrypt_status_handler): Handle the new compliance status line. * src/verify.c (_gpgme_verify_status_handler): Likewise. * src/gpgme.h.in (gpgme_status_code_t): Add new status codes for the new status lines. * src/keylist.c (parse_pub_field18): Move function to 'util.h'. (keylist_colon_handler): Adapt callsites. * src/status-table.c (status_table): Add new status lines. * src/util.h (PARSE_COMPLIANCE_FLAGS): New macro. This used to be 'parse_pub_field18', but turned into a macro to make it polymorphic. -- When decrypting data and verifying signatures, report whether the operations are in compliance with the criteria for data classified as VS-NfD. This information can the be presented to the user. GnuPG-bug-id: 3059 Signed-off-by: Justus Winter <[email protected]>
* core: Sort the status table.Justus Winter2017-05-301-10/+10
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* core: Map GPGME_STATUS_EOF to the empty string.Werner Koch2016-09-161-1/+1
| | | | | | | | * src/status-table.c (_gpgme_status_to_string): Return "" for EOF. * src/engine-gpg.c (read_status): Ditto. The old code accidently used GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_interact, deprecate gpgme_op_edit.Werner Koch2016-09-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_interact_cb_t): New. (GPGME_INTERACT_CARD): New. (gpgme_op_interact_start, gpgme_op_interact): New. * src/libgpgme.vers, src/gpgme.def: Add new functions. * src/edit.c (op_data_t): Rename fnc to fnc_old and change users. Add fnc. (edit_status_handler): Call old or new callback. (command_handler): Ditto. (interact_start): New. (gpgme_op_interact_start, gpgme_op_interact_start): New. * src/status-table.c (_gpgme_status_to_string): New. * tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change type of STATUS. Use gpgme_io_writen. (main): s/gpgme_op_edit/gpgme_op_interact/. -- This change will eventually allow us to remove all those status codes from gpgme.h. Signed-off-by: Werner Koch <[email protected]>
* core: Set notation flags for verify.Werner Koch2016-06-011-0/+1
| | | | | | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_NOTATION_FLAGS): New. * src/status-table.c (status_table): Add new status. * src/verify.c (parse_notation): Handle flags. Also fix NOTATION_DATA in case gpg would not percent-escape spaces. (_gpgme_verify_status_handler): Handle flags. * tests/run-verify.c (print_result): Print notaion data. -- Note that this does only work with the soon to be released GnuPG 2.1.13.
* api: Return Tofu info for signatures.Werner Koch2016-05-211-0/+3
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_tofu_policy_t): New. (gpgme_status_code_t): Add status codes for TOFU. (struct _gpgme_tofu_info, gpgme_tofu_info_t): New. (struct _gpgme_signature): Add field 'tofu'. * src/status-table.c (status_table): Add new codes. * src/verify.c: Include limits.h. (release_tofu_info): New. (release_op_data): Call that. (parse_tofu_user): New. (parse_tofu_stats): New. (parse_tofu_stats_long): New. (_gpgme_verify_status_handler): Handle TOFU status lines. * tests/run-verify.c (print_description): New. (print_result): print tofu info. Signed-off-by: Werner Koch <[email protected]>
* Return dedicated error code for all subkeys expired or revoked.Werner Koch2016-05-171-0/+1
| | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_KEY_CONSIDERED): New. (GPGME_SIGSUM_TOFU_CONFLICT): New. * src/status-table.c (KEY_CONSIDERED): New. * src/op-support.c (_gpgme_parse_inv_recp): Add argc KC_FPR and KC_FLAGS. Use calloc. Detect all expired or revoked subkeys. (_gpgme_parse_key_considered): New. * src/sign.c (op_data_t): Add fields KC_FPR and KC_FLAGS. (release_op_data): Free KC_FPR. (_gpgme_sign_status_handler): Handle STATUS_KEY_CONSIDERED. * src/encrypt.c (op_data_t): Add fields KC_FPR and KC_FLAGS. (release_op_data): Free KC_FPR. (_gpgme_encrypt_status_handler): Handle STATUS_KEY_CONSIDERED. Signed-off-by: Werner Koch <[email protected]>
* Improve error return by checking the FAILURE status.Werner Koch2015-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_FAILURE): New. * src/status-table.c (FAILURE): New. * src/op-support.c (_gpgme_parse_failure): New. * src/passphrase.c (_gpgme_passphrase_status_handler): Forward FAILURE status line to the status callback. * src/decrypt.c (op_data_t): Add field failure_code. (_gpgme_decrypt_status_handler): Parse that code and act upon it on EOF. * src/encrypt.c (op_data_t): Add field failure_code. (_gpgme_encrypt_status_handler): Parse that code and act upon it on EOF. * src/genkey.c (op_data_t): Add field failure_code. (genkey_status_handler): Parse that code and act upon it on EOF. * src/passwd.c (op_data_t): Add field failure_code. (passwd_status_handler): Parse that code and act upon it on EOF. * src/sign.c (op_data_t): Add field failure_code. (_gpgme_sign_status_handler): Parse that code and act upon it on EOF. * src/verify.c (op_data_t): Add field failure_code. (_gpgme_verify_status_handler): Parse that code and act upon it on EOF. -- This requires GnuPG 2.1.8 to actually make a difference. Signed-off-by: Werner Koch <[email protected]>
* Parse the INQUIRE_MAXLEN status message.Ben Kibbey2015-08-151-0/+1
| | | | | | | | | | | | * src/gpgme.h.in: (gpgme_status_code_t): Add INQUIRE_MAXLEN. * src/status-table.c (status_table_s): Ditto. * src/genkey.c (genkey_status_handler): Parse INQUIRE_MAXLEN. * src/decrypt.c (_gpgme_decrypt_status_handler): Ditto. * src/sign.c (_gpgme_sign_status_handler): Ditto. This status message informs the client of the maximum length of an inquired line. It is sent from gpg and forwarded to the client via gpgme_status_cb_t.
* Add 6 new GPGME_STATUS_ codes.Werner Koch2014-05-131-9/+16
| | | | * src/status-table.c: Also add missing DECRYPTION_INFO entry.
* status-table.c: include string.h for strcmp.W. Trevor King2012-04-131-0/+1
| | | | | * status-table.c: include string.h to avoid `warning: implicit declaration of function 'strcmp'`.
* Rework status table to be less dynamically generated.Marcus Brinkmann2012-02-141-0/+156
* src/Makefile.am (EXTRA_DIST): Remove mkstatus. (BUILT_SOURCE, MOSTLYCLEANFILES): Remove. (main_sources): Remove status-table.h, extra-stati.h. Add status-table.c. (status-table.h): Remove rules for built source. * src/decrypt.c: Don't include extra-stati.h. * src/engine-gpg.c: Don't include status-table.h. (status_cmp): Remove function. (read_status): Use _gpgme_parse_status. * src/engine-gpgsm.c: Don't include status-table.h. (status_cmp, parse_status): Remove function. (gpgsm_assuan_simple_command, status_handler): Use _gpgme_parse_status. * src/engine-uiserver.c: Don't include status-table.h. (status_cmp, parse_status): Remove function. (uiserver_assuan_simple_command, status_handler): Use _gpgme_parse_status. * src/gpgme.h.in (gpgme_status_code_t): Add GPGME_STATUS_DECRYPTION_INFO. * src/util.h (_gpgme_status_init,_gpgme_parse_status): New declaration. * src/status-table.c: New file. * src/extra-stati.h, src/mkstatus: Files removed. * version.c (do_subsystem_inits): Call _gpgme_status_init.