Previous: Deleting Keys, Up: Key Management
The
gpgme_edit_cb_ttype 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_ERRORor an error value.
The function
gpgme_op_editprocesses 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_ERRORif the edit operation completes successfully,GPG_ERR_INV_VALUEif 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_startinitiates agpgme_op_editoperation. It can be completed by callinggpgme_waiton the context. See Waiting For Completion.The function returns the error code
GPG_ERR_NO_ERRORif the operation was started successfully, andGPG_ERR_INV_VALUEif ctx or key is not a valid pointer.
The function
gpgme_op_card_editis analogous togpgme_op_edit, but should be used to process the smart card corresponding to the key key.
The function
gpgme_op_card_edit_startinitiates agpgme_op_card_editoperation. It can be completed by callinggpgme_waiton the context. See Waiting For Completion.The function returns the error code
GPG_ERR_NO_ERRORif the operation was started successfully, andGPG_ERR_INV_VALUEif ctx or key is not a valid pointer.