summaryrefslogtreecommitdiff
path: root/lang/cpp/src/key.h
diff options
context:
space:
mode:
authorIngo Klöcker <dev@ingo-kloecker.de>2023-04-18 13:16:22 +0200
committerIngo Klöcker <dev@ingo-kloecker.de>2023-04-18 13:16:22 +0200
commit5bd84cfd3f092703bb4b9b993be7d89ca13b36b0 (patch)
treea6ca22536a79eafca309c33ebc057468bc5afa3e /lang/cpp/src/key.h
parent7d1159c1e99bb1bae0ab698c85105dcdcb95b7ea (diff)
downloadgpgme-5bd84cfd3f092703bb4b9b993be7d89ca13b36b0.tar.gz
cpp: Fix Key::canSign()
* lang/cpp/src/key.h (canReallySign): Deprecate. * lang/cpp/src/key.cpp (canSign): Remove workaround. Use implementation of canReallySign. (canReallySign): Use canSign(). (operator<<): Use canSign(). -- The workaround in canSign was added 19 years ago and canReallySign, the workaround for the workaround, was added 13 years ago. Time to get rid of those workarounds for a bug in gpgme which has been fixed long ago and which cause bugs for any unsuspecting user of Key::canSign(). GnuPG-bug-id: 6456
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r--lang/cpp/src/key.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h
index 787cb43e..9e827f63 100644
--- a/lang/cpp/src/key.h
+++ b/lang/cpp/src/key.h
@@ -110,16 +110,8 @@ public:
bool isBad() const;
bool canEncrypt() const;
- /*!
- This function contains a workaround for old gpgme's: all secret
- OpenPGP keys canSign() == true, which canReallySign() doesn't
- have. I don't have time to find what breaks when I remove this
- workaround, but since Kleopatra merges secret into public keys,
- the workaround is not necessary there (and actively harms), I've
- added a new function instead.
- */
bool canSign() const;
- bool canReallySign() const;
+ GPGMEPP_DEPRECATED bool canReallySign() const;
bool canCertify() const;
bool canAuthenticate() const;
bool isQualified() const;