* lang/cpp/src/context.cpp: Respect directly provided flags
in the new decrypt functions.
--
Overlooked in the initial commit. Also fixed the according
unused variable warnings.
* lang/cpp/src/context.cpp: New decrypt and decryptVerify functions
that take flags as arguments. Use new variants in old functions.
(Context::setDecryptionFlags): New helper.
(Context::Private::Private): Initialize new member.
* lang/cpp/src/context_p.h (Context::Private::decryptFlags): New.
* lang/cpp/src/context.h (Context::DecryptFlags): New enum.
(Context::EncryptionFlags): Extend for EncryptWrap.
--
The setDecryptionFlags provides a generic way to set decryption
flags for the whole context. This allows existing code to just
keep using the old functions and modify the decryption behavior
in a central place.
* lang/cpp/data.h, lang/cpp/data.cpp (GpgME::Data::toKeys): New.
--
Doing this in data instead of Context is a bit more idiomatic. But
this could also be added to Context.
* configure.ac: Set HAVE_MACOS_SYSTEM conditional.
* lang/qt/src/Makefile.am,
lang/cpp/src/Makefile.am,
lang/qt/src/QGpgmeConfig.cmake.in.in,
lang/cpp/src/GpgmeConfig.cmake.in.in: Use libsuffix again to
distinguish between macos .dylib
--
GnuPG-Bug-Id: 2884
* lang/cpp/src/key.cpp (Key::update): Check for
a secret key first before listing public keys.
--
This is a performance delay but the update should
only be called in a non gui thread anyway. The information
if we have the secret key for this key is important to provide
after update.
* lang/cpp/src/key.cpp (UserID::addrSpec): Use uid->address instead
of normalizing again.
(&operator<<(std::ostream &, const UserID &): Print it.
--
This saves a normalization and fixes the case where a user id
is just a mail address without name, in that case gpgme sets
"address" but not email. Because the email is then the name.
* lang/cpp/src/verificationresult.cpp
(Signature::key(bool,bool)): Don't update the returned copy
but the actual key of the signature.
--
The whole point of the update is to change the partial key
from the signature (e.g. only fingerprint and one uid as we
would have from tofu) to a fully keylisted one.
* lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove a forgotten
instance of @libsuffix@.
--
b2c07bd47b removed @libsuffix@ from
cmake config files, but missed one instance.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
* lang/cpp/src/GpgmeppConfig-w32.cmake.in.in
lang/qt/src/QGpgmeConfig-w32.cmake.in.in: New.
* lang/cpp/src/GpgmeppConfig.cmake.in.in,
lang/qt/src/QGpgmeConfig.cmake.in.in: Remove libsuffix handling.
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Create / install w32 config files.
* configure.ac: Configure them.
--
To work with DLL's cmake needs to know about the implib and
the final DLL. So the config files look different enough
that it's better to use alternative files.
* configure.ac (VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO): New
subst variables for the version header.
* lang/cpp/src/GpgmeppConfigVersion.cmake.in,
lang/cpp/src/gpgmepp_version.h.in,
lang/qt/src/QGpgmeConfigVersion.cmake.in,
lang/qt/src/qgpgme_version.h.in: Use new variables.
--
Using the LT_* variables was just wrong. Reporting the
package version also makes more sense then the library version.
Having different versions might make ABI breaks more visible
by increasing the major version number, but to have different
versions in the same package is too confusing imo and gpgme
uses a versioning that is unrelated to the library version number.
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Install version headers in include
subdirs.
--
This change was requested on the gnupg-devel mailing list to
avoid placing these headers into the top level include directories.
There is currently no known user of these headers so changing it
now should not break things downstream.
* lang/cpp/src/key.cpp (UserID::addrSpecFromString): New static
function to expose addrspec from uid.
(UserID::addrSpec): New. Get addrSpec from Userid.
* NEWS: Update accordingly.
* lang/cpp/src/verificationresult.cpp (Signature::key(bool, bool)):
New. Can be used to search / update the key associcated with this
signature.
--
By using update a caller can ensure that an incomplete key
obtainable through the new key() function is fully loaded.
With search the key can be looked up in the internal keyring.
As the results are cached this can be done in the crypto thread
and the result then better used in the UI thread.
* lang/cpp/src/verificationresult.cpp (Private): Add null key
to list when there is no key associated with the signature.
--
This fixes an out of bounds read when a verification did
not have a key.
* lang/cpp/src/key.cpp: Include <strings.h> for 'strcasecmp'.
* tests/gpg/t-cancel.c: Include <sys/select.h> for 'fd_set' and
friends.
Signed-off-by: Justus Winter <justus@g10code.com>
* lang/cpp/src/Makefile.am,
lang/qt/src/Makefile.am: Replace resolved_includedir.
* lang/cpp/src/GpgmeppConfig.cmake.in.in,
lang/qt/src/QGpgmeConfig.cmake.in.in: Use resolved_includedir
instead of relying on a common installation prefix.
--
This fixes usage of the config files in case gpgme
is configured with a custom --includedir.
We have to do the replacement manually like for libdir
because configure would include variables in the replacement.
* lang/cpp/src/context.cpp
(Context::signaturePolicyURL): return nullptr on default
(to_tofu_policy_t): add default case for unknown
* lang/cpp/src/key.cpp
(Key::primaryFingerprint): return nullptr on default
* lang/cpp/src/tofuinfo.cpp
(GpgME::TofuInfo::policy): add default case for unknown
Signed-off-by: Andreas Stieger <astieger@suse.com>
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
* lang/cpp/src/tofuinfo.h (Policy, Validity): Declare sizes.
--
This is a quick ABI break before the release so that we can
easier extend them in the future. All new enums in public API
should be declared with a size from now on.
* src/gpgme.h.in (struct _gpeme_tofu_info): Rename FIRSTSEEN to
SIGNFIRST and LASTSEEN to SIGNLAST. Add ENCRFIST and ENCRLAST.
* src/keylist.c (parse_tfs_record): Parse to ENCRFIRST and ENCRLAST.
* src/verify.c (parse_tofu_stats): Ditto.
* tests/run-keylist.c (main): Adjust and print encrypt stats.
* tests/run-verify.c (print_result): Ditto.
* lang/cpp/src/tofuinfo.h (TofuInfo): Rename firstSeen to signFirst
and lastSeen to signLast. Add encrCount, encrFirst and encrLast.
* lang/cpp/src/tofuinfo.cpp (encrCount, encrFirst, encrLast): New.
--
The latest GnuPG commits have the needed changes but we also allow the
use of currently released GnuPG version.
Signed-off-by: Werner Koch <wk@gnupg.org>
* lang/cpp/src/key.cpp (Key::update): New.
* lang/cpp/src/key.h: Update accordingly.
--
This function helps if you have an incomplete key or want
to make sure all info in a key is complete (e.g. validity / tofuinfo)
* lang/cpp/src/key.cpp (Key, UserID): Add ostream operator.
* lang/cpp/src/key.h: Update accordingly.
--
This is helpful debugging / showing the state of a key / uid and
tofuinfo.