From 763d5f5d6a88ec938b8678ab597e1404af724553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Mon, 3 Feb 2025 10:49:25 +0100 Subject: cpp,qt: Remove C++ and Qt bindings * README: Update. * configure.ac: Remove checks, variables and file generations related to the C++/Qt bindings. Remove cpp and qt* from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove cpp and qt. * lang/cpp, lang/qt: Remove. * m4/ax_check_compile_flag.m4, m4/ax_cxx_compile_stdcxx.m4, m4/ax_gcc_func_attribute.m4, m4/pkg.m4, m4/qt5.m4, m4/qt6.m4: Remove. -- The C++ and Qt bindings have been moved to separate Git repositories: gpgmepp and gpgmeqt. GnuPG-bug-id: 7262 --- lang/cpp/src/GpgmeppConfig-w32.cmake.in.in | 99 - lang/cpp/src/GpgmeppConfig.cmake.in.in | 95 - lang/cpp/src/GpgmeppConfigVersion.cmake.in | 31 - lang/cpp/src/Makefile.am | 134 -- lang/cpp/src/callbacks.cpp | 155 -- lang/cpp/src/callbacks.h | 47 - lang/cpp/src/configuration.cpp | 788 -------- lang/cpp/src/configuration.h | 292 --- lang/cpp/src/context.cpp | 2138 -------------------- lang/cpp/src/context.h | 586 ------ lang/cpp/src/context_p.h | 88 - lang/cpp/src/context_vanilla.cpp | 39 - lang/cpp/src/data.cpp | 293 --- lang/cpp/src/data.h | 149 -- lang/cpp/src/data_p.h | 42 - lang/cpp/src/decryptionresult.cpp | 287 --- lang/cpp/src/decryptionresult.h | 143 -- lang/cpp/src/defaultassuantransaction.cpp | 82 - lang/cpp/src/defaultassuantransaction.h | 67 - lang/cpp/src/editinteractor.cpp | 436 ---- lang/cpp/src/editinteractor.h | 73 - lang/cpp/src/encryptionresult.cpp | 165 -- lang/cpp/src/encryptionresult.h | 117 -- lang/cpp/src/engineinfo.cpp | 94 - lang/cpp/src/engineinfo.h | 255 --- lang/cpp/src/error.h | 84 - lang/cpp/src/eventloopinteractor.cpp | 205 -- lang/cpp/src/eventloopinteractor.h | 158 -- lang/cpp/src/exception.cpp | 64 - lang/cpp/src/exception.h | 70 - lang/cpp/src/global.h | 244 --- .../cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 205 -- lang/cpp/src/gpgaddexistingsubkeyeditinteractor.h | 60 - lang/cpp/src/gpgadduserideditinteractor.cpp | 191 -- lang/cpp/src/gpgadduserideditinteractor.h | 69 - lang/cpp/src/gpgagentgetinfoassuantransaction.cpp | 123 -- lang/cpp/src/gpgagentgetinfoassuantransaction.h | 75 - lang/cpp/src/gpggencardkeyinteractor.cpp | 469 ----- lang/cpp/src/gpggencardkeyinteractor.h | 95 - lang/cpp/src/gpgmefw.h | 81 - lang/cpp/src/gpgmepp.pc.in | 13 - lang/cpp/src/gpgmepp_export.h | 74 - lang/cpp/src/gpgmepp_version.h.in | 31 - lang/cpp/src/gpgrevokekeyeditinteractor.cpp | 207 -- lang/cpp/src/gpgrevokekeyeditinteractor.h | 63 - lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp | 143 -- lang/cpp/src/gpgsetexpirytimeeditinteractor.h | 51 - lang/cpp/src/gpgsetownertrusteditinteractor.cpp | 153 -- lang/cpp/src/gpgsetownertrusteditinteractor.h | 52 - lang/cpp/src/gpgsignkeyeditinteractor.cpp | 395 ---- lang/cpp/src/gpgsignkeyeditinteractor.h | 77 - lang/cpp/src/importresult.cpp | 395 ---- lang/cpp/src/importresult.h | 152 -- lang/cpp/src/interfaces/assuantransaction.h | 51 - lang/cpp/src/interfaces/dataprovider.h | 55 - lang/cpp/src/interfaces/passphraseprovider.h | 42 - lang/cpp/src/interfaces/progressprovider.h | 42 - lang/cpp/src/interfaces/statusconsumer.h | 42 - lang/cpp/src/key.cpp | 1455 ------------- lang/cpp/src/key.h | 618 ------ lang/cpp/src/keygenerationresult.cpp | 98 - lang/cpp/src/keygenerationresult.h | 85 - lang/cpp/src/keylistresult.cpp | 113 -- lang/cpp/src/keylistresult.h | 84 - lang/cpp/src/notation.h | 87 - lang/cpp/src/result.h | 68 - lang/cpp/src/result_p.h | 45 - lang/cpp/src/scdgetinfoassuantransaction.cpp | 161 -- lang/cpp/src/scdgetinfoassuantransaction.h | 78 - lang/cpp/src/signingresult.cpp | 273 --- lang/cpp/src/signingresult.h | 167 -- lang/cpp/src/statusconsumerassuantransaction.cpp | 67 - lang/cpp/src/statusconsumerassuantransaction.h | 51 - lang/cpp/src/swdbresult.cpp | 232 --- lang/cpp/src/swdbresult.h | 130 -- lang/cpp/src/tofuinfo.cpp | 173 -- lang/cpp/src/tofuinfo.h | 124 -- lang/cpp/src/trustitem.cpp | 120 -- lang/cpp/src/trustitem.h | 83 - lang/cpp/src/util.cpp | 47 - lang/cpp/src/util.h | 214 -- lang/cpp/src/verificationresult.cpp | 642 ------ lang/cpp/src/verificationresult.h | 207 -- lang/cpp/src/vfsmountresult.cpp | 96 - lang/cpp/src/vfsmountresult.h | 77 - 85 files changed, 16521 deletions(-) delete mode 100644 lang/cpp/src/GpgmeppConfig-w32.cmake.in.in delete mode 100644 lang/cpp/src/GpgmeppConfig.cmake.in.in delete mode 100644 lang/cpp/src/GpgmeppConfigVersion.cmake.in delete mode 100644 lang/cpp/src/Makefile.am delete mode 100644 lang/cpp/src/callbacks.cpp delete mode 100644 lang/cpp/src/callbacks.h delete mode 100644 lang/cpp/src/configuration.cpp delete mode 100644 lang/cpp/src/configuration.h delete mode 100644 lang/cpp/src/context.cpp delete mode 100644 lang/cpp/src/context.h delete mode 100644 lang/cpp/src/context_p.h delete mode 100644 lang/cpp/src/context_vanilla.cpp delete mode 100644 lang/cpp/src/data.cpp delete mode 100644 lang/cpp/src/data.h delete mode 100644 lang/cpp/src/data_p.h delete mode 100644 lang/cpp/src/decryptionresult.cpp delete mode 100644 lang/cpp/src/decryptionresult.h delete mode 100644 lang/cpp/src/defaultassuantransaction.cpp delete mode 100644 lang/cpp/src/defaultassuantransaction.h delete mode 100644 lang/cpp/src/editinteractor.cpp delete mode 100644 lang/cpp/src/editinteractor.h delete mode 100644 lang/cpp/src/encryptionresult.cpp delete mode 100644 lang/cpp/src/encryptionresult.h delete mode 100644 lang/cpp/src/engineinfo.cpp delete mode 100644 lang/cpp/src/engineinfo.h delete mode 100644 lang/cpp/src/error.h delete mode 100644 lang/cpp/src/eventloopinteractor.cpp delete mode 100644 lang/cpp/src/eventloopinteractor.h delete mode 100644 lang/cpp/src/exception.cpp delete mode 100644 lang/cpp/src/exception.h delete mode 100644 lang/cpp/src/global.h delete mode 100644 lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp delete mode 100644 lang/cpp/src/gpgaddexistingsubkeyeditinteractor.h delete mode 100644 lang/cpp/src/gpgadduserideditinteractor.cpp delete mode 100644 lang/cpp/src/gpgadduserideditinteractor.h delete mode 100644 lang/cpp/src/gpgagentgetinfoassuantransaction.cpp delete mode 100644 lang/cpp/src/gpgagentgetinfoassuantransaction.h delete mode 100644 lang/cpp/src/gpggencardkeyinteractor.cpp delete mode 100644 lang/cpp/src/gpggencardkeyinteractor.h delete mode 100644 lang/cpp/src/gpgmefw.h delete mode 100644 lang/cpp/src/gpgmepp.pc.in delete mode 100644 lang/cpp/src/gpgmepp_export.h delete mode 100644 lang/cpp/src/gpgmepp_version.h.in delete mode 100644 lang/cpp/src/gpgrevokekeyeditinteractor.cpp delete mode 100644 lang/cpp/src/gpgrevokekeyeditinteractor.h delete mode 100644 lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp delete mode 100644 lang/cpp/src/gpgsetexpirytimeeditinteractor.h delete mode 100644 lang/cpp/src/gpgsetownertrusteditinteractor.cpp delete mode 100644 lang/cpp/src/gpgsetownertrusteditinteractor.h delete mode 100644 lang/cpp/src/gpgsignkeyeditinteractor.cpp delete mode 100644 lang/cpp/src/gpgsignkeyeditinteractor.h delete mode 100644 lang/cpp/src/importresult.cpp delete mode 100644 lang/cpp/src/importresult.h delete mode 100644 lang/cpp/src/interfaces/assuantransaction.h delete mode 100644 lang/cpp/src/interfaces/dataprovider.h delete mode 100644 lang/cpp/src/interfaces/passphraseprovider.h delete mode 100644 lang/cpp/src/interfaces/progressprovider.h delete mode 100644 lang/cpp/src/interfaces/statusconsumer.h delete mode 100644 lang/cpp/src/key.cpp delete mode 100644 lang/cpp/src/key.h delete mode 100644 lang/cpp/src/keygenerationresult.cpp delete mode 100644 lang/cpp/src/keygenerationresult.h delete mode 100644 lang/cpp/src/keylistresult.cpp delete mode 100644 lang/cpp/src/keylistresult.h delete mode 100644 lang/cpp/src/notation.h delete mode 100644 lang/cpp/src/result.h delete mode 100644 lang/cpp/src/result_p.h delete mode 100644 lang/cpp/src/scdgetinfoassuantransaction.cpp delete mode 100644 lang/cpp/src/scdgetinfoassuantransaction.h delete mode 100644 lang/cpp/src/signingresult.cpp delete mode 100644 lang/cpp/src/signingresult.h delete mode 100644 lang/cpp/src/statusconsumerassuantransaction.cpp delete mode 100644 lang/cpp/src/statusconsumerassuantransaction.h delete mode 100644 lang/cpp/src/swdbresult.cpp delete mode 100644 lang/cpp/src/swdbresult.h delete mode 100644 lang/cpp/src/tofuinfo.cpp delete mode 100644 lang/cpp/src/tofuinfo.h delete mode 100644 lang/cpp/src/trustitem.cpp delete mode 100644 lang/cpp/src/trustitem.h delete mode 100644 lang/cpp/src/util.cpp delete mode 100644 lang/cpp/src/util.h delete mode 100644 lang/cpp/src/verificationresult.cpp delete mode 100644 lang/cpp/src/verificationresult.h delete mode 100644 lang/cpp/src/vfsmountresult.cpp delete mode 100644 lang/cpp/src/vfsmountresult.h (limited to 'lang/cpp/src') diff --git a/lang/cpp/src/GpgmeppConfig-w32.cmake.in.in b/lang/cpp/src/GpgmeppConfig-w32.cmake.in.in deleted file mode 100644 index 51ada3b1..00000000 --- a/lang/cpp/src/GpgmeppConfig-w32.cmake.in.in +++ /dev/null @@ -1,99 +0,0 @@ -# CMake Config file for GPGMEPP. -# Copyright (C) 2016 Intevation GmbH -# -# This file is part of GPGMEPP. -# -# GPGME-CL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# GPGME-CL is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA - -# based on a generated file from cmake. -# Generated by CMake 3.0.2 - -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) - message(FATAL_ERROR "CMake >= 2.6.0 required") -endif() -cmake_policy(PUSH) -cmake_policy(VERSION 2.6) -#---------------------------------------------------------------- -# Generated CMake target import file. -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Protect against multiple inclusion, which would fail when already imported targets are added once more. -set(_targetsDefined) -set(_targetsNotDefined) -set(_expectedTargets) -foreach(_expectedTarget Gpgmepp) - list(APPEND _expectedTargets ${_expectedTarget}) - if(NOT TARGET ${_expectedTarget}) - list(APPEND _targetsNotDefined ${_expectedTarget}) - endif() - if(TARGET ${_expectedTarget}) - list(APPEND _targetsDefined ${_expectedTarget}) - endif() -endforeach() -if("${_targetsDefined}" STREQUAL "${_expectedTargets}") - set(CMAKE_IMPORT_FILE_VERSION) - cmake_policy(POP) - return() -endif() -if(NOT "${_targetsDefined}" STREQUAL "") - message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") -endif() -unset(_targetsDefined) -unset(_targetsNotDefined) -unset(_expectedTargets) - -# Create imported target Gpgmepp -add_library(Gpgmepp SHARED IMPORTED) - -set_target_properties(Gpgmepp PROPERTIES - IMPORTED_IMPLIB "@resolved_libdir@/libgpgmepp.dll.a" - INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" - INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.dll.a;@LIBASSUAN_LIBS@" - IMPORTED_LOCATION "@resolved_bindir@/libgpgmepp-6.dll" -) -list(APPEND _IMPORT_CHECK_TARGETS Gpgmepp ) -list(APPEND _IMPORT_CHECK_FILES_FOR_Gpgmepp "@resolved_libdir@/libgpgmepp.dll.a" "@resolved_bindir@/libgpgmepp-6.dll" ) - - -if(CMAKE_VERSION VERSION_LESS 2.8.12) - message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") -endif() - -# Loop over all imported files and verify that they actually exist -foreach(target ${_IMPORT_CHECK_TARGETS} ) - foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) - if(NOT EXISTS "${file}" ) - message(FATAL_ERROR "The imported target \"${target}\" references the file - \"${file}\" -but this file does not exist. Possible reasons include: -* The file was deleted, renamed, or moved to another location. -* An install or uninstall procedure did not complete successfully. -* The installation package was faulty and contained - \"${CMAKE_CURRENT_LIST_FILE}\" -but not all the files it references. -") - endif() - endforeach() - unset(_IMPORT_CHECK_FILES_FOR_${target}) -endforeach() -unset(_IMPORT_CHECK_TARGETS) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) -cmake_policy(POP) diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in deleted file mode 100644 index 8777623e..00000000 --- a/lang/cpp/src/GpgmeppConfig.cmake.in.in +++ /dev/null @@ -1,95 +0,0 @@ -# CMake Config file for GPGMEPP. -# Copyright (C) 2016 Intevation GmbH -# -# This file is part of GPGMEPP. -# -# GPGME-CL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# GPGME-CL is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA - -# based on a generated file from cmake. -# Generated by CMake 3.0.2 - -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) - message(FATAL_ERROR "CMake >= 2.6.0 required") -endif() -cmake_policy(PUSH) -cmake_policy(VERSION 2.6) -#---------------------------------------------------------------- -# Generated CMake target import file. -#---------------------------------------------------------------- - -# Commands may need to know the format version. -set(CMAKE_IMPORT_FILE_VERSION 1) - -# Protect against multiple inclusion, which would fail when already imported targets are added once more. -set(_targetsDefined) -set(_targetsNotDefined) -set(_expectedTargets) -foreach(_expectedTarget Gpgmepp) - list(APPEND _expectedTargets ${_expectedTarget}) - if(NOT TARGET ${_expectedTarget}) - list(APPEND _targetsNotDefined ${_expectedTarget}) - endif() - if(TARGET ${_expectedTarget}) - list(APPEND _targetsDefined ${_expectedTarget}) - endif() -endforeach() -if("${_targetsDefined}" STREQUAL "${_expectedTargets}") - set(CMAKE_IMPORT_FILE_VERSION) - cmake_policy(POP) - return() -endif() -if(NOT "${_targetsDefined}" STREQUAL "") - message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") -endif() -unset(_targetsDefined) -unset(_targetsNotDefined) -unset(_expectedTargets) - -# Create imported target Gpgmepp -add_library(Gpgmepp SHARED IMPORTED) - -set_target_properties(Gpgmepp PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" - INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" - IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@" -) - -if(CMAKE_VERSION VERSION_LESS 2.8.12) - message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") -endif() - -# Loop over all imported files and verify that they actually exist -foreach(target ${_IMPORT_CHECK_TARGETS} ) - foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) - if(NOT EXISTS "${file}" ) - message(FATAL_ERROR "The imported target \"${target}\" references the file - \"${file}\" -but this file does not exist. Possible reasons include: -* The file was deleted, renamed, or moved to another location. -* An install or uninstall procedure did not complete successfully. -* The installation package was faulty and contained - \"${CMAKE_CURRENT_LIST_FILE}\" -but not all the files it references. -") - endif() - endforeach() - unset(_IMPORT_CHECK_FILES_FOR_${target}) -endforeach() -unset(_IMPORT_CHECK_TARGETS) - -# Commands beyond this point should not need to know the version. -set(CMAKE_IMPORT_FILE_VERSION) -cmake_policy(POP) diff --git a/lang/cpp/src/GpgmeppConfigVersion.cmake.in b/lang/cpp/src/GpgmeppConfigVersion.cmake.in deleted file mode 100644 index 259bddd5..00000000 --- a/lang/cpp/src/GpgmeppConfigVersion.cmake.in +++ /dev/null @@ -1,31 +0,0 @@ -# CMake Version file for GPGMEPP. -# Copyright (C) 2016 Intevation GmbH -# -# This file is part of GPGMEPP. -# -# GPGME-CL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# GPGME-CL is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA - -# based on a generated file from cmake. -set(PACKAGE_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_MICRO@") - -if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() diff --git a/lang/cpp/src/Makefile.am b/lang/cpp/src/Makefile.am deleted file mode 100644 index db363226..00000000 --- a/lang/cpp/src/Makefile.am +++ /dev/null @@ -1,134 +0,0 @@ -# Makefile.am for GPGMEPP. -# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik -# Software engineering by Intevation GmbH -# -# This file is part of GPGMEPP. -# -# GPGME-CL is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# GPGME-CL is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gpgmepp.pc - -EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \ - gpgmepp_version.h.in GpgmeppConfig-w32.cmake.in.in \ - gpgmepp.pc.in - -lib_LTLIBRARIES = libgpgmepp.la - -main_sources = \ - exception.cpp context.cpp key.cpp trustitem.cpp data.cpp callbacks.cpp \ - eventloopinteractor.cpp editinteractor.cpp \ - keylistresult.cpp keygenerationresult.cpp importresult.cpp \ - decryptionresult.cpp verificationresult.cpp \ - signingresult.cpp encryptionresult.cpp \ - engineinfo.cpp gpgsetexpirytimeeditinteractor.cpp \ - gpgsetownertrusteditinteractor.cpp gpgsignkeyeditinteractor.cpp \ - gpgadduserideditinteractor.cpp gpggencardkeyinteractor.cpp \ - gpgaddexistingsubkeyeditinteractor.cpp \ - gpgrevokekeyeditinteractor.cpp \ - defaultassuantransaction.cpp \ - scdgetinfoassuantransaction.cpp gpgagentgetinfoassuantransaction.cpp \ - statusconsumerassuantransaction.cpp \ - vfsmountresult.cpp configuration.cpp tofuinfo.cpp swdbresult.cpp \ - util.cpp - -gpgmepp_headers = \ - configuration.h context.h data.h decryptionresult.h \ - defaultassuantransaction.h editinteractor.h encryptionresult.h \ - engineinfo.h error.h eventloopinteractor.h exception.h global.h \ - gpgadduserideditinteractor.h gpgagentgetinfoassuantransaction.h \ - gpgmefw.h gpgsetexpirytimeeditinteractor.h \ - gpgsetownertrusteditinteractor.h gpgsignkeyeditinteractor.h \ - gpggencardkeyinteractor.h \ - gpgaddexistingsubkeyeditinteractor.h \ - gpgrevokekeyeditinteractor.h \ - importresult.h keygenerationresult.h key.h keylistresult.h \ - notation.h result.h scdgetinfoassuantransaction.h signingresult.h \ - statusconsumerassuantransaction.h \ - trustitem.h verificationresult.h vfsmountresult.h gpgmepp_export.h \ - tofuinfo.h swdbresult.h - -private_gpgmepp_headers = \ - result_p.h context_p.h util.h callbacks.h data_p.h - -interface_headers= \ - interfaces/assuantransaction.h interfaces/dataprovider.h \ - interfaces/passphraseprovider.h interfaces/progressprovider.h \ - interfaces/statusconsumer.h - -gpgmeppincludedir = $(includedir)/gpgme++ -gpgmeppinclude_HEADERS = $(gpgmepp_headers) -nobase_gpgmeppinclude_HEADERS = $(interface_headers) -nodist_gpgmeppinclude_HEADERS = gpgmepp_version.h - -libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \ - $(interface_headers) $(private_gpgmepp_headers) - -AM_CPPFLAGS = -I$(top_builddir)/src \ - @GPGME_CPP_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \ - -DBUILDING_GPGMEPP -Wsuggest-override \ - -Wzero-as-null-pointer-constant - -libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@ -libgpgmepp_la_LDFLAGS = -no-undefined -version-info \ - @LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@ - -if HAVE_MACOS_SYSTEM -libsuffix=.dylib -else -libsuffix=.so -endif - -copied_headers = $(gpgmepp_headers:%=gpgme++/%) $(interface_headers:%=gpgme++/%) - -$(copied_headers): Makefile.am - mkdir -p $(builddir)/gpgme++/interfaces - echo -n "#include \"$(abs_srcdir)" > "$@" - echo -n "$@" | sed "s/gpgme++//" >> "$@" - echo "\"" >> "$@" - -if HAVE_W32_SYSTEM -GpgmeppConfig.cmake: GpgmeppConfig-w32.cmake.in - sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \ - sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \ - sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ -else -GpgmeppConfig.cmake: GpgmeppConfig.cmake.in - sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \ - sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \ - sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@ -endif -install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake - -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp - $(INSTALL) -m 644 GpgmeppConfig.cmake \ - $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake - $(INSTALL) -m 644 GpgmeppConfigVersion.cmake \ - $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake - -uninstall-cmake-files: - -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake - -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake - -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/ - -install-data-local: install-cmake-files - -uninstall-local: uninstall-cmake-files - -BUILT_SOURCES = $(copied_headers) - -CLEANFILES = GpgmeppConfig.cmake GpgmeppConfigVersion.cmake \ - gpgmepp_version.h GpgmeppConfig.cmake.in \ - $(copied_headers) diff --git a/lang/cpp/src/callbacks.cpp b/lang/cpp/src/callbacks.cpp deleted file mode 100644 index 21c2a813..00000000 --- a/lang/cpp/src/callbacks.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - callbacks.cpp - callback targets for internal use: - Copyright (C) 2003,2004 Klarälvdalens Datakonsult AB - 2016 Bundesamt für Sicherheit in der Informationstechnik - Software engineering by Intevation GmbH - - This file is part of GPGME++. - - GPGME++ is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - GPGME++ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with GPGME++; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#include "callbacks.h" -#include "util.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -static inline gpgme_error_t make_err_from_syserror() -{ - return gpgme_error_from_syserror(); -} - -using GpgME::ProgressProvider; -using GpgME::PassphraseProvider; -using GpgME::DataProvider; - -void progress_callback(void *opaque, const char *what, - int type, int current, int total) -{ - ProgressProvider *provider = static_cast(opaque); - if (provider) { - provider->showProgress(what, type, current, total); - } -} - -/* To avoid that a compiler optimizes certain memset calls away, these - macros may be used instead. */ -#define wipememory2(_ptr,_set,_len) do { \ - volatile char *_vptr=(volatile char *)(_ptr); \ - size_t _vlen=(_len); \ - while(_vlen) { *_vptr=(_set); _vptr++; _vlen--; } \ - } while(0) -#define wipememory(_ptr,_len) wipememory2(_ptr,0,_len) - -gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, const char *desc, - int prev_was_bad, int fd) -{ - PassphraseProvider *provider = static_cast(opaque); - bool canceled = false; - gpgme_error_t err = GPG_ERR_NO_ERROR; - char *passphrase = provider ? provider->getPassphrase(uid_hint, desc, prev_was_bad, canceled) : nullptr ; - if (canceled) { - err = make_error(GPG_ERR_CANCELED); - } else { - if (passphrase && *passphrase) { - size_t passphrase_length = std::strlen(passphrase); - size_t written = 0; - do { - ssize_t now_written = gpgme_io_write(fd, passphrase + written, passphrase_length - written); - if (now_written < 0) { - err = make_err_from_syserror(); - break; - } - written += now_written; - } while (written < passphrase_length); - } - } - - if (passphrase && *passphrase) { - wipememory(passphrase, std::strlen(passphrase)); - } - free(passphrase); - gpgme_io_write(fd, "\n", 1); - return err; -} - -static gpgme_ssize_t -data_read_callback(void *opaque, void *buf, size_t buflen) -{ - DataProvider *provider = static_cast(opaque); - if (!provider) { - gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); - return -1; - } - return (gpgme_ssize_t)provider->read(buf, buflen); -} - -static gpgme_ssize_t -data_write_callback(void *opaque, const void *buf, size_t buflen) -{ - DataProvider *provider = static_cast(opaque); - if (!provider) { - gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); - return -1; - } - return (gpgme_ssize_t)provider->write(buf, buflen); -} - -static gpgme_off_t -data_seek_callback(void *opaque, gpgme_off_t offset, int whence) -{ - DataProvider *provider = static_cast(opaque); - if (!provider) { - gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); - return -1; - } - if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END) { - gpgme_err_set_errno(gpgme_err_code_to_errno(GPG_ERR_EINVAL)); - return -1; - } - return provider->seek((off_t)offset, whence); -} - -static void data_release_callback(void *opaque) -{ - DataProvider *provider = static_cast(opaque); - if (provider) { - provider->release(); - } -} - -const gpgme_data_cbs GpgME::data_provider_callbacks = { - &data_read_callback, - &data_write_callback, - &data_seek_callback, - &data_release_callback -}; diff --git a/lang/cpp/src/callbacks.h b/lang/cpp/src/callbacks.h deleted file mode 100644 index a2c6e1b9..00000000 --- a/lang/cpp/src/callbacks.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - callbacks.h - callback targets for internal use: - Copyright (C) 2003 Klarälvdalens Datakonsult AB - 2016 Bundesamt für Sicherheit in der Informationstechnik - Software engineering by Intevation GmbH - - This file is part of GPGME++. - - This is an internal header file, subject to change without - notice. DO NOT USE. - - GPGME++ is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - GPGME++ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with GPGME++; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef __GPGMEPP_CALLBACKS_H__ -#define __GPGMEPP_CALLBACKS_H__ - -#include - -extern "C" { - - void progress_callback(void *opaque, const char *what, - int type, int current, int total); - gpgme_error_t passphrase_callback(void *opaque, const char *uid_hint, - const char *desc, int prev_was_bad, int fd); -} - -namespace GpgME -{ -extern const gpgme_data_cbs data_provider_callbacks; -extern const gpgme_edit_cb_t edit_interactor_callback; -} - -#endif // __GPGME_CALLBACKS_H__ diff --git a/lang/cpp/src/configuration.cpp b/lang/cpp/src/configuration.cpp deleted file mode 100644 index b3b62d6f..00000000 --- a/lang/cpp/src/configuration.cpp +++ /dev/null @@ -1,788 +0,0 @@ -/* - configuration.cpp - wraps gpgme configuration components - Copyright (C) 2010 Klarälvdalens Datakonsult AB - 2016 Bundesamt für Sicherheit in der Informationstechnik - Software engineering by Intevation GmbH - - This file is part of GPGME++. - - GPGME++ is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - GPGME++ is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with GPGME++; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#include "configuration.h" -#include "error.h" -#include "util.h" - -#include - -#include -#include -#include -#include -#include - -using namespace GpgME; -using namespace GpgME::Configuration; - -typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_opt_t; -typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_opt_t; - -typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_conf_arg_t; -typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_conf_arg_t; - -typedef std::shared_ptr< std::remove_pointer::type > shared_gpgme_ctx_t; -typedef std::weak_ptr< std::remove_pointer::type > weak_gpgme_ctx_t; - -namespace -{ -struct nodelete { - template void operator()(T *) {} -}; -} - -// static -std::vector Component::load(Error &returnedError) -{ - - // - // 1. get a context: - // - gpgme_ctx_t ctx_native = nullptr; - if (const gpgme_error_t err = gpgme_new(&ctx_native)) { - returnedError = Error(err); - return std::vector(); - } - const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); - - // - // 2. load the config: - // - gpgme_conf_comp_t conf_list_native = nullptr; - if (const gpgme_error_t err = gpgme_op_conf_load(ctx_native, &conf_list_native)) { - returnedError = Error(err); - return std::vector(); - } - shared_gpgme_conf_comp_t head(conf_list_native, &gpgme_conf_release); - - // - // 3. convert to vector: - // - std::vector result; - - while (head) { - // secure 'head->next' (if any) against memleaks: - shared_gpgme_conf_comp_t next; - if (head->next) { - next.reset(head->next, &gpgme_conf_release); - } - - // now prevent double-free of next.get() and following: - head->next = nullptr; - - // now add a new Component to 'result' (may throw): - result.resize(result.size() + 1); - result.back().comp.swap(head); // .comp = std::move( head ); - head.swap(next); // head = std::move( next ); - } - - return result; -} - -Error Component::save() const -{ - - if (isNull()) { - return Error(make_error(GPG_ERR_INV_ARG)); - } - - // - // 1. get a context: - // - gpgme_ctx_t ctx_native = nullptr; - if (const gpgme_error_t err = gpgme_new(&ctx_native)) { - return Error(err); - } - const shared_gpgme_ctx_t ctx(ctx_native, &gpgme_release); - - // - // 2. save the config: - // - return Error(gpgme_op_conf_save(ctx.get(), comp.get())); -} - -const char *Component::name() const -{ - return comp ? comp->name : nullptr; -} - -const char *Component::description() const -{ - return comp ? comp->description : nullptr ; -} - -const char *Component::programName() const -{ - return comp ? comp->program_name : nullptr ; -} - -Option Component::option(unsigned int idx) const -{ - gpgme_conf_opt_t opt = nullptr; - if (comp) { - opt = comp->options; - } - while (opt && idx) { - opt = opt->next; - --idx; - } - if (opt) { - return Option(comp, opt); - } - return Option(); -} - -Option Component::option(const char *name) const -{ - gpgme_conf_opt_t opt = nullptr; - if (comp) { - opt = comp->options; - } - using namespace std; // for strcmp - while (opt && strcmp(name, opt->name) != 0) { - opt = opt->next; - } - if (opt) { - return Option(comp, opt); - } - return Option(); -} - -unsigned int Component::numOptions() const -{ - unsigned int result = 0; - for (gpgme_conf_opt_t opt = comp ? comp->options : nullptr ; opt ; opt = opt->next) { - ++result; - } - return result; -} - -std::vector