File: gpgme.info, Node: Changing Passphrases, Next: Changing TOFU Data, Prev: Deleting Keys, Up: Key Management 7.5.10 Changing Passphrases --------------------------- -- Function: gpgme_error_t gpgme_op_passwd (gpgme_ctx_t CTX, const gpgme_key_t KEY, unsigned int FLAGS) SINCE: 1.3.0 The function ‘gpgme_op_passwd’ changes the passphrase of the private key associated with KEY. The only allowed value for FLAGS is ‘0’. The backend engine will usually popup a window to ask for the old and the new passphrase. Thus this function is not useful in a server application (where passphrases are not required anyway). Note that old ‘gpg’ engines (before version 2.0.15) do not support this command and will silently ignore it. -- Function: gpgme_error_t gpgme_op_passwd_start (gpgme_ctx_t CTX, const gpgme_key_t KEY, unsigned int FLAGS) SINCE: 1.3.0 The function ‘gpgme_op_passwd_start’ initiates a ‘gpgme_op_passwd’ operation. It can be completed by calling ‘gpgme_wait’ on the context. *Note Waiting For Completion::. The function returns ‘0’ if the operation was started successfully, and an error code if one of the arguments is not valid or the oepration could not be started.