webpg-npapi 0.6.1
|
Deletes the key specified in keyid from the keyring.
Definition at line 2271 of file webpgPluginAPI.cpp. References get_gpgme_ctx(). Referenced by gpgDeletePrivateKey(), and gpgDeletePublicKey(). { gpgme_ctx_t ctx = get_gpgme_ctx(); gpgme_error_t err; gpgme_key_t key = NULL; FB::VariantMap response; err = gpgme_op_keylist_start (ctx, keyid.c_str(), 0); if (err != GPG_ERR_NO_ERROR) return get_error_map(__func__, gpgme_err_code (err), gpgme_strerror (err), __LINE__, __FILE__); err = gpgme_op_keylist_next (ctx, &key); if (err != GPG_ERR_NO_ERROR) return get_error_map(__func__, gpgme_err_code (err), gpgme_strerror (err), __LINE__, __FILE__); err = gpgme_op_keylist_end (ctx); if (err != GPG_ERR_NO_ERROR) return get_error_map(__func__, gpgme_err_code (err), gpgme_strerror (err), __LINE__, __FILE__); err = gpgme_op_delete(ctx, key, allow_secret); if (err != GPG_ERR_NO_ERROR) return get_error_map(__func__, gpgme_err_code (err), gpgme_strerror (err), __LINE__, __FILE__); gpgme_key_unref (key); gpgme_release (ctx); response["error"] = false; response["result"] = "Key deleted"; return response; }
Here is the call graph for this function:
|