Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kleopatra
Commits
b4f5f2f4
Commit
b4f5f2f4
authored
Dec 15, 2021
by
Ingo Klöcker
Committed by
Ingo Klöcker
Dec 17, 2021
Browse files
Require GpgME version 1.15.0
parent
f98cbbb7
Pipeline
#111492
passed with stage
in 2 minutes and 43 seconds
Changes
7
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
b4f5f2f4
...
...
@@ -34,7 +34,7 @@ set(KF5_MIN_VERSION "5.89.0")
set
(
KMIME_VERSION
"5.19.40"
)
set
(
LIBKLEO_VERSION
"5.19.46"
)
set
(
QT_REQUIRED_VERSION
"5.15.2"
)
set
(
GPGME_REQUIRED_VERSION
"1.1
4
.0"
)
set
(
GPGME_REQUIRED_VERSION
"1.1
5
.0"
)
set
(
BOOST_REQUIRED_VERSION
"1.58"
)
if
(
WIN32
)
...
...
src/CMakeLists.txt
View file @
b4f5f2f4
...
...
@@ -69,14 +69,6 @@ endif()
ki18n_wrap_ui
(
_kleopatra_uiserver_SRCS crypto/gui/signingcertificateselectionwidget.ui
)
if
(
"
${
Gpgmepp_VERSION
}
"
VERSION_GREATER_EQUAL
"1.14.1"
)
set
(
_kleopatra_deviceinfowatcher_files
smartcard/deviceinfowatcher.cpp
)
else
()
set
(
_kleopatra_deviceinfowatcher_files
)
endif
()
set
(
_kleopatra_SRCS
utils/gui-helper.cpp
utils/filedialog.cpp
...
...
@@ -285,8 +277,7 @@ set(_kleopatra_SRCS
smartcard/p15card.cpp
smartcard/keypairinfo.cpp
smartcard/utils.cpp
${
_kleopatra_deviceinfowatcher_files
}
smartcard/deviceinfowatcher.cpp
accessibility/accessiblerichtextlabel.cpp
accessibility/accessiblewidgetfactory.cpp
...
...
src/commands/changeexpirycommand.cpp
View file @
b4f5f2f4
...
...
@@ -29,11 +29,6 @@
#include "kleopatra_debug.h"
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E01 // 1.14.1
# define CHANGEEXPIRYJOB_SUPPORTS_SUBKEYS
#endif
using
namespace
Kleo
;
using
namespace
Kleo
::
Commands
;
using
namespace
Kleo
::
Dialogs
;
...
...
@@ -133,16 +128,12 @@ void ChangeExpiryCommand::Private::slotDialogAccepted()
}
#endif
#ifdef CHANGEEXPIRYJOB_SUPPORTS_SUBKEYS
std
::
vector
<
Subkey
>
subkeys
;
if
(
!
subkey
.
isNull
()
&&
subkey
.
keyID
()
!=
key
.
keyID
())
{
// ignore the primary subkey
subkeys
.
push_back
(
subkey
);
}
if
(
const
Error
err
=
job
->
start
(
key
,
expiry
,
subkeys
))
{
#else
if
(
const
Error
err
=
job
->
start
(
key
,
expiry
))
{
#endif
showErrorDialog
(
err
);
finished
();
}
...
...
src/commands/revokecertificationcommand.cpp
View file @
b4f5f2f4
...
...
@@ -29,11 +29,6 @@
#include "kleopatra_debug.h"
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E01 // 1.14.1
# define GPGME_HAS_REVSIG
#endif
using
namespace
Kleo
;
using
namespace
Kleo
::
Commands
;
using
namespace
GpgME
;
...
...
@@ -108,9 +103,7 @@ void RevokeCertificationCommand::Private::slotDialogAccepted()
{
createJob
();
#ifdef GPGME_HAS_REVSIG
job
->
startRevokeSignature
(
certificationTarget
,
dialog
->
selectedCertificationKey
(),
dialog
->
selectedUserIDs
());
#endif
}
void
RevokeCertificationCommand
::
Private
::
slotDialogRejected
()
...
...
@@ -206,11 +199,7 @@ RevokeCertificationCommand::~RevokeCertificationCommand()
// static
bool
RevokeCertificationCommand
::
isSupported
()
{
#ifdef GPGME_HAS_REVSIG
return
engineInfo
(
GpgEngine
).
engineVersion
()
>=
"2.2.24"
;
#else
return
false
;
#endif
}
void
RevokeCertificationCommand
::
doStart
()
...
...
src/dialogs/certificatedetailswidget.cpp
View file @
b4f5f2f4
...
...
@@ -37,6 +37,7 @@
#include <gpgme++/keylistresult.h>
#include <gpgme++/tofuinfo.h>
#include <QGpgME/Debug>
#include <QGpgME/Protocol>
#include <QGpgME/KeyListJob>
...
...
@@ -54,12 +55,6 @@
#include <set>
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10F00 // 1.15.0
# define GPGME_HAS_WITH_SECRET
# include <QGpgME/Debug>
#endif
#define HIDE_ROW(row) \
ui.row->setVisible(false); \
ui.row##Lbl->setVisible(false);
...
...
@@ -906,21 +901,15 @@ void CertificateDetailsWidget::setKey(const GpgME::Key &key)
auto
ctx
=
QGpgME
::
Job
::
context
(
job
);
ctx
->
addKeyListMode
(
GpgME
::
WithTofu
);
ctx
->
addKeyListMode
(
GpgME
::
SignatureNotations
);
#ifdef GPGME_HAS_WITH_SECRET
if
(
key
.
hasSecret
())
{
ctx
->
addKeyListMode
(
GpgME
::
WithSecret
);
}
#endif
// Windows QGpgME new style connect problem makes this necessary.
connect
(
job
,
SIGNAL
(
result
(
GpgME
::
KeyListResult
,
std
::
vector
<
GpgME
::
Key
>
,
QString
,
GpgME
::
Error
)),
this
,
SLOT
(
keyListDone
(
GpgME
::
KeyListResult
,
std
::
vector
<
GpgME
::
Key
>
,
QString
,
GpgME
::
Error
)));
#ifdef GPGME_HAS_WITH_SECRET
job
->
start
(
QStringList
()
<<
QLatin1String
(
key
.
primaryFingerprint
()));
#else
job
->
start
(
QStringList
()
<<
QLatin1String
(
key
.
primaryFingerprint
()),
key
.
hasSecret
());
#endif
}
GpgME
::
Key
CertificateDetailsWidget
::
key
()
const
...
...
src/dialogs/subkeyswidget.cpp
View file @
b4f5f2f4
...
...
@@ -24,11 +24,6 @@
#include <QTreeWidgetItem>
#include <QMenu>
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E01 // 1.14.1
# define CHANGEEXPIRYJOB_SUPPORTS_SUBKEYS
#endif
#include <Libkleo/Formatting>
Q_DECLARE_METATYPE
(
GpgME
::
Subkey
)
...
...
@@ -68,7 +63,6 @@ void SubKeysWidget::Private::tableContextMenuRequested(const QPoint &p)
bool
hasActions
=
false
;
#ifdef CHANGEEXPIRYJOB_SUPPORTS_SUBKEYS
if
(
subkey
.
parent
().
protocol
()
==
GpgME
::
OpenPGP
&&
subkey
.
parent
().
hasSecret
())
{
hasActions
=
true
;
menu
->
addAction
(
i18n
(
"Change Expiry Date..."
),
q
,
...
...
@@ -87,7 +81,6 @@ void SubKeysWidget::Private::tableContextMenuRequested(const QPoint &p)
}
);
}
#endif // CHANGEEXPIRYJOB_SUPPORTS_SUBKEYS
if
(
subkey
.
parent
().
protocol
()
==
GpgME
::
OpenPGP
&&
subkey
.
canAuthenticate
())
{
hasActions
=
true
;
...
...
src/smartcard/readerstatus.cpp
View file @
b4f5f2f4
...
...
@@ -11,25 +11,15 @@
#include <config-kleopatra.h>
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E01 // 1.14.1
# define QGPGME_HAS_DEBUG
# define GPGME_SUPPORTS_API_FOR_DEVICEINFOWATCHER
#endif
#include "readerstatus.h"
#ifdef GPGME_SUPPORTS_API_FOR_DEVICEINFOWATCHER
# include "deviceinfowatcher.h"
#endif
#include "deviceinfowatcher.h"
#include <Libkleo/Assuan>
#include <Libkleo/GnuPG>
#include <Libkleo/FileSystemWatcher>
#ifdef QGPGME_HAS_DEBUG
# include <QGpgME/Debug>
#endif
#include <QGpgME/Debug>
#include <gpgme++/context.h>
#include <gpgme++/defaultassuantransaction.h>
...
...
@@ -93,16 +83,6 @@ static QDebug operator<<(QDebug s, const std::string &string)
return
s
<<
QString
::
fromStdString
(
string
);
}
#ifndef QGPGME_HAS_DEBUG
static
QDebug
operator
<<
(
QDebug
s
,
const
GpgME
::
Error
&
err
)
{
const
bool
oldSetting
=
s
.
autoInsertSpaces
();
s
.
nospace
()
<<
err
.
asString
()
<<
" (code: "
<<
err
.
code
()
<<
", source: "
<<
err
.
source
()
<<
")"
;
s
.
setAutoInsertSpaces
(
oldSetting
);
return
s
.
maybeSpace
();
}
#endif
static
QDebug
operator
<<
(
QDebug
s
,
const
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>
>
&
v
)
{
using
pair
=
std
::
pair
<
std
::
string
,
std
::
string
>
;
...
...
@@ -875,13 +855,10 @@ public:
connect
(
this
,
&::
ReaderStatusThread
::
anyCardCanLearnKeysChanged
,
q
,
&
ReaderStatus
::
anyCardCanLearnKeysChanged
);
#ifdef GPGME_SUPPORTS_API_FOR_DEVICEINFOWATCHER
if
(
DeviceInfoWatcher
::
isSupported
())
{
qCDebug
(
KLEOPATRA_LOG
)
<<
"ReaderStatus::Private: Using new DeviceInfoWatcher"
;
connect
(
&
devInfoWatcher
,
&
DeviceInfoWatcher
::
statusChanged
,
this
,
&::
ReaderStatusThread
::
deviceStatusChanged
);
}
else
#endif
{
}
else
{
qCDebug
(
KLEOPATRA_LOG
)
<<
"ReaderStatus::Private: Using deprecated FileSystemWatcher"
;
watcher
.
whitelistFiles
(
QStringList
(
QStringLiteral
(
"reader_*.status"
)));
...
...
@@ -918,9 +895,7 @@ private:
private:
FileSystemWatcher
watcher
;
#ifdef GPGME_SUPPORTS_API_FOR_DEVICEINFOWATCHER
DeviceInfoWatcher
devInfoWatcher
;
#endif
};
ReaderStatus
::
ReaderStatus
(
QObject
*
parent
)
...
...
@@ -940,11 +915,9 @@ ReaderStatus::~ReaderStatus()
void
ReaderStatus
::
startMonitoring
()
{
d
->
start
();
#ifdef GPGME_SUPPORTS_API_FOR_DEVICEINFOWATCHER
if
(
DeviceInfoWatcher
::
isSupported
())
{
d
->
devInfoWatcher
.
start
();
}
#endif
}
// static
...
...
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