From: Marcus Brinkmann Date: Mon, 26 May 2003 21:50:45 +0000 (+0000) Subject: 2003-05-26 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~622 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e904ac6e532d1878a489e49d2b83334d45231752;p=gpgme.git 2003-05-26 Marcus Brinkmann * configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2. gpgme/ 2003-05-26 Marcus Brinkmann * 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. --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 5647abb..b08dd55 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2003-05-26 Marcus Brinkmann + + * configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2. + 2003-05-18 Marcus Brinkmann In all files, replace the Gpgme* type names with the new gpgme_* diff --git a/trunk/NEWS b/trunk/NEWS index 14e23fc..a6523ad 100644 --- a/trunk/NEWS +++ b/trunk/NEWS @@ -40,6 +40,12 @@ Noteworthy changes in version 0.4.1 (unreleased) * 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 summary anymore. Use gpgme_get_sig_status to retrieve the individual stati. diff --git a/trunk/configure.ac b/trunk/configure.ac index 119ec88..863f3d1 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -31,7 +31,7 @@ AC_INIT(gpgme, 0.4.1, [bug-gpgme@gnupg.org]) LIBGPGME_LT_CURRENT=10 LIBGPGME_LT_AGE=0 LIBGPGME_LT_REVISION=0 -NEED_GPG_VERSION=1.2.0 +NEED_GPG_VERSION=1.2.2 NEED_GPGSM_VERSION=0.9.0 ############################################## AC_PREREQ(2.52) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index bd2d4a5..e0c8079 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,5 +1,31 @@ 2003-05-26 Marcus Brinkmann + * 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 statement. diff --git a/trunk/gpgme/decrypt-verify.c b/trunk/gpgme/decrypt-verify.c index 33306e8..a974505 100644 --- a/trunk/gpgme/decrypt-verify.c +++ b/trunk/gpgme/decrypt-verify.c @@ -30,14 +30,15 @@ static gpgme_error_t decrypt_verify_status_handler (void *priv, gpgme_status_code_t code, 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); } static gpgme_error_t -_gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, int synchronous, - gpgme_data_t cipher, gpgme_data_t plain) +decrypt_verify_start (gpgme_ctx_t ctx, int synchronous, + gpgme_data_t cipher, gpgme_data_t plain) { 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_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_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) err = _gpgme_wait_one (ctx); return err; diff --git a/trunk/gpgme/decrypt.c b/trunk/gpgme/decrypt.c index 7e27ac2..a1d8310 100644 --- a/trunk/gpgme/decrypt.c +++ b/trunk/gpgme/decrypt.c @@ -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_op_decrypt_init_result (gpgme_ctx_t ctx) { @@ -177,8 +185,7 @@ decrypt_start (gpgme_ctx_t ctx, int synchronous, return err; } - _gpgme_engine_set_status_handler (ctx->engine, - _gpgme_decrypt_status_handler, ctx); + _gpgme_engine_set_status_handler (ctx->engine, decrypt_status_handler, ctx); return _gpgme_engine_op_decrypt (ctx->engine, cipher, plain); } diff --git a/trunk/gpgme/encrypt-sign.c b/trunk/gpgme/encrypt-sign.c index ace712a..5d41fe9 100644 --- a/trunk/gpgme/encrypt-sign.c +++ b/trunk/gpgme/encrypt-sign.c @@ -30,7 +30,8 @@ static gpgme_error_t 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); } diff --git a/trunk/gpgme/encrypt.c b/trunk/gpgme/encrypt.c index a5be70b..b98f55a 100644 --- a/trunk/gpgme/encrypt.c +++ b/trunk/gpgme/encrypt.c @@ -109,11 +109,19 @@ _gpgme_encrypt_status_handler (void *priv, gpgme_status_code_t code, } -gpgme_error_t -_gpgme_encrypt_sym_status_handler (void *priv, gpgme_status_code_t code, - char *args) +static gpgme_error_t +encrypt_sym_status_handler (void *priv, gpgme_status_code_t code, char *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_passphrase_status_handler (priv, code, 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, symmetric - ? _gpgme_encrypt_sym_status_handler - : _gpgme_encrypt_status_handler, + ? encrypt_sym_status_handler + : encrypt_status_handler, ctx); return _gpgme_engine_op_encrypt (ctx->engine, recp, plain, cipher, diff --git a/trunk/gpgme/rungpg.c b/trunk/gpgme/rungpg.c index 698d0ca..c89e39e 100644 --- a/trunk/gpgme/rungpg.c +++ b/trunk/gpgme/rungpg.c @@ -384,6 +384,7 @@ gpg_new (void **engine) add_arg (gpg, "--no-tty"); add_arg (gpg, "--charset"); add_arg (gpg, "utf8"); + add_arg (gpg, "--enable-progress-filter"); leave: if (rc) diff --git a/trunk/gpgme/sign.c b/trunk/gpgme/sign.c index 2f7da6d..2478be8 100644 --- a/trunk/gpgme/sign.c +++ b/trunk/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_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; } - _gpgme_engine_set_status_handler (ctx->engine, _gpgme_sign_status_handler, + _gpgme_engine_set_status_handler (ctx->engine, sign_status_handler, ctx); return _gpgme_engine_op_sign (ctx->engine, plain, sig, mode, ctx->use_armor, diff --git a/trunk/gpgme/verify.c b/trunk/gpgme/verify.c index 460a051..e8c8a78 100644 --- a/trunk/gpgme/verify.c +++ b/trunk/gpgme/verify.c @@ -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_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 -_gpgme_op_verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig, - gpgme_data_t signed_text, gpgme_data_t plaintext) +verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig, + gpgme_data_t signed_text, gpgme_data_t plaintext) { gpgme_error_t err; @@ -534,8 +542,7 @@ _gpgme_op_verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig, if (err) return err; - _gpgme_engine_set_status_handler (ctx->engine, _gpgme_verify_status_handler, - ctx); + _gpgme_engine_set_status_handler (ctx->engine, verify_status_handler, ctx); if (!sig) return GPGME_No_Data; @@ -552,7 +559,7 @@ gpgme_error_t gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig, 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; - err = _gpgme_op_verify_start (ctx, 1, sig, signed_text, plaintext); + err = verify_start (ctx, 1, sig, signed_text, plaintext); if (!err) err = _gpgme_wait_one (ctx); return err;