2003-04-24 Marcus Brinkmann <marcus@g10code.de>
* context.h (struct gpgme_context_s): Remove member verbosity. * gpgme.c (gpgme_new): Do not set member verbosity. * engine.h (_gpgme_engine_set_verbosity): Remove prototype. * engine.c (_gpgme_engine_set_verbosity): Remove function. * engine-backend.h (struct engine_ops): Remove set_verbosity. * engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member. * rungpg.c (_gpgme_engine_ops_gpg): Likewise. (gpg_set_verbosity): Remove function. * decrypt.c (_gpgme_decrypt_start): Don't call _gpgme_engine_set_verbosity. * delete.c (_gpgme_op_delete_start): Likewise. * edit.c (_gpgme_op_edit_start): Likewise. * encrypt.c (_gpgme_op_encrypt_start): Likewise. * encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise. * export.c (_gpgme_op_export_start): Likewise. * genkey.c (_gpgme_op_genkey_start): Likewise. * import.c (_gpgme_op_import_start): Likewise. * keylist.c (gpgme_op_keylist_start): Likewise. (gpgme_op_keylist_ext_start): Likewise. * sign.c (_gpgme_op_sign_start): Likewise. * verify.c (_gpgme_op_verify_start): Likewise.
This commit is contained in:
parent
5375105fad
commit
e927e5c617
@ -1,5 +1,27 @@
|
|||||||
2003-04-24 Marcus Brinkmann <marcus@g10code.de>
|
2003-04-24 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* context.h (struct gpgme_context_s): Remove member verbosity.
|
||||||
|
* gpgme.c (gpgme_new): Do not set member verbosity.
|
||||||
|
* engine.h (_gpgme_engine_set_verbosity): Remove prototype.
|
||||||
|
* engine.c (_gpgme_engine_set_verbosity): Remove function.
|
||||||
|
* engine-backend.h (struct engine_ops): Remove set_verbosity.
|
||||||
|
* engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Remove set_verbosity member.
|
||||||
|
* rungpg.c (_gpgme_engine_ops_gpg): Likewise.
|
||||||
|
(gpg_set_verbosity): Remove function.
|
||||||
|
* decrypt.c (_gpgme_decrypt_start): Don't call
|
||||||
|
_gpgme_engine_set_verbosity.
|
||||||
|
* delete.c (_gpgme_op_delete_start): Likewise.
|
||||||
|
* edit.c (_gpgme_op_edit_start): Likewise.
|
||||||
|
* encrypt.c (_gpgme_op_encrypt_start): Likewise.
|
||||||
|
* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
|
||||||
|
* export.c (_gpgme_op_export_start): Likewise.
|
||||||
|
* genkey.c (_gpgme_op_genkey_start): Likewise.
|
||||||
|
* import.c (_gpgme_op_import_start): Likewise.
|
||||||
|
* keylist.c (gpgme_op_keylist_start): Likewise.
|
||||||
|
(gpgme_op_keylist_ext_start): Likewise.
|
||||||
|
* sign.c (_gpgme_op_sign_start): Likewise.
|
||||||
|
* verify.c (_gpgme_op_verify_start): Likewise.
|
||||||
|
|
||||||
* Makefile.am (libgpgme_la_SOURCES): Add key-cache.c.
|
* Makefile.am (libgpgme_la_SOURCES): Add key-cache.c.
|
||||||
* key.c (key_cache_initialized, key_cache_size,
|
* key.c (key_cache_initialized, key_cache_size,
|
||||||
key_cache_max_chain_length, ): Removed.
|
key_cache_max_chain_length, ): Removed.
|
||||||
@ -3294,4 +3316,3 @@
|
|||||||
This file is distributed in the hope that it will be useful, but
|
This file is distributed in the hope that it will be useful, but
|
||||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@ -81,8 +81,6 @@ struct gpgme_context_s
|
|||||||
/* The running engine process. */
|
/* The running engine process. */
|
||||||
EngineObject engine;
|
EngineObject engine;
|
||||||
|
|
||||||
/* Level of verbosity to use. */
|
|
||||||
int verbosity;
|
|
||||||
int use_armor;
|
int use_armor;
|
||||||
int use_textmode;
|
int use_textmode;
|
||||||
int keylist_mode;
|
int keylist_mode;
|
||||||
|
@ -188,7 +188,6 @@ _gpgme_decrypt_start (GpgmeCtx ctx, int synchronous,
|
|||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_decrypt (ctx->engine, ciph, plain);
|
err = _gpgme_engine_op_decrypt (ctx->engine, ciph, plain);
|
||||||
|
|
||||||
|
@ -75,7 +75,6 @@ _gpgme_op_delete_start (GpgmeCtx ctx, int synchronous,
|
|||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, delete_status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, delete_status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_delete (ctx->engine, key, allow_secret);
|
err = _gpgme_engine_op_delete (ctx->engine, key, allow_secret);
|
||||||
|
|
||||||
|
@ -121,8 +121,6 @@ _gpgme_op_edit_start (GpgmeCtx ctx, int synchronous,
|
|||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, edit_status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, edit_status_handler, ctx);
|
||||||
|
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_edit (ctx->engine, key, out, ctx);
|
err = _gpgme_engine_op_edit (ctx->engine, key, out, ctx);
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
|
@ -59,7 +59,6 @@ _gpgme_op_encrypt_sign_start (GpgmeCtx ctx, int synchronous,
|
|||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine,
|
_gpgme_engine_set_status_handler (ctx->engine,
|
||||||
encrypt_sign_status_handler, ctx);
|
encrypt_sign_status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
/* Check the supplied data */
|
/* Check the supplied data */
|
||||||
if (!plain)
|
if (!plain)
|
||||||
|
@ -188,7 +188,6 @@ _gpgme_op_encrypt_start (GpgmeCtx ctx, int synchronous,
|
|||||||
? _gpgme_encrypt_sym_status_handler
|
? _gpgme_encrypt_sym_status_handler
|
||||||
: _gpgme_encrypt_status_handler,
|
: _gpgme_encrypt_status_handler,
|
||||||
ctx);
|
ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
/* Check the supplied data */
|
/* Check the supplied data */
|
||||||
if (!plain)
|
if (!plain)
|
||||||
|
@ -44,7 +44,6 @@ struct engine_ops
|
|||||||
GpgmeError (*set_colon_line_handler) (void *engine,
|
GpgmeError (*set_colon_line_handler) (void *engine,
|
||||||
EngineColonLineHandler fnc,
|
EngineColonLineHandler fnc,
|
||||||
void *fnc_value);
|
void *fnc_value);
|
||||||
GpgmeError (*set_verbosity) (void *engine, int verbosity);
|
|
||||||
GpgmeError (*decrypt) (void *engine, GpgmeData ciph, GpgmeData plain);
|
GpgmeError (*decrypt) (void *engine, GpgmeData ciph, GpgmeData plain);
|
||||||
GpgmeError (*delete) (void *engine, GpgmeKey key, int allow_secret);
|
GpgmeError (*delete) (void *engine, GpgmeKey key, int allow_secret);
|
||||||
GpgmeError (*edit) (void *engine, GpgmeKey key, GpgmeData out,
|
GpgmeError (*edit) (void *engine, GpgmeKey key, GpgmeData out,
|
||||||
|
@ -1439,7 +1439,6 @@ struct engine_ops _gpgme_engine_ops_gpgsm =
|
|||||||
gpgsm_set_status_handler,
|
gpgsm_set_status_handler,
|
||||||
NULL, /* set_command_handler */
|
NULL, /* set_command_handler */
|
||||||
gpgsm_set_colon_line_handler,
|
gpgsm_set_colon_line_handler,
|
||||||
NULL, /* set_verbosity */
|
|
||||||
gpgsm_decrypt,
|
gpgsm_decrypt,
|
||||||
gpgsm_delete,
|
gpgsm_delete,
|
||||||
NULL, /* edit */
|
NULL, /* edit */
|
||||||
|
@ -206,17 +206,6 @@ _gpgme_engine_release (EngineObject engine)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
_gpgme_engine_set_verbosity (EngineObject engine, int verbosity)
|
|
||||||
{
|
|
||||||
if (!engine)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (engine->ops->set_verbosity)
|
|
||||||
(*engine->ops->set_verbosity) (engine->engine, verbosity);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_engine_set_status_handler (EngineObject engine,
|
_gpgme_engine_set_status_handler (EngineObject engine,
|
||||||
EngineStatusHandler fnc, void *fnc_value)
|
EngineStatusHandler fnc, void *fnc_value)
|
||||||
|
@ -45,7 +45,6 @@ GpgmeError _gpgme_engine_set_command_handler (EngineObject engine,
|
|||||||
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||||
EngineColonLineHandler fnc,
|
EngineColonLineHandler fnc,
|
||||||
void *fnc_value);
|
void *fnc_value);
|
||||||
void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity);
|
|
||||||
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
|
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
|
||||||
GpgmeData plain);
|
GpgmeData plain);
|
||||||
GpgmeError _gpgme_engine_op_delete (EngineObject engine, GpgmeKey key,
|
GpgmeError _gpgme_engine_op_delete (EngineObject engine, GpgmeKey key,
|
||||||
|
@ -54,7 +54,6 @@ _gpgme_op_export_start (GpgmeCtx ctx, int synchronous,
|
|||||||
}
|
}
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, export_status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, export_status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_export (ctx->engine, recp, keydata, ctx->use_armor);
|
err = _gpgme_engine_op_export (ctx->engine, recp, keydata, ctx->use_armor);
|
||||||
|
|
||||||
|
@ -127,7 +127,6 @@ _gpgme_op_genkey_start (GpgmeCtx ctx, int synchronous, const char *parms,
|
|||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, genkey_status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, genkey_status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_genkey (ctx->engine, ctx->help_data_1, ctx->use_armor,
|
err = _gpgme_engine_op_genkey (ctx->engine, ctx->help_data_1, ctx->use_armor,
|
||||||
pubkey, seckey);
|
pubkey, seckey);
|
||||||
|
@ -52,7 +52,6 @@ gpgme_new (GpgmeCtx *r_ctx)
|
|||||||
if (!ctx)
|
if (!ctx)
|
||||||
return GPGME_Out_Of_Core;
|
return GPGME_Out_Of_Core;
|
||||||
ctx->keylist_mode = GPGME_KEYLIST_MODE_LOCAL;
|
ctx->keylist_mode = GPGME_KEYLIST_MODE_LOCAL;
|
||||||
ctx->verbosity = 1;
|
|
||||||
ctx->include_certs = 1;
|
ctx->include_certs = 1;
|
||||||
_gpgme_fd_table_init (&ctx->fdt);
|
_gpgme_fd_table_init (&ctx->fdt);
|
||||||
*r_ctx = ctx;
|
*r_ctx = ctx;
|
||||||
|
@ -197,7 +197,6 @@ _gpgme_op_import_start (GpgmeCtx ctx, int synchronous, GpgmeData keydata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx);
|
_gpgme_engine_set_status_handler (ctx->engine, import_status_handler, ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_import (ctx->engine, keydata);
|
err = _gpgme_engine_op_import (ctx->engine, keydata);
|
||||||
|
|
||||||
|
@ -744,11 +744,6 @@ gpgme_op_keylist_start (GpgmeCtx ctx, const char *pattern, int secret_only)
|
|||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
/* We don't want to use the verbose mode as this will also print the
|
|
||||||
key signatures which is in most cases not needed and furthermore
|
|
||||||
we just ignore those lines - This should speed up things. */
|
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, 0);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_keylist (ctx->engine, pattern, secret_only,
|
err = _gpgme_engine_op_keylist (ctx->engine, pattern, secret_only,
|
||||||
ctx->keylist_mode);
|
ctx->keylist_mode);
|
||||||
|
|
||||||
@ -794,11 +789,6 @@ gpgme_op_keylist_ext_start (GpgmeCtx ctx, const char *pattern[],
|
|||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
/* We don't want to use the verbose mode as this will also print the
|
|
||||||
key signatures which is in most cases not needed and furthermore
|
|
||||||
we just ignore those lines - This should speed up things. */
|
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, 0);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_keylist_ext (ctx->engine, pattern, secret_only,
|
err = _gpgme_engine_op_keylist_ext (ctx->engine, pattern, secret_only,
|
||||||
reserved, ctx->keylist_mode);
|
reserved, ctx->keylist_mode);
|
||||||
|
|
||||||
|
@ -394,17 +394,6 @@ gpg_new (void **engine)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GpgmeError
|
|
||||||
gpg_set_verbosity (void *engine, int verbosity)
|
|
||||||
{
|
|
||||||
GpgObject gpg = engine;
|
|
||||||
|
|
||||||
GpgmeError err = 0;
|
|
||||||
while (!err && verbosity-- > 0)
|
|
||||||
err = add_arg (gpg, "--verbose");
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note, that the status_handler is allowed to modifiy the args
|
/* Note, that the status_handler is allowed to modifiy the args
|
||||||
value. */
|
value. */
|
||||||
static void
|
static void
|
||||||
@ -1660,7 +1649,6 @@ struct engine_ops _gpgme_engine_ops_gpg =
|
|||||||
gpg_set_status_handler,
|
gpg_set_status_handler,
|
||||||
gpg_set_command_handler,
|
gpg_set_command_handler,
|
||||||
gpg_set_colon_line_handler,
|
gpg_set_colon_line_handler,
|
||||||
gpg_set_verbosity,
|
|
||||||
gpg_decrypt,
|
gpg_decrypt,
|
||||||
gpg_delete,
|
gpg_delete,
|
||||||
gpg_edit,
|
gpg_edit,
|
||||||
|
@ -214,7 +214,6 @@ _gpgme_op_sign_start (GpgmeCtx ctx, int synchronous,
|
|||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_sign_status_handler,
|
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_sign_status_handler,
|
||||||
ctx);
|
ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
err = _gpgme_engine_op_sign (ctx->engine, in, out, mode, ctx->use_armor,
|
err = _gpgme_engine_op_sign (ctx->engine, in, out, mode, ctx->use_armor,
|
||||||
ctx->use_textmode, ctx->include_certs,
|
ctx->use_textmode, ctx->include_certs,
|
||||||
|
@ -382,7 +382,6 @@ _gpgme_op_verify_start (GpgmeCtx ctx, int synchronous,
|
|||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_verify_status_handler,
|
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_verify_status_handler,
|
||||||
ctx);
|
ctx);
|
||||||
_gpgme_engine_set_verbosity (ctx->engine, ctx->verbosity);
|
|
||||||
|
|
||||||
/* Check the supplied data. */
|
/* Check the supplied data. */
|
||||||
if (!sig)
|
if (!sig)
|
||||||
|
Loading…
Reference in New Issue
Block a user