mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgsm: Print PROGRESS status lines.
* common/ksba-io-support.c (struct writer_cb_parm_s): Add field progress. (struct gnupg_ksba_io_s): Add field is_writer. (update_write_progress): New. (base64_writer_cb, plain_writer_cb): Call update_write_progress. (base64_finish_write): Ditto. (gnupg_ksba_create_writer): Set is_writer. (gnupg_ksba_set_progress_cb): New. (gnupg_ksba_set_total): New. * common/ksba-io-support.h (gnupg_ksba_progress_cb_t): New type. * sm/server.c (gpgsm_status2): Return error from statusfp writes. (gpgsm_progress_cb): New. * sm/decrypt.c (gpgsm_decrypt): Set progress handler. * sm/encrypt.c (gpgsm_encrypt): Ditto. * sm/sign.c (gpgsm_sign): Ditto. * sm/verify.c (gpgsm_verify): Ditto. -- GnuPG-bug-id: 6534
This commit is contained in:
parent
808494b485
commit
c58067415f
8 changed files with 167 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
|||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
* SPDX-License-Identifier: (LGPL-3.0-or-later OR GPL-2.0-or-later)
|
||||
*/
|
||||
|
||||
#ifndef GNUPG_KSBA_IO_SUPPORT_H
|
||||
|
@ -42,6 +43,10 @@
|
|||
/* Context object. */
|
||||
typedef struct gnupg_ksba_io_s *gnupg_ksba_io_t;
|
||||
|
||||
/* Progress callback type. */
|
||||
typedef gpg_error_t (*gnupg_ksba_progress_cb_t)(ctrl_t ctrl,
|
||||
uint64_t current,
|
||||
uint64_t total);
|
||||
|
||||
|
||||
gpg_error_t gnupg_ksba_create_reader (gnupg_ksba_io_t *ctx,
|
||||
|
@ -57,10 +62,13 @@ gpg_error_t gnupg_ksba_create_writer (gnupg_ksba_io_t *ctx,
|
|||
const char *pem_name,
|
||||
estream_t stream,
|
||||
ksba_writer_t *r_writer);
|
||||
|
||||
gpg_error_t gnupg_ksba_finish_writer (gnupg_ksba_io_t ctx);
|
||||
void gnupg_ksba_destroy_writer (gnupg_ksba_io_t ctx);
|
||||
|
||||
void gnupg_ksba_set_progress_cb (gnupg_ksba_io_t ctx,
|
||||
gnupg_ksba_progress_cb_t cb, ctrl_t ctrl);
|
||||
void gnupg_ksba_set_total (gnupg_ksba_io_t ctx, uint64_t total);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue