2003-05-26 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2. gpgme/ 2003-05-26 Marcus Brinkmann <marcus@g10code.de> * rungpg.c (gpg_new): Add --enable-progress-filter to gpg invocation. * decrypt-verify.c (_gpgme_op_decrypt_verify_start): Rename to decrypt_verify_start. (gpgme_op_decrypt_verify_start): Call decrypt_verify_start. (gpgme_op_decrypt_verify): Likewise. * verify.c (verify_status_handler): New function that also calls progress status handler. (_gpgme_op_verify_start): Set status handler to verify_status_handler. Rename to (verify_start). (gpgme_op_verify_start): Call verify_start. (gpgme_op_verify): Likewise. * encrypt.c (encrypt_status_handler): New function. (_gpgme_encrypt_sym_status_handler): Call progress status handler. Make static. Rename to encrypt_sym_status_handler. (encrypt_start): Set status handler to encrypt_sym_status_handler or encrypt_status_handler. * sign.c (sign_status_handler): New function. (sign_start): Set status handler to sign_status_handler. * decrypt.c (decrypt_status_handler): New function that also calls progress status handler. (decrypt_start): Set status handler to decrypt_status_handler. * encrypt-sign.c (encrypt_sign_status_handler): Likewise. * decrypt-verify.c (decrypt_verify_status_handler): Call _gpgme_progress_status_handler.
This commit is contained in:
parent
bc73ec0d57
commit
dcc65b1726
@ -1,3 +1,7 @@
|
|||||||
|
2003-05-26 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2.
|
||||||
|
|
||||||
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
In all files, replace the Gpgme* type names with the new gpgme_*
|
In all files, replace the Gpgme* type names with the new gpgme_*
|
||||||
|
6
NEWS
6
NEWS
@ -40,6 +40,12 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
|||||||
|
|
||||||
* GPGME_ATTR_IS_SECRET is not anymore representable as a string.
|
* GPGME_ATTR_IS_SECRET is not anymore representable as a string.
|
||||||
|
|
||||||
|
* GnuPG 1.2.2 is required. The progress callback is now also invoked
|
||||||
|
for encrypt, sign, encrypt-sign, decrypt, verify, and
|
||||||
|
decrypt-verify operations. For verify operations on detached
|
||||||
|
signatures, the progress callback is invoked for both the detached
|
||||||
|
signature and the plaintext message, though.
|
||||||
|
|
||||||
* gpgme_op_verify and gpgme_op_decrypt_verify don't return a status
|
* gpgme_op_verify and gpgme_op_decrypt_verify don't return a status
|
||||||
summary anymore. Use gpgme_get_sig_status to retrieve the individual
|
summary anymore. Use gpgme_get_sig_status to retrieve the individual
|
||||||
stati.
|
stati.
|
||||||
|
@ -31,7 +31,7 @@ AC_INIT(gpgme, 0.4.1, [bug-gpgme@gnupg.org])
|
|||||||
LIBGPGME_LT_CURRENT=10
|
LIBGPGME_LT_CURRENT=10
|
||||||
LIBGPGME_LT_AGE=0
|
LIBGPGME_LT_AGE=0
|
||||||
LIBGPGME_LT_REVISION=0
|
LIBGPGME_LT_REVISION=0
|
||||||
NEED_GPG_VERSION=1.2.0
|
NEED_GPG_VERSION=1.2.2
|
||||||
NEED_GPGSM_VERSION=0.9.0
|
NEED_GPGSM_VERSION=0.9.0
|
||||||
##############################################
|
##############################################
|
||||||
AC_PREREQ(2.52)
|
AC_PREREQ(2.52)
|
||||||
|
@ -1,5 +1,31 @@
|
|||||||
2003-05-26 Marcus Brinkmann <marcus@g10code.de>
|
2003-05-26 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* rungpg.c (gpg_new): Add --enable-progress-filter to gpg
|
||||||
|
invocation.
|
||||||
|
* decrypt-verify.c (_gpgme_op_decrypt_verify_start): Rename to
|
||||||
|
decrypt_verify_start.
|
||||||
|
(gpgme_op_decrypt_verify_start): Call decrypt_verify_start.
|
||||||
|
(gpgme_op_decrypt_verify): Likewise.
|
||||||
|
* verify.c (verify_status_handler): New function that also calls
|
||||||
|
progress status handler.
|
||||||
|
(_gpgme_op_verify_start): Set status handler to verify_status_handler.
|
||||||
|
Rename to (verify_start).
|
||||||
|
(gpgme_op_verify_start): Call verify_start.
|
||||||
|
(gpgme_op_verify): Likewise.
|
||||||
|
* encrypt.c (encrypt_status_handler): New function.
|
||||||
|
(_gpgme_encrypt_sym_status_handler): Call progress status handler.
|
||||||
|
Make static. Rename to encrypt_sym_status_handler.
|
||||||
|
(encrypt_start): Set status handler to encrypt_sym_status_handler
|
||||||
|
or encrypt_status_handler.
|
||||||
|
* sign.c (sign_status_handler): New function.
|
||||||
|
(sign_start): Set status handler to sign_status_handler.
|
||||||
|
* decrypt.c (decrypt_status_handler): New function that also calls
|
||||||
|
progress status handler.
|
||||||
|
(decrypt_start): Set status handler to decrypt_status_handler.
|
||||||
|
* encrypt-sign.c (encrypt_sign_status_handler): Likewise.
|
||||||
|
* decrypt-verify.c (decrypt_verify_status_handler): Call
|
||||||
|
_gpgme_progress_status_handler.
|
||||||
|
|
||||||
* conversion.c (_gpgme_decode_c_string): Add missing break
|
* conversion.c (_gpgme_decode_c_string): Add missing break
|
||||||
statement.
|
statement.
|
||||||
|
|
||||||
|
@ -30,14 +30,15 @@ static gpgme_error_t
|
|||||||
decrypt_verify_status_handler (void *priv, gpgme_status_code_t code,
|
decrypt_verify_status_handler (void *priv, gpgme_status_code_t code,
|
||||||
char *args)
|
char *args)
|
||||||
{
|
{
|
||||||
return _gpgme_decrypt_status_handler (priv, code, args)
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_decrypt_status_handler (priv, code, args)
|
||||||
|| _gpgme_verify_status_handler (priv, code, args);
|
|| _gpgme_verify_status_handler (priv, code, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gpgme_error_t
|
static gpgme_error_t
|
||||||
_gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, int synchronous,
|
decrypt_verify_start (gpgme_ctx_t ctx, int synchronous,
|
||||||
gpgme_data_t cipher, gpgme_data_t plain)
|
gpgme_data_t cipher, gpgme_data_t plain)
|
||||||
{
|
{
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ gpgme_error_t
|
|||||||
gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
|
gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
|
||||||
gpgme_data_t plain)
|
gpgme_data_t plain)
|
||||||
{
|
{
|
||||||
return _gpgme_op_decrypt_verify_start (ctx, 0, cipher, plain);
|
return decrypt_verify_start (ctx, 0, cipher, plain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ gpgme_error_t
|
|||||||
gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher,
|
gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher,
|
||||||
gpgme_data_t plain)
|
gpgme_data_t plain)
|
||||||
{
|
{
|
||||||
gpgme_error_t err = _gpgme_op_decrypt_verify_start (ctx, 1, cipher, plain);
|
gpgme_error_t err = decrypt_verify_start (ctx, 1, cipher, plain);
|
||||||
if (!err)
|
if (!err)
|
||||||
err = _gpgme_wait_one (ctx);
|
err = _gpgme_wait_one (ctx);
|
||||||
return err;
|
return err;
|
||||||
|
@ -137,6 +137,14 @@ _gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gpgme_error_t
|
||||||
|
decrypt_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
|
{
|
||||||
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_decrypt_status_handler (priv, code, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gpgme_error_t
|
gpgme_error_t
|
||||||
_gpgme_op_decrypt_init_result (gpgme_ctx_t ctx)
|
_gpgme_op_decrypt_init_result (gpgme_ctx_t ctx)
|
||||||
{
|
{
|
||||||
@ -177,8 +185,7 @@ decrypt_start (gpgme_ctx_t ctx, int synchronous,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine,
|
_gpgme_engine_set_status_handler (ctx->engine, decrypt_status_handler, ctx);
|
||||||
_gpgme_decrypt_status_handler, ctx);
|
|
||||||
|
|
||||||
return _gpgme_engine_op_decrypt (ctx->engine, cipher, plain);
|
return _gpgme_engine_op_decrypt (ctx->engine, cipher, plain);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
static gpgme_error_t
|
static gpgme_error_t
|
||||||
encrypt_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
encrypt_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
{
|
{
|
||||||
return _gpgme_encrypt_status_handler (priv, code, args)
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_encrypt_status_handler (priv, code, args)
|
||||||
|| _gpgme_sign_status_handler (priv, code, args);
|
|| _gpgme_sign_status_handler (priv, code, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,11 +109,19 @@ _gpgme_encrypt_status_handler (void *priv, gpgme_status_code_t code,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gpgme_error_t
|
static gpgme_error_t
|
||||||
_gpgme_encrypt_sym_status_handler (void *priv, gpgme_status_code_t code,
|
encrypt_sym_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
char *args)
|
|
||||||
{
|
{
|
||||||
return _gpgme_passphrase_status_handler (priv, code, args);
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_passphrase_status_handler (priv, code, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gpgme_error_t
|
||||||
|
encrypt_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
|
{
|
||||||
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_encrypt_status_handler (priv, code, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -168,8 +176,8 @@ encrypt_start (gpgme_ctx_t ctx, int synchronous, gpgme_recipients_t recp,
|
|||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine,
|
_gpgme_engine_set_status_handler (ctx->engine,
|
||||||
symmetric
|
symmetric
|
||||||
? _gpgme_encrypt_sym_status_handler
|
? encrypt_sym_status_handler
|
||||||
: _gpgme_encrypt_status_handler,
|
: encrypt_status_handler,
|
||||||
ctx);
|
ctx);
|
||||||
|
|
||||||
return _gpgme_engine_op_encrypt (ctx->engine, recp, plain, cipher,
|
return _gpgme_engine_op_encrypt (ctx->engine, recp, plain, cipher,
|
||||||
|
@ -384,6 +384,7 @@ gpg_new (void **engine)
|
|||||||
add_arg (gpg, "--no-tty");
|
add_arg (gpg, "--no-tty");
|
||||||
add_arg (gpg, "--charset");
|
add_arg (gpg, "--charset");
|
||||||
add_arg (gpg, "utf8");
|
add_arg (gpg, "utf8");
|
||||||
|
add_arg (gpg, "--enable-progress-filter");
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
if (rc)
|
if (rc)
|
||||||
|
10
gpgme/sign.c
10
gpgme/sign.c
@ -227,6 +227,14 @@ _gpgme_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gpgme_error_t
|
||||||
|
sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
|
{
|
||||||
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_sign_status_handler (priv, code, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gpgme_error_t
|
gpgme_error_t
|
||||||
_gpgme_op_sign_init_result (gpgme_ctx_t ctx)
|
_gpgme_op_sign_init_result (gpgme_ctx_t ctx)
|
||||||
{
|
{
|
||||||
@ -274,7 +282,7 @@ sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t plain,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_sign_status_handler,
|
_gpgme_engine_set_status_handler (ctx->engine, sign_status_handler,
|
||||||
ctx);
|
ctx);
|
||||||
|
|
||||||
return _gpgme_engine_op_sign (ctx->engine, plain, sig, mode, ctx->use_armor,
|
return _gpgme_engine_op_sign (ctx->engine, plain, sig, mode, ctx->use_armor,
|
||||||
|
@ -510,6 +510,14 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gpgme_error_t
|
||||||
|
verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||||
|
{
|
||||||
|
return _gpgme_progress_status_handler (priv, code, args)
|
||||||
|
|| _gpgme_verify_status_handler (priv, code, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
gpgme_error_t
|
gpgme_error_t
|
||||||
_gpgme_op_verify_init_result (gpgme_ctx_t ctx)
|
_gpgme_op_verify_init_result (gpgme_ctx_t ctx)
|
||||||
{
|
{
|
||||||
@ -521,8 +529,8 @@ _gpgme_op_verify_init_result (gpgme_ctx_t ctx)
|
|||||||
|
|
||||||
|
|
||||||
static gpgme_error_t
|
static gpgme_error_t
|
||||||
_gpgme_op_verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig,
|
verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig,
|
||||||
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
||||||
{
|
{
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
|
|
||||||
@ -534,8 +542,7 @@ _gpgme_op_verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig,
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
_gpgme_engine_set_status_handler (ctx->engine, _gpgme_verify_status_handler,
|
_gpgme_engine_set_status_handler (ctx->engine, verify_status_handler, ctx);
|
||||||
ctx);
|
|
||||||
|
|
||||||
if (!sig)
|
if (!sig)
|
||||||
return GPGME_No_Data;
|
return GPGME_No_Data;
|
||||||
@ -552,7 +559,7 @@ gpgme_error_t
|
|||||||
gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig,
|
gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig,
|
||||||
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
||||||
{
|
{
|
||||||
return _gpgme_op_verify_start (ctx, 0, sig, signed_text, plaintext);
|
return verify_start (ctx, 0, sig, signed_text, plaintext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -564,7 +571,7 @@ gpgme_op_verify (gpgme_ctx_t ctx, gpgme_data_t sig, gpgme_data_t signed_text,
|
|||||||
{
|
{
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
|
|
||||||
err = _gpgme_op_verify_start (ctx, 1, sig, signed_text, plaintext);
|
err = verify_start (ctx, 1, sig, signed_text, plaintext);
|
||||||
if (!err)
|
if (!err)
|
||||||
err = _gpgme_wait_one (ctx);
|
err = _gpgme_wait_one (ctx);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user