* 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.
+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>
In all files, replace the Gpgme* type names with the new gpgme_*
* 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.
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)
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
statement.
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;
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);
}
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;
}
+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)
{
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);
}
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);
}
}
-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);
}
_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,
add_arg (gpg, "--no-tty");
add_arg (gpg, "--charset");
add_arg (gpg, "utf8");
+ add_arg (gpg, "--enable-progress-filter");
leave:
if (rc)
}
+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)
{
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,
}
+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)
{
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;
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;
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);
}
{
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;