[git] GPGME - branch, master, updated. gpgme-1.10.0-52-gad95288
by Andre Heinecke
cvs at cvs.gnupg.org
Thu Mar 15 16:23:22 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, master has been updated
via ad95288d3b3efc38998841add4fe658c84701f98 (commit)
via a630a1e3e74c926163864b013cb164b4cd1866fc (commit)
from e846c3daeeb4e7092169cdb7bf4f55e0b105aac3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ad95288d3b3efc38998841add4fe658c84701f98
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Mar 15 16:21:00 2018 +0100
cpp: Expose skipped_v3_keys
* lang/cpp/src/importresult.cpp,
lang/cpp/src/importresult.h (ImportResult::numV3KeysSkipped): New.
--
GnuPG-Bug-Id: T3776
diff --git a/NEWS b/NEWS
index c172697..7b6fdd9 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Noteworthy changes in version 1.10.1 (unreleased)
gpgme_import_result_t EXTENDED: New field 'skipped_v3_keys'
cpp: Key::locate NEW.
cpp: Data::toString NEW.
+ cpp: ImportResult::numV3KeysSkipped NEW.
Noteworthy changes in version 1.10.0 (2017-12-12)
-------------------------------------------------
diff --git a/lang/cpp/src/importresult.cpp b/lang/cpp/src/importresult.cpp
index 8c35f9c..dbb31d0 100644
--- a/lang/cpp/src/importresult.cpp
+++ b/lang/cpp/src/importresult.cpp
@@ -154,6 +154,11 @@ int GpgME::ImportResult::notImported() const
return d ? d->res.not_imported : 0 ;
}
+int GpgME::ImportResult::numV3KeysSkipped() const
+{
+ return d ? d->res.skipped_v3_keys : 0 ;
+}
+
GpgME::Import GpgME::ImportResult::import(unsigned int idx) const
{
return Import(d, idx);
diff --git a/lang/cpp/src/importresult.h b/lang/cpp/src/importresult.h
index 2f0e7f2..0547679 100644
--- a/lang/cpp/src/importresult.h
+++ b/lang/cpp/src/importresult.h
@@ -78,6 +78,7 @@ public:
int numSecretKeysUnchanged() const;
int notImported() const;
+ int numV3KeysSkipped() const;
Import import(unsigned int idx) const;
std::vector<Import> imports() const;
commit a630a1e3e74c926163864b013cb164b4cd1866fc
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Mar 15 15:58:32 2018 +0100
core: Parse skipped_v3_keys
* src/gpgme.h.in (gpgme_import_result_t): Extend with skipped_v3_keys.
* src/import.c (gpgme_op_import_result): Extend debug with new field.
(parse_import_res): Parse skipped_v3_keys.
* tests/gpg/t-support.h, tests/run-support.h (print_import_result):
Print skipped_v3_keys.
--
This makes it possible to handle this in a GUI in a future
version.
GnuPG-Bug-Id: T3776
diff --git a/NEWS b/NEWS
index 1a342b1..c172697 100644
--- a/NEWS
+++ b/NEWS
@@ -3,10 +3,10 @@ Noteworthy changes in version 1.10.1 (unreleased)
* Interface changes relative to the 1.10.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ gpgme_import_result_t EXTENDED: New field 'skipped_v3_keys'
cpp: Key::locate NEW.
cpp: Data::toString NEW.
-
Noteworthy changes in version 1.10.0 (2017-12-12)
-------------------------------------------------
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index ff80023..73f2c94 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -1637,6 +1637,9 @@ struct _gpgme_op_import_result
/* Number of keys not imported. */
int not_imported;
+ /* Number of v3 keys skipped. */
+ int skipped_v3_keys;
+
/* List of keys for which an import was attempted. */
gpgme_import_status_t imports;
};
diff --git a/src/import.c b/src/import.c
index 386ca72..f0d9d9f 100644
--- a/src/import.c
+++ b/src/import.c
@@ -94,8 +94,9 @@ gpgme_op_import_result (gpgme_ctx_t ctx)
TRACE_LOG3 ("%i secret keys, %i imported, %i unchanged",
opd->result.secret_read, opd->result.secret_imported,
opd->result.secret_unchanged);
- TRACE_LOG2 ("%i skipped new keys, %i not imported",
- opd->result.skipped_new_keys, opd->result.not_imported);
+ TRACE_LOG3 ("%i skipped new keys, %i not imported, %i v3 skipped",
+ opd->result.skipped_new_keys, opd->result.not_imported,
+ opd->result.skipped_v3_keys);
impstat = opd->result.imports;
i = 0;
@@ -212,6 +213,10 @@ parse_import_res (char *args, gpgme_import_result_t result)
PARSE_NEXT (result->secret_unchanged);
PARSE_NEXT (result->skipped_new_keys);
PARSE_NEXT (result->not_imported);
+ if (args && *args)
+ {
+ PARSE_NEXT (result->skipped_v3_keys);
+ }
return 0;
}
diff --git a/tests/gpg/t-support.h b/tests/gpg/t-support.h
index f6dec68..ef5766a 100644
--- a/tests/gpg/t-support.h
+++ b/tests/gpg/t-support.h
@@ -196,7 +196,8 @@ print_import_result (gpgme_import_result_t r)
" secret imported: %d\n"
" secret unchanged: %d\n"
" skipped new keys: %d\n"
- " not imported: %d\n",
+ " not imported: %d\n"
+ " skipped v3 keys: %d\n",
r->considered,
r->no_user_id,
r->imported,
@@ -210,6 +211,7 @@ print_import_result (gpgme_import_result_t r)
r->secret_imported,
r->secret_unchanged,
r->skipped_new_keys,
- r->not_imported);
+ r->not_imported,
+ r->skipped_v3_keys);
}
diff --git a/tests/run-support.h b/tests/run-support.h
index 6a2170b..6c713a9 100644
--- a/tests/run-support.h
+++ b/tests/run-support.h
@@ -177,7 +177,8 @@ print_import_result (gpgme_import_result_t r)
" secret imported: %d\n"
" secret unchanged: %d\n"
" skipped new keys: %d\n"
- " not imported: %d\n",
+ " not imported: %d\n"
+ " skipped v3 keys: %d\n",
r->considered,
r->no_user_id,
r->imported,
@@ -191,6 +192,7 @@ print_import_result (gpgme_import_result_t r)
r->secret_imported,
r->secret_unchanged,
r->skipped_new_keys,
- r->not_imported);
+ r->not_imported,
+ r->skipped_v3_keys);
}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 ++-
lang/cpp/src/importresult.cpp | 5 +++++
lang/cpp/src/importresult.h | 1 +
src/gpgme.h.in | 3 +++
src/import.c | 9 +++++++--
tests/gpg/t-support.h | 6 ++++--
tests/run-support.h | 6 ++++--
7 files changed, 26 insertions(+), 7 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list