Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Kleopatra
Commits
594c4212
Commit
594c4212
authored
Nov 06, 2020
by
Ingo Klöcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use uidhash only if it's available
parent
27bfea40
Pipeline
#39777
failed with stage
in 11 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
src/dialogs/revokecertificationwidget.cpp
src/dialogs/revokecertificationwidget.cpp
+7
-0
No files found.
src/dialogs/revokecertificationwidget.cpp
View file @
594c4212
...
...
@@ -30,6 +30,11 @@
#include "kleopatra_debug.h"
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E00 // 1.14.0
# define GPGME_HAS_UIDHASH
#endif
using
namespace
Kleo
;
namespace
{
...
...
@@ -70,9 +75,11 @@ bool CertificationKeyFilter::matches(const GpgME::Key &key, Kleo::KeyFilter::Mat
static
bool
uidsAreEqual
(
const
GpgME
::
UserID
&
lhs
,
const
GpgME
::
UserID
&
rhs
)
{
// use uidhash if available
#ifdef GPGME_HAS_UIDHASH
if
(
lhs
.
uidhash
()
&&
rhs
.
uidhash
())
{
return
strcmp
(
lhs
.
uidhash
(),
rhs
.
uidhash
())
==
0
;
}
#endif
// compare actual user ID string and primary key; this is not unique, but it's all we can do if uidhash is missing
return
qstrcmp
(
lhs
.
id
(),
rhs
.
id
())
==
0
&&
qstrcmp
(
lhs
.
parent
().
primaryFingerprint
(),
rhs
.
parent
().
primaryFingerprint
())
==
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment