diff --git a/CMakeLists.txt b/CMakeLists.txt index e5dca478d..d7aa3a64a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,257 +1,257 @@ # SPDX-FileCopyrightText: none # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16 FATAL_ERROR) set(RELEASE_SERVICE_VERSION_MAJOR "23") set(RELEASE_SERVICE_VERSION_MINOR "03") set(RELEASE_SERVICE_VERSION_MICRO "70") # The RELEASE_SERVICE_VERSION is used by Gpg4win to add the Gpg4win version if (NOT RELEASE_SERVICE_VERSION) set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") endif() if(RELEASE_SERVICE_VERSION_MICRO LESS 10) set(KDE_APPLICATIONS_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}0${RELEASE_SERVICE_VERSION_MICRO}") else() set(KDE_APPLICATIONS_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}") endif() set(KLEOPATRA_VERSION_MAJOR "3") set(KLEOPATRA_VERSION_MINOR "1") set(KLEOPATRA_VERSION_MICRO "26") set(kleopatra_version "${KLEOPATRA_VERSION_MAJOR}.${KLEOPATRA_VERSION_MINOR}.${KLEOPATRA_VERSION_MICRO}.${KDE_APPLICATIONS_COMPACT_VERSION}") # The following is for Windows set(kleopatra_version_win "${KLEOPATRA_VERSION_MAJOR}.${KLEOPATRA_VERSION_MINOR}.${KLEOPATRA_VERSION_MICRO}") set(kleopatra_fileversion_win "${KLEOPATRA_VERSION_MAJOR},${KLEOPATRA_VERSION_MINOR},${KLEOPATRA_VERSION_MICRO},0") if (NOT KLEOPATRA_DISTRIBUTION_TEXT) # This is only used on Windows for the file attributes of Kleopatra set(KLEOPATRA_DISTRIBUTION_TEXT "KDE") endif() project(kleopatra VERSION ${kleopatra_version}) option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF) # Standalone build. Find / include everything necessary. set(KF5_MIN_VERSION "5.101.0") set(KIDENTITYMANAGEMENT_VERSION "5.22.40") set(KMAILTRANSPORT_VERSION "5.22.40") set(KMIME_VERSION "5.22.40") -set(LIBKLEO_VERSION "5.22.44") +set(LIBKLEO_VERSION "5.22.45") set(QT_REQUIRED_VERSION "5.15.2") if (QT_MAJOR_VERSION STREQUAL "6") set(QT_REQUIRED_VERSION "6.4.0") endif() set(GPGME_REQUIRED_VERSION "1.16.0") set(LIBASSUAN_REQUIRED_VERSION "2.4.2") set(GPG_ERROR_REQUIRED_VERSION "1.36") if (WIN32) set(KF5_WANT_VERSION "5.70.0") set(KMIME_WANT_VERSION "5.12.0") else () set(KF5_WANT_VERSION ${KF5_MIN_VERSION}) set(KMIME_WANT_VERSION ${KMIME_VERSION}) endif () set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(ECM ${KF5_WANT_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMAddTests) include(GenerateExportHeader) include(ECMGenerateHeaders) include(FeatureSummary) include(CheckFunctionExists) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMAddAppIcon) include(ECMQtDeclareLoggingCategory) include(ECMDeprecationSettings) include(KDEClangFormat) # Find KF5 packages find_package(KF5WidgetsAddons ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5ConfigWidgets ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5CoreAddons ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5Codecs ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5Config ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5I18n ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5IconThemes ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5ItemModels ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5XmlGui ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5WindowSystem ${KF5_WANT_VERSION} CONFIG REQUIRED) find_package(KF5DocTools ${KF5_WANT_VERSION} CONFIG) find_package(KF5Crash ${KF5_WANT_VERSION} REQUIRED) set_package_properties(KF5DocTools PROPERTIES DESCRIPTION "Documentation tools" PURPOSE "Required to generate Kleopatra documentation." TYPE OPTIONAL) # Optional packages if (WIN32) # Only a replacement available for Windows so this # is required on other platforms. find_package(KF5DBusAddons ${KF5_WANT_VERSION} CONFIG) set_package_properties(KF5DBusAddons PROPERTIES DESCRIPTION "Support library to work with DBus" PURPOSE "DBus session integration" URL "https://inqlude.org/libraries/kdbusaddons.html" TYPE OPTIONAL) else() find_package(KF5DBusAddons ${KF5_WANT_VERSION} CONFIG REQUIRED) set(_kleopatra_dbusaddons_libs KF5::DBusAddons) endif() set(HAVE_QDBUS ${Qt${QT_MAJOR_VERSION}DBus_FOUND}) find_package(Gpgmepp ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED) if (QT_MAJOR_VERSION STREQUAL "6") find_package(QGpgmeQt6 ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED) else() find_package(QGpgme ${GPGME_REQUIRED_VERSION} CONFIG REQUIRED) endif() if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.17.0") set(QGPGME_SUPPORTS_CHANGING_EXPIRATION_OF_COMPLETE_KEY 1) set(QGPGME_CRYPTOCONFIGENTRY_HAS_DEFAULT_VALUE 1) set(QGPGME_SUPPORTS_WKDLOOKUP 1) set(QGPGME_SUPPORTS_IMPORT_WITH_FILTER 1) set(QGPGME_SUPPORTS_IMPORT_WITH_KEY_ORIGIN 1) set(QGPGME_SUPPORTS_SECRET_KEY_EXPORT 1) set(QGPGME_SUPPORTS_SECRET_SUBKEY_EXPORT 1) set(QGPGME_SUPPORTS_RECEIVING_KEYS_BY_KEY_ID 1) endif() if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.18.0") set(QGPGME_SUPPORTS_KEY_REVOCATION 1) set(QGPGME_SUPPORTS_KEY_REFRESH 1) set(QGPGME_SUPPORTS_SET_FILENAME 1) set(QGPGME_SUPPORTS_SET_PRIMARY_UID 1) endif() if (Gpgmepp_VERSION VERSION_GREATER_EQUAL "1.18.1") set(GPGMEPP_SUPPORTS_SET_CURVE 1) set(QGPGME_SUPPORTS_DEFERRED_IMPORT_JOB 1) endif() # Kdepimlibs packages find_package(KF5Libkleo ${LIBKLEO_VERSION} CONFIG REQUIRED) find_package(KF5Mime ${KMIME_WANT_VERSION} CONFIG REQUIRED) find_package(KF5IdentityManagement ${KIDENTITYMANAGEMENT_VERSION} CONFIG) find_package(KF5MailTransport ${KMAILTRANSPORT_VERSION} CONFIG) find_package(KF5MailTransportAkonadi ${KMAILTRANSPORT_VERSION} CONFIG) find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network PrintSupport) find_package(LibAssuan ${LIBASSUAN_REQUIRED_VERSION} REQUIRED) set_package_properties(LibAssuan PROPERTIES TYPE REQUIRED PURPOSE "Needed for Kleopatra to act as the GnuPG UI Server" ) find_package(LibGpgError ${GPG_ERROR_REQUIRED_VERSION} REQUIRED) set_package_properties(LibGpgError PROPERTIES TYPE REQUIRED ) set(kleopatra_release FALSE) if(NOT kleopatra_release) find_package(Git) if(GIT_FOUND) execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE rc ERROR_QUIET) if(rc EQUAL 0) execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --oneline --format=%h ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE Kleopatra_WC_REVISION) string(REGEX REPLACE "\n" "" Kleopatra_WC_REVISION "${Kleopatra_WC_REVISION}") execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --oneline --format=%cI ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE Kleopatra_WC_LAST_CHANGED_DATE) string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+)T([0-9]+):([0-9]+):([0-9]+).*$" "\\1\\2\\3T\\4\\5\\6" Kleopatra_WC_LAST_CHANGED_DATE "${Kleopatra_WC_LAST_CHANGED_DATE}") set(kleopatra_version "${kleopatra_version}+git${Kleopatra_WC_LAST_CHANGED_DATE}~${Kleopatra_WC_REVISION}") endif() endif() endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version-kleopatra.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version-kleopatra.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-kleopatra.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kleopatra.h) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) if (WIN32) # On Windows, we need to use stuff deprecated since Qt 5.11, e.g. from QDesktopWidget ecm_set_disabled_deprecation_versions(QT 5.10.0 KF 5.102.0) else () ecm_set_disabled_deprecation_versions(QT 5.15.0 KF 5.102.0) endif () if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-braces -Wno-parentheses -Wno-ignored-qualifiers") endif() if(MINGW) # we do not care about different signedness of passed pointer arguments add_compile_options($<$:-Wno-pointer-sign>) endif() add_definitions(-DQT_NO_EMIT) remove_definitions(-DQT_NO_FOREACH) # Disable the use of QStringBuilder for operator+ to prevent crashes when # returning the result of concatenating string temporaries in lambdas. We do # this for example in some std::transform expressions. # This is a known issue: https://bugreports.qt.io/browse/QTBUG-47066 # Alternatively, one would always have to remember to force the lambdas to # return a QString instead of QStringBuilder, but that's just too easy to # forget and, unfortunately, the compiler doesn't issue a warning if one forgets # this. So, it's just too dangerous. # One can still use QStringBuilder explicitly with the operator% if necessary. remove_definitions(-DQT_USE_FAST_OPERATOR_PLUS) remove_definitions(-DQT_USE_QSTRINGBUILDER) kde_enable_exceptions() option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF) set(COMPILE_WITH_UNITY_CMAKE_SUPPORT OFF) if (USE_UNITY_CMAKE_SUPPORT) set(COMPILE_WITH_UNITY_CMAKE_SUPPORT ON) endif() add_subdirectory(pics) add_subdirectory(src) if(BUILD_TESTING) add_subdirectory(tests) add_subdirectory(autotests) endif() ecm_qt_install_logging_categories( EXPORT KLEOPATRA FILE kleopatra.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} ) ki18n_install(po) if(KF5DocTools_FOUND) kdoctools_install(po) add_subdirectory(doc) endif() feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) diff --git a/src/view/openpgpkeycardwidget.cpp b/src/view/openpgpkeycardwidget.cpp index ceee2d592..20d19f356 100644 --- a/src/view/openpgpkeycardwidget.cpp +++ b/src/view/openpgpkeycardwidget.cpp @@ -1,266 +1,267 @@ /* view/openpgpkeycardwidget.cpp This file is part of Kleopatra, the KDE keymanager SPDX-FileCopyrightText: 2021, 2022 g10 Code GmbH SPDX-FileContributor: Ingo Klöcker SPDX-License-Identifier: GPL-2.0-or-later */ #include "openpgpkeycardwidget.h" #include "commands/detailscommand.h" #include "smartcard/card.h" #include "smartcard/keypairinfo.h" #include "smartcard/openpgpcard.h" +#include #include #include #include #include #include #include #include #include using namespace Kleo; using namespace SmartCard; namespace { struct KeyWidgets { std::string cardKeyRef; - std::string keyGrip; std::string keyFingerprint; + KeyPairInfo keyInfo; QLabel *keyTitleLabel = nullptr; QLabel *keyInfoLabel = nullptr; QPushButton *showCertificateDetailsButton = nullptr; QPushButton *generateButton = nullptr; QPushButton *createCSRButton = nullptr; }; KeyWidgets createKeyWidgets(const KeyPairInfo &keyInfo, QWidget *parent) { KeyWidgets keyWidgets; keyWidgets.keyTitleLabel = new QLabel{OpenPGPCard::keyDisplayName(keyInfo.keyRef), parent}; keyWidgets.keyInfoLabel = new QLabel{parent}; keyWidgets.keyInfoLabel->setTextInteractionFlags(Qt::TextBrowserInteraction | Qt::TextSelectableByKeyboard); keyWidgets.showCertificateDetailsButton = new QPushButton{i18nc("@action:button", "Show Details"), parent}; keyWidgets.showCertificateDetailsButton->setToolTip(i18nc("@action:tooltip", "Show detailed information about this key")); keyWidgets.showCertificateDetailsButton->setEnabled(false); keyWidgets.generateButton = new QPushButton{i18nc("@action:button", "Generate Key"), parent}; keyWidgets.generateButton->setEnabled(false); if (keyInfo.canCertify() || keyInfo.canSign() || keyInfo.canAuthenticate()) { keyWidgets.createCSRButton = new QPushButton{i18nc("@action:button", "Create CSR"), parent}; keyWidgets.createCSRButton->setToolTip(i18nc("@info:tooltip", "Create a certificate signing request for this key")); keyWidgets.createCSRButton->setEnabled(false); } return keyWidgets; } } class OpenPGPKeyCardWidget::Private { public: explicit Private(OpenPGPKeyCardWidget *q); ~Private() = default; void setAllowedActions(Actions actions); void update(const Card *card = nullptr); private: void updateCachedValues(const std::string &openPGPKeyRef, const std::string &cardKeyRef, const Card *card); void updateKeyWidgets(const std::string &openPGPKeyRef); void showCertificateDetails(const std::string &openPGPKeyRef); private: OpenPGPKeyCardWidget *const q; Actions mAllowedActions = AllActions; std::map mKeyWidgets; }; OpenPGPKeyCardWidget::Private::Private(OpenPGPKeyCardWidget *q) : q{q} { auto grid = new QGridLayout{q}; grid->setContentsMargins(0, 0, 0, 0); for (const auto &keyInfo : OpenPGPCard::supportedKeys()) { const KeyWidgets keyWidgets = createKeyWidgets(keyInfo, q); const std::string keyRef = keyInfo.keyRef; connect(keyWidgets.showCertificateDetailsButton, &QPushButton::clicked, q, [this, keyRef] () { showCertificateDetails(keyRef); }); connect(keyWidgets.generateButton, &QPushButton::clicked, q, [q, keyRef] () { Q_EMIT q->generateKeyRequested(keyRef); }); if (keyWidgets.createCSRButton) { connect(keyWidgets.createCSRButton, &QPushButton::clicked, q, [q, keyRef] () { Q_EMIT q->createCSRRequested(keyRef); }); } const int row = grid->rowCount(); grid->addWidget(keyWidgets.keyTitleLabel, row, 0, Qt::AlignTop); grid->addWidget(keyWidgets.keyInfoLabel, row, 1, Qt::AlignTop); auto buttons = new QHBoxLayout; buttons->addWidget(keyWidgets.showCertificateDetailsButton); buttons->addWidget(keyWidgets.generateButton); if (keyWidgets.createCSRButton) { buttons->addWidget(keyWidgets.createCSRButton); } buttons->addStretch(1); grid->addLayout(buttons, row, 2, Qt::AlignTop); mKeyWidgets.insert({keyInfo.keyRef, keyWidgets}); } grid->setColumnStretch(grid->columnCount(), 1); } void OpenPGPKeyCardWidget::Private::setAllowedActions(Actions actions) { mAllowedActions = actions; update(); } void OpenPGPKeyCardWidget::Private::update(const Card *card) { if (card) { updateCachedValues(OpenPGPCard::pgpSigKeyRef(), card->signingKeyRef(), card); updateCachedValues(OpenPGPCard::pgpEncKeyRef(), card->encryptionKeyRef(), card); updateCachedValues(OpenPGPCard::pgpAuthKeyRef(), card->authenticationKeyRef(), card); } updateKeyWidgets(OpenPGPCard::pgpSigKeyRef()); updateKeyWidgets(OpenPGPCard::pgpEncKeyRef()); updateKeyWidgets(OpenPGPCard::pgpAuthKeyRef()); } void OpenPGPKeyCardWidget::Private::updateCachedValues(const std::string &openPGPKeyRef, const std::string &cardKeyRef, const Card *card) { KeyWidgets &widgets = mKeyWidgets.at(openPGPKeyRef); widgets.cardKeyRef = cardKeyRef; - widgets.keyGrip = card->keyInfo(cardKeyRef).grip; widgets.keyFingerprint = card->keyFingerprint(openPGPKeyRef); + widgets.keyInfo = card->keyInfo(cardKeyRef); } void OpenPGPKeyCardWidget::Private::updateKeyWidgets(const std::string &openPGPKeyRef) { const KeyWidgets &widgets = mKeyWidgets.at(openPGPKeyRef); const auto cardSupportsKey = !widgets.cardKeyRef.empty(); widgets.keyTitleLabel->setVisible(cardSupportsKey); widgets.keyInfoLabel->setVisible(cardSupportsKey); widgets.showCertificateDetailsButton->setVisible(cardSupportsKey); widgets.generateButton->setVisible(cardSupportsKey && (mAllowedActions & Action::GenerateKey)); if (widgets.createCSRButton) { widgets.createCSRButton->setVisible(cardSupportsKey && (mAllowedActions & Action::CreateCSR)); } if (!cardSupportsKey) { return; } widgets.showCertificateDetailsButton->setEnabled(false); if (widgets.keyFingerprint.empty()) { widgets.keyInfoLabel->setTextFormat(Qt::RichText); widgets.keyInfoLabel->setText(i18nc("@info", "No key")); widgets.generateButton->setText(i18nc("@action:button", "Generate Key")); widgets.generateButton->setToolTip(i18nc("@info:tooltip", "Generate a key for this card slot")); if (widgets.createCSRButton) { widgets.createCSRButton->setEnabled(false); } } else { QStringList lines; if (widgets.keyFingerprint.size() >= 16) { const std::string keyid = widgets.keyFingerprint.substr(widgets.keyFingerprint.size() - 16); const auto subkeys = KeyCache::instance()->findSubkeysByKeyID({keyid}); if (subkeys.empty() || subkeys[0].isNull()) { widgets.keyInfoLabel->setTextFormat(Qt::RichText); lines.push_back(i18nc("@info", "Public key not found locally")); widgets.keyInfoLabel->setToolTip({}); } else { // force interpretation of text as plain text to avoid problems with HTML in user IDs widgets.keyInfoLabel->setTextFormat(Qt::PlainText); QStringList toolTips; toolTips.reserve(subkeys.size()); for (const auto &sub: subkeys) { // Yep you can have one subkey associated with multiple primary keys. const GpgME::Key key = sub.parent(); toolTips << Formatting::toolTip(key, Formatting::Validity | Formatting::ExpiryDates | Formatting::UserIDs | Formatting::Fingerprint); const auto uids = key.userIDs(); for (const auto &uid: uids) { lines.push_back(Formatting::prettyUserID(uid)); } } widgets.keyInfoLabel->setToolTip(toolTips.join(QLatin1String("
"))); widgets.showCertificateDetailsButton->setEnabled(true); } } else { widgets.keyInfoLabel->setTextFormat(Qt::RichText); lines.push_back(i18nc("@info", "Invalid fingerprint")); } const QString fingerprint = widgets.keyInfoLabel->textFormat() == Qt::RichText ? Formatting::prettyID(widgets.keyFingerprint.c_str()).replace(QLatin1Char(' '), QLatin1String(" ")) : Formatting::prettyID(widgets.keyFingerprint.c_str()); lines.insert(0, fingerprint); const auto lineSeparator = widgets.keyInfoLabel->textFormat() == Qt::PlainText ? QLatin1String("\n") : QLatin1String("
"); widgets.keyInfoLabel->setText(lines.join(lineSeparator)); widgets.generateButton->setText(i18nc("@action:button", "Regenerate Key")); widgets.generateButton->setToolTip(i18nc("@info:tooltip", "Generate a new key for this card slot replacing the existing key")); if (widgets.createCSRButton) { - widgets.createCSRButton->setEnabled(true); + widgets.createCSRButton->setEnabled(DeVSCompliance::algorithmIsCompliant(widgets.keyInfo.algorithm)); } } widgets.generateButton->setEnabled(!widgets.generateButton->isHidden()); } void OpenPGPKeyCardWidget::Private::showCertificateDetails(const std::string &openPGPKeyRef) { const KeyWidgets &widgets = mKeyWidgets.at(openPGPKeyRef); if (widgets.keyFingerprint.size() >= 16) { const std::string keyid = widgets.keyFingerprint.substr(widgets.keyFingerprint.size() - 16); const auto subkeys = KeyCache::instance()->findSubkeysByKeyID({keyid}); if (!subkeys.empty() && !subkeys[0].isNull()) { auto cmd = new Commands::DetailsCommand(subkeys[0].parent()); cmd->setParentWidget(q); cmd->start(); return; } } KMessageBox::error(q, i18nc("@info", "Sorry, I cannot find the key with fingerprint %1.", Formatting::prettyID(widgets.keyFingerprint.c_str()))); } OpenPGPKeyCardWidget::OpenPGPKeyCardWidget(QWidget *parent) : QWidget{parent} , d{std::make_unique(this)} { connect(KeyCache::instance().get(), &KeyCache::keysMayHaveChanged, this, [this]() { d->update(); }); } OpenPGPKeyCardWidget::~OpenPGPKeyCardWidget() = default; void OpenPGPKeyCardWidget::setAllowedActions(Actions actions) { d->setAllowedActions(actions); } void OpenPGPKeyCardWidget::update(const Card *card) { d->update(card); }