Page MenuHome GnuPG

860_0001-Core-Add-file_size-support-to-gpgme_data.patch
AbandonedPublic

Authored by aheinecke on Jul 16 2016, 9:05 PM.

Details

Reviewers
None
Summary

From b73e1fc2fd496e7caac08fe937a6abbc9c9cdc7f Mon Sep 17 00:00:00 2001
From: Andre Heinecke <aheinecke@intevation.de>
Date: Fri, 15 Jul 2016 17:22:35 +0200
Subject: [PATCH] Core: Add file_size support to gpgme_data

  • doc/gpgme.texi (gpgme_data_get_file_size)

(gpgme_data_set_file_size): Document

  • lang/cpp/src/data.cpp (GpgME::Data::Data(DataProvider *)): Set

file size for seekable DataProvider.

  • src/data.c (gpgme_data_set_file_size),

(gpgme_data_get_file_size): New.

  • src/data.h (gpgme_data): Add file_size.
  • src/gpgme.h.in (gpgme_data_set_file_size),

(gpgme_data_get_file_size): Add API.

  • src/libgpgme.vers, src/gpgme.def: Export symbols.
  • src/engine-gpg.c (append_size_arg): New helper.

(gpg_encrypt, gpg_encrypt_sign, gpg_sign): Call add_file_size.

Setting the file size makes it possible to use the new
size scaling progress of GnuPG 2.1.14 with callback
based data where the caller to gpgme knows the input

size and can set it accordingly.

NEWS | 2 ++
doc/gpgme.texi | 21 +++++++++++++++++++++
lang/cpp/src/data.cpp | 5 +++++
src/data.c | 33 +++++++++++++++++++++++++++++++++
src/data.h | 4 ++++
src/engine-gpg.c | 27 +++++++++++++++++++++++++++
src/gpgme.def | 3 +++
src/gpgme.h.in | 13 +++++++++++++
src/libgpgme.vers | 2 ++
9 files changed, 110 insertions(+)

2.1.4

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped