Previous: Deleting Keys, Up: Key Management
The
gpgme_edit_cb_t
type is the type of functions which GPGME calls if it a key edit operation is on-going. The status code status and the argument line args are passed through by GPGME from the crypto engine. The file descriptor fd is -1 for normal status messages. If status indicates a command rather than a status message, the response to the command should be written to fd. The handle is provided by the user at start of operation.The function should return
GPG_ERR_NO_ERROR
or an error value.
The function
gpgme_op_edit
processes the key KEY interactively, using the edit callback function FNC with the handle HANDLE. The callback is invoked for every status and command request from the crypto engine. The output of the crypto engine is written to the data object out.Note that the protocol between the callback function and the crypto engine is specific to the crypto engine and no further support in implementing this protocol correctly is provided by GPGME.
The function returns the error code
GPG_ERR_NO_ERROR
if the edit operation completes successfully,GPG_ERR_INV_VALUE
if ctx or key is not a valid pointer, and any error returned by the crypto engine or the edit callback handler.
The function
gpgme_op_edit_start
initiates agpgme_op_edit
operation. It can be completed by callinggpgme_wait
on the context. See Waiting For Completion.The function returns the error code
GPG_ERR_NO_ERROR
if the operation was started successfully, andGPG_ERR_INV_VALUE
if ctx or key is not a valid pointer.
The function
gpgme_op_card_edit
is analogous togpgme_op_edit
, but should be used to process the smart card corresponding to the key key.
The function
gpgme_op_card_edit_start
initiates agpgme_op_card_edit
operation. It can be completed by callinggpgme_wait
on the context. See Waiting For Completion.The function returns the error code
GPG_ERR_NO_ERROR
if the operation was started successfully, andGPG_ERR_INV_VALUE
if ctx or key is not a valid pointer.