├── gpgfrontend.rc
├── gpgfrontend.ico
├── gpgfrontend.icns
├── resource
├── lfs
│ ├── icons
│ │ ├── up.png
│ │ ├── add.png
│ │ ├── copy.png
│ │ ├── down.png
│ │ ├── edit.png
│ │ ├── exit.png
│ │ ├── file.png
│ │ ├── help.png
│ │ ├── info.png
│ │ ├── junk.png
│ │ ├── key.png
│ │ ├── lock.png
│ │ ├── none.png
│ │ ├── open.png
│ │ ├── redo.png
│ │ ├── sent.png
│ │ ├── undo.png
│ │ ├── archive.png
│ │ ├── batch.png
│ │ ├── check.png
│ │ ├── clear-f.png
│ │ ├── clear.png
│ │ ├── close.png
│ │ ├── detail.png
│ │ ├── drafts.png
│ │ ├── editor.png
│ │ ├── email.png
│ │ ├── error.png
│ │ ├── expand.png
│ │ ├── filter.png
│ │ ├── folder.png
│ │ ├── gnupg.png
│ │ ├── inbox.png
│ │ ├── keymgmt.png
│ │ ├── minus.png
│ │ ├── module.png
│ │ ├── publish.png
│ │ ├── quote.png
│ │ ├── refresh.png
│ │ ├── restart.png
│ │ ├── search.png
│ │ ├── server.png
│ │ ├── setting.png
│ │ ├── ssh-key.png
│ │ ├── stairs.png
│ │ ├── trash.png
│ │ ├── unlock.png
│ │ ├── update.png
│ │ ├── upgrade.png
│ │ ├── verify.png
│ │ ├── warning.png
│ │ ├── wizard.png
│ │ ├── zoomin.png
│ │ ├── zoomout.png
│ │ ├── button_ok.png
│ │ ├── compress.png
│ │ ├── configure.png
│ │ ├── database.png
│ │ ├── encr-sign.png
│ │ ├── fileopen.png
│ │ ├── fileprint.png
│ │ ├── filesave.png
│ │ ├── flag-fill.png
│ │ ├── harddisk.png
│ │ ├── key-group.png
│ │ ├── keypairs.png
│ │ ├── kgpg_key2.png
│ │ ├── misc_doc.png
│ │ ├── signature.png
│ │ ├── translate.png
│ │ ├── up-arrow.png
│ │ ├── workspace.png
│ │ ├── button_copy.png
│ │ ├── button_cut.png
│ │ ├── button_next.png
│ │ ├── button_paste.png
│ │ ├── cloud_sync.png
│ │ ├── decr-verify.png
│ │ ├── email-check.png
│ │ ├── email-open.png
│ │ ├── export-email.png
│ │ ├── filesaveas.png
│ │ ├── gpgfrontend.png
│ │ ├── importance.png
│ │ ├── key_export.png
│ │ ├── key_generate.png
│ │ ├── key_import.png
│ │ ├── key_package.png
│ │ ├── smart-card.png
│ │ ├── button_cancel.png
│ │ ├── button_delete.png
│ │ ├── file-operator.png
│ │ ├── fileencrytion.png
│ │ ├── new_directory.png
│ │ ├── receive_email.png
│ │ ├── statusbar_icon.png
│ │ ├── button_previous.png
│ │ ├── document-encrypt.png
│ │ ├── gpgfrontend_logo.png
│ │ ├── importkey_editor.png
│ │ ├── mimetypes
│ │ │ ├── unknown.png
│ │ │ ├── text-plain.png
│ │ │ ├── application-pdf.png
│ │ │ └── image-x-generic.png
│ │ ├── total_selection.png
│ │ ├── warning-filling.png
│ │ ├── export_key_to_file.png
│ │ ├── import_key_from_file.png
│ │ ├── import_key_from_server.png
│ │ ├── symmetric_encryption.png
│ │ ├── export_key_to_clipboard.png
│ │ ├── format-line-spacing-double.png
│ │ ├── format-line-spacing-normal.png
│ │ ├── format-line-spacing-triple.png
│ │ ├── import_key_from_clipboard.png
│ │ ├── data-error.svg
│ │ ├── password-generate.svg
│ │ ├── hint.svg
│ │ └── visibility.svg
│ ├── icns
│ │ └── GpgFrontend.icns
│ ├── pixmaps
│ │ └── com.bktus.gpgfrontend.png
│ ├── hicolor
│ │ ├── 32x32
│ │ │ └── apps
│ │ │ │ └── com.bktus.gpgfrontend.png
│ │ ├── 48x48
│ │ │ └── apps
│ │ │ │ └── com.bktus.gpgfrontend.png
│ │ ├── 64x64
│ │ │ └── apps
│ │ │ │ └── com.bktus.gpgfrontend.png
│ │ ├── 128x128
│ │ │ └── apps
│ │ │ │ └── com.bktus.gpgfrontend.png
│ │ ├── 256x256
│ │ │ └── apps
│ │ │ │ └── com.bktus.gpgfrontend.png
│ │ └── 512x512
│ │ │ └── apps
│ │ │ └── com.bktus.gpgfrontend.png
│ └── test
│ │ ├── conf
│ │ └── test.cfg
│ │ └── data
│ │ └── tester.key
├── plist
│ ├── entitlement.plist
│ ├── ExportOptions.plist.in
│ └── MacOSXBundleInfo.plist.in
├── appstream
│ └── com.bktus.gpgfrontend.desktop
└── entitlements
│ └── GpgFrontend.entitlements
├── TRANSLATORS
├── .github
├── dependabot.yml
└── NIGHTLY_RELEASE.md
├── cmake
├── FlagsOverrides.cmake
├── FlagsOverridesXcode.cmake
├── rpm
│ ├── post-uninstall.sh
│ └── post-install.sh
└── FindPackageMessage.cmake
├── .devcontainer
├── post-create.sh
├── Dockerfile
├── devcontainer.json
└── reinstall-cmake.sh
├── .gitmodules
├── src
├── sdk
│ ├── GFSDKUtils.cpp
│ ├── GFSDKUtils.h
│ ├── GFSDKUIModel.h
│ ├── GFSDKExtra.h
│ ├── GFSDK.h
│ ├── GFSDKBuildInfo.h.in
│ ├── GFSDKLog.h
│ ├── CMakeLists.txt
│ ├── GFSDKLog.cpp
│ ├── GFSDKExtra.cpp
│ ├── GFSDKUI.h
│ └── GFSDKBasicModel.h
├── test
│ ├── core
│ │ ├── GpgCoreTestDirectoryBasicOpera.cpp
│ │ ├── GpgCoreTest.cpp
│ │ └── GpgCoreTest.h
│ └── CMakeLists.txt
├── ui
│ ├── dialog
│ │ ├── details
│ │ │ ├── SignatureDetailsDialog.cpp
│ │ │ └── SignatureDetailsDialog.h
│ │ ├── keypair_details
│ │ │ ├── KeyDetailsDialog.h
│ │ │ └── KeyPairPhotosTab.h
│ │ ├── SubKeyPicker.h
│ │ ├── RevocationOptionsDialog.h
│ │ ├── SignersPicker.h
│ │ ├── key_generate
│ │ │ └── GenerateCardKeyDialog.h
│ │ ├── controller
│ │ │ └── ModuleControllerDialog.h
│ │ ├── WaitingDialog.h
│ │ ├── settings
│ │ │ └── SettingsAppearance.h
│ │ ├── QuitDialog.h
│ │ └── ADSKsPicker.h
│ ├── GpgFrontendUI.cpp
│ ├── struct
│ │ ├── GpgOperaResult.cpp
│ │ ├── GpgOperaResult.h
│ │ └── UIMountPoint.h
│ ├── widgets
│ │ ├── EMailEditorPage.h
│ │ ├── EMailEditorPage.cpp
│ │ ├── TOFUInfoPage.h
│ │ ├── ModuleListView.h
│ │ ├── GRTTreeView.h
│ │ ├── HelpPage.h
│ │ ├── TOFUInfoPage.cpp
│ │ └── VerifyKeyDetailBox.h
│ ├── UISignalStation.cpp
│ ├── function
│ │ ├── SetOwnerTrustLevel.h
│ │ └── KeyGenerateHelper.h
│ ├── GpgFrontendApplication.h
│ ├── GpgFrontendUIInit.h
│ └── GpgFrontendUI.h
├── core
│ ├── utils
│ │ ├── MemoryUtils.cpp
│ │ ├── LocalizedUtils.h
│ │ ├── LocalizedUtils.cpp
│ │ ├── CacheUtils.cpp
│ │ └── CacheUtils.h
│ ├── GpgConstants.cpp
│ ├── thread
│ │ ├── ThreadingModel.h
│ │ └── FileReadTask.h
│ ├── GpgFrontendCore.cpp
│ ├── module
│ │ ├── GpgFrontendModuleSystem.h
│ │ └── ModuleInit.h
│ ├── GpgModel.h
│ ├── typedef
│ │ ├── GpgErrorTypedef.h
│ │ └── CoreTypedef.h
│ ├── model
│ │ ├── KeyDatabaseInfo.h
│ │ ├── CommonStruct.h
│ │ ├── GpgRecipient.cpp
│ │ ├── CacheObject.cpp
│ │ ├── CacheObject.h
│ │ ├── GpgRecipient.h
│ │ ├── GpgEncryptResult.h
│ │ ├── GpgSignResult.h
│ │ ├── GpgDecryptResult.h
│ │ ├── GpgVerifyResult.h
│ │ ├── GpgGenerateKeyResult.h
│ │ ├── GFDataExchanger.h
│ │ ├── GpgPassphraseContext.h
│ │ └── SettingsObject.h
│ ├── function
│ │ ├── CoreSignalStation.cpp
│ │ ├── SecureMemoryAllocator.h
│ │ ├── result_analyse
│ │ │ ├── GpgResultAnalyse.cpp
│ │ │ ├── GpgSignResultAnalyse.h
│ │ │ └── GpgEncryptResultAnalyse.h
│ │ ├── basic
│ │ │ └── ChannelObject.cpp
│ │ └── CoreSignalStation.h
│ ├── struct
│ │ └── cache_object
│ │ │ └── FavoriteKeyPairsByKeyDatabaseCO.h
│ └── GpgCoreInit.h
├── BinaryValidate.h
├── Application.h
├── Command.h
├── GpgFrontendBuildInstallInfo.h.in
├── Initialize.h
├── GpgFrontendBuildInfo.h.in
└── GpgFrontend.h.in
├── ui
├── KeyDeatils.ui
└── GnuPGConfigManagerDialog.ui
└── .gitignore
/gpgfrontend.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "gpgfrontend.ico"
--------------------------------------------------------------------------------
/gpgfrontend.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/gpgfrontend.ico
--------------------------------------------------------------------------------
/gpgfrontend.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/gpgfrontend.icns
--------------------------------------------------------------------------------
/resource/lfs/icons/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/up.png
--------------------------------------------------------------------------------
/resource/lfs/icons/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/add.png
--------------------------------------------------------------------------------
/resource/lfs/icons/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/copy.png
--------------------------------------------------------------------------------
/resource/lfs/icons/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/down.png
--------------------------------------------------------------------------------
/resource/lfs/icons/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/edit.png
--------------------------------------------------------------------------------
/resource/lfs/icons/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/exit.png
--------------------------------------------------------------------------------
/resource/lfs/icons/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/file.png
--------------------------------------------------------------------------------
/resource/lfs/icons/help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/help.png
--------------------------------------------------------------------------------
/resource/lfs/icons/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/info.png
--------------------------------------------------------------------------------
/resource/lfs/icons/junk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/junk.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key.png
--------------------------------------------------------------------------------
/resource/lfs/icons/lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/lock.png
--------------------------------------------------------------------------------
/resource/lfs/icons/none.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/none.png
--------------------------------------------------------------------------------
/resource/lfs/icons/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/open.png
--------------------------------------------------------------------------------
/resource/lfs/icons/redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/redo.png
--------------------------------------------------------------------------------
/resource/lfs/icons/sent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/sent.png
--------------------------------------------------------------------------------
/resource/lfs/icons/undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/undo.png
--------------------------------------------------------------------------------
/resource/lfs/icons/archive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/archive.png
--------------------------------------------------------------------------------
/resource/lfs/icons/batch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/batch.png
--------------------------------------------------------------------------------
/resource/lfs/icons/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/check.png
--------------------------------------------------------------------------------
/resource/lfs/icons/clear-f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/clear-f.png
--------------------------------------------------------------------------------
/resource/lfs/icons/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/clear.png
--------------------------------------------------------------------------------
/resource/lfs/icons/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/close.png
--------------------------------------------------------------------------------
/resource/lfs/icons/detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/detail.png
--------------------------------------------------------------------------------
/resource/lfs/icons/drafts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/drafts.png
--------------------------------------------------------------------------------
/resource/lfs/icons/editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/editor.png
--------------------------------------------------------------------------------
/resource/lfs/icons/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/email.png
--------------------------------------------------------------------------------
/resource/lfs/icons/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/error.png
--------------------------------------------------------------------------------
/resource/lfs/icons/expand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/expand.png
--------------------------------------------------------------------------------
/resource/lfs/icons/filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/filter.png
--------------------------------------------------------------------------------
/resource/lfs/icons/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/folder.png
--------------------------------------------------------------------------------
/resource/lfs/icons/gnupg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/gnupg.png
--------------------------------------------------------------------------------
/resource/lfs/icons/inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/inbox.png
--------------------------------------------------------------------------------
/resource/lfs/icons/keymgmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/keymgmt.png
--------------------------------------------------------------------------------
/resource/lfs/icons/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/minus.png
--------------------------------------------------------------------------------
/resource/lfs/icons/module.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/module.png
--------------------------------------------------------------------------------
/resource/lfs/icons/publish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/publish.png
--------------------------------------------------------------------------------
/resource/lfs/icons/quote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/quote.png
--------------------------------------------------------------------------------
/resource/lfs/icons/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/refresh.png
--------------------------------------------------------------------------------
/resource/lfs/icons/restart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/restart.png
--------------------------------------------------------------------------------
/resource/lfs/icons/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/search.png
--------------------------------------------------------------------------------
/resource/lfs/icons/server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/server.png
--------------------------------------------------------------------------------
/resource/lfs/icons/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/setting.png
--------------------------------------------------------------------------------
/resource/lfs/icons/ssh-key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/ssh-key.png
--------------------------------------------------------------------------------
/resource/lfs/icons/stairs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/stairs.png
--------------------------------------------------------------------------------
/resource/lfs/icons/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/trash.png
--------------------------------------------------------------------------------
/resource/lfs/icons/unlock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/unlock.png
--------------------------------------------------------------------------------
/resource/lfs/icons/update.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/update.png
--------------------------------------------------------------------------------
/resource/lfs/icons/upgrade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/upgrade.png
--------------------------------------------------------------------------------
/resource/lfs/icons/verify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/verify.png
--------------------------------------------------------------------------------
/resource/lfs/icons/warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/warning.png
--------------------------------------------------------------------------------
/resource/lfs/icons/wizard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/wizard.png
--------------------------------------------------------------------------------
/resource/lfs/icons/zoomin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/zoomin.png
--------------------------------------------------------------------------------
/resource/lfs/icons/zoomout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/zoomout.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_ok.png
--------------------------------------------------------------------------------
/resource/lfs/icons/compress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/compress.png
--------------------------------------------------------------------------------
/resource/lfs/icons/configure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/configure.png
--------------------------------------------------------------------------------
/resource/lfs/icons/database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/database.png
--------------------------------------------------------------------------------
/resource/lfs/icons/encr-sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/encr-sign.png
--------------------------------------------------------------------------------
/resource/lfs/icons/fileopen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/fileopen.png
--------------------------------------------------------------------------------
/resource/lfs/icons/fileprint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/fileprint.png
--------------------------------------------------------------------------------
/resource/lfs/icons/filesave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/filesave.png
--------------------------------------------------------------------------------
/resource/lfs/icons/flag-fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/flag-fill.png
--------------------------------------------------------------------------------
/resource/lfs/icons/harddisk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/harddisk.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key-group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key-group.png
--------------------------------------------------------------------------------
/resource/lfs/icons/keypairs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/keypairs.png
--------------------------------------------------------------------------------
/resource/lfs/icons/kgpg_key2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/kgpg_key2.png
--------------------------------------------------------------------------------
/resource/lfs/icons/misc_doc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/misc_doc.png
--------------------------------------------------------------------------------
/resource/lfs/icons/signature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/signature.png
--------------------------------------------------------------------------------
/resource/lfs/icons/translate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/translate.png
--------------------------------------------------------------------------------
/resource/lfs/icons/up-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/up-arrow.png
--------------------------------------------------------------------------------
/resource/lfs/icons/workspace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/workspace.png
--------------------------------------------------------------------------------
/resource/lfs/icns/GpgFrontend.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icns/GpgFrontend.icns
--------------------------------------------------------------------------------
/resource/lfs/icons/button_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_copy.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_cut.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_next.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_paste.png
--------------------------------------------------------------------------------
/resource/lfs/icons/cloud_sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/cloud_sync.png
--------------------------------------------------------------------------------
/resource/lfs/icons/decr-verify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/decr-verify.png
--------------------------------------------------------------------------------
/resource/lfs/icons/email-check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/email-check.png
--------------------------------------------------------------------------------
/resource/lfs/icons/email-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/email-open.png
--------------------------------------------------------------------------------
/resource/lfs/icons/export-email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/export-email.png
--------------------------------------------------------------------------------
/resource/lfs/icons/filesaveas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/filesaveas.png
--------------------------------------------------------------------------------
/resource/lfs/icons/gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/icons/importance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/importance.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key_export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key_export.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key_generate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key_generate.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key_import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key_import.png
--------------------------------------------------------------------------------
/resource/lfs/icons/key_package.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/key_package.png
--------------------------------------------------------------------------------
/resource/lfs/icons/smart-card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/smart-card.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_cancel.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_delete.png
--------------------------------------------------------------------------------
/resource/lfs/icons/file-operator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/file-operator.png
--------------------------------------------------------------------------------
/resource/lfs/icons/fileencrytion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/fileencrytion.png
--------------------------------------------------------------------------------
/resource/lfs/icons/new_directory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/new_directory.png
--------------------------------------------------------------------------------
/resource/lfs/icons/receive_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/receive_email.png
--------------------------------------------------------------------------------
/resource/lfs/icons/statusbar_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/statusbar_icon.png
--------------------------------------------------------------------------------
/resource/lfs/icons/button_previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/button_previous.png
--------------------------------------------------------------------------------
/resource/lfs/icons/document-encrypt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/document-encrypt.png
--------------------------------------------------------------------------------
/resource/lfs/icons/gpgfrontend_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/gpgfrontend_logo.png
--------------------------------------------------------------------------------
/resource/lfs/icons/importkey_editor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/importkey_editor.png
--------------------------------------------------------------------------------
/resource/lfs/icons/mimetypes/unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/mimetypes/unknown.png
--------------------------------------------------------------------------------
/resource/lfs/icons/total_selection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/total_selection.png
--------------------------------------------------------------------------------
/resource/lfs/icons/warning-filling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/warning-filling.png
--------------------------------------------------------------------------------
/resource/lfs/icons/export_key_to_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/export_key_to_file.png
--------------------------------------------------------------------------------
/resource/lfs/icons/import_key_from_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/import_key_from_file.png
--------------------------------------------------------------------------------
/resource/lfs/icons/import_key_from_server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/import_key_from_server.png
--------------------------------------------------------------------------------
/resource/lfs/icons/mimetypes/text-plain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/mimetypes/text-plain.png
--------------------------------------------------------------------------------
/resource/lfs/icons/symmetric_encryption.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/symmetric_encryption.png
--------------------------------------------------------------------------------
/resource/lfs/icons/export_key_to_clipboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/export_key_to_clipboard.png
--------------------------------------------------------------------------------
/resource/lfs/pixmaps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/pixmaps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/icons/format-line-spacing-double.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/format-line-spacing-double.png
--------------------------------------------------------------------------------
/resource/lfs/icons/format-line-spacing-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/format-line-spacing-normal.png
--------------------------------------------------------------------------------
/resource/lfs/icons/format-line-spacing-triple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/format-line-spacing-triple.png
--------------------------------------------------------------------------------
/resource/lfs/icons/import_key_from_clipboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/import_key_from_clipboard.png
--------------------------------------------------------------------------------
/resource/lfs/icons/mimetypes/application-pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/mimetypes/application-pdf.png
--------------------------------------------------------------------------------
/resource/lfs/icons/mimetypes/image-x-generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/icons/mimetypes/image-x-generic.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/32x32/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/32x32/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/48x48/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/48x48/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/64x64/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/64x64/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/128x128/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/128x128/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/256x256/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/256x256/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/resource/lfs/hicolor/512x512/apps/com.bktus.gpgfrontend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/saturneric/GpgFrontend/HEAD/resource/lfs/hicolor/512x512/apps/com.bktus.gpgfrontend.png
--------------------------------------------------------------------------------
/TRANSLATORS:
--------------------------------------------------------------------------------
1 | Translators:
2 |
3 | Fabian Hêche (fr_FR)
4 | huzpsb (zh_CN)
5 | Zi Jiaxu (zh_CN)
6 | Oliver Leitner (de_DE)
7 | James (zh_TW)
8 | Salvatore Scirè (it_IT)
9 | Saturneric (zh_CN, de_DE)
10 |
--------------------------------------------------------------------------------
/resource/plist/entitlement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | com.apple.security.app-sandbox
5 |
6 |
7 |
--------------------------------------------------------------------------------
/resource/appstream/com.bktus.gpgfrontend.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Type=Application
3 | Name=Gpg Frontend
4 | Exec=gpgfrontend
5 | Icon=com.bktus.gpgfrontend
6 | Comment=Encrypt and sign data
7 | Terminal=false
8 | Categories=Utility;
9 | StartupWMClass=GpgFrontend
--------------------------------------------------------------------------------
/resource/entitlements/GpgFrontend.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-write
8 |
9 | com.apple.security.network.client
10 |
11 | com.apple.security.print
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for more information:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 | # https://containers.dev/guide/dependabot
6 |
7 | version: 2
8 | updates:
9 | - package-ecosystem: "devcontainers"
10 | directory: "/"
11 | schedule:
12 | interval: weekly
13 |
--------------------------------------------------------------------------------
/resource/lfs/icons/data-error.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/cmake/FlagsOverrides.cmake:
--------------------------------------------------------------------------------
1 | SET (CMAKE_C_FLAGS "-Wall -std=c11")
2 | SET (CMAKE_C_FLAGS_DEBUG "-g")
3 | SET (CMAKE_C_FLAGS_MINSIZERE "-Os -DNDEBUG")
4 | SET (CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
5 | SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
6 |
7 | SET (CMAKE_CXX_FLAGS "-Wall -std=c++17")
8 | SET (CMAKE_CXX_FLAGS_DEBUG "-g")
9 | SET (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
10 | SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
11 | SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
--------------------------------------------------------------------------------
/cmake/FlagsOverridesXcode.cmake:
--------------------------------------------------------------------------------
1 | SET (CMAKE_C_FLAGS "-Wall -std=c11")
2 | SET (CMAKE_C_FLAGS_DEBUG "-g")
3 | SET (CMAKE_C_FLAGS_MINSIZERE "-Os -DNDEBUG")
4 | SET (CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
5 | SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
6 |
7 | SET (CMAKE_CXX_FLAGS "-Wall -std=c++17")
8 | SET (CMAKE_CXX_FLAGS_DEBUG "-g")
9 | SET (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
10 | SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
11 | SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
--------------------------------------------------------------------------------
/resource/lfs/icons/password-generate.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/.devcontainer/post-create.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 |
3 | git submodule update --recursive --init
4 | cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
5 | ln -s build/compile_commands.json $(pwd)/compile_commands.json
6 |
7 | # gather informations
8 | PROJECT_VERSION=$(cmake --system-information | awk -F= '$1~/CMAKE_PROJECT_VERSION:STATIC/{print$2}')
9 |
10 | # modules development
11 | cmake -B build-sdk -G Ninja -DCMAKE_BUILD_TYPE=Debug -DGPGFRONTEND_BUILD_TYPE_ONLY_SDK=On -DCMAKE_INSTALL_PREFIX=$pwd/modules/sdk/$PROJECT_VERSION
12 | cmake -B modules/build -S modules -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$pwd/build/artifacts
--------------------------------------------------------------------------------
/cmake/rpm/post-uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Update icon cache after removal
4 | if [ -x /usr/bin/gtk-update-icon-cache ]; then
5 | /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor || :
6 | fi
7 |
8 | # Update desktop database after removal
9 | if [ -x /usr/bin/update-desktop-database ]; then
10 | /usr/bin/update-desktop-database -q /usr/share/applications || :
11 | fi
12 |
13 | # Update mime database after removal
14 | if [ -x /usr/bin/update-mime-database ]; then
15 | /usr/bin/update-mime-database /usr/share/mime || :
16 | fi
17 |
18 | # Try XDG icon cache update if available
19 | if [ -x /usr/bin/xdg-icon-resource ]; then
20 | /usr/bin/xdg-icon-resource forceupdate --theme hicolor || :
21 | fi
--------------------------------------------------------------------------------
/resource/plist/ExportOptions.plist.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | method
6 | developer-id
7 | teamID
8 | @GPGFRONTEND_XCODE_TEAM_ID@
9 | compileBitcode
10 |
11 | signingStyle
12 | automatic
13 | signingCertificate
14 | @GPGFRONTEND_XCODE_CODE_SIGN_IDENTITY@
15 | provisioningProfiles
16 |
17 | @GPGFRONTEND_XCODE_APPID@
18 | @GPGFRONTEND_XCODE_PROVISIONING_PROFILE_UUID@
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "third_party/qttranslations"]
2 | path = third_party/qttranslations
3 | url = https://github.com/qt/qttranslations.git
4 | [submodule "modules"]
5 | path = modules
6 | url = https://git.bktus.com/GpgFrontend/Modules.git
7 | [submodule "third_party/gpgme"]
8 | path = third_party/gpgme
9 | url = https://git.bktus.com/GpgFrontend/gpgme.git
10 | [submodule "third_party/libassuan"]
11 | path = third_party/libassuan
12 | url = https://git.bktus.com/GpgFrontend/libassuan.git
13 | [submodule "third_party/libgpg-error"]
14 | path = third_party/libgpg-error
15 | url = https://git.bktus.com/GpgFrontend/libgpg-error.git
16 | [submodule "third_party/openssl"]
17 | path = third_party/openssl
18 | url = https://github.com/openssl/openssl.git
19 |
--------------------------------------------------------------------------------
/cmake/rpm/post-install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Update icon cache
4 | if [ -x /usr/bin/gtk-update-icon-cache ]; then
5 | /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor || :
6 | fi
7 |
8 | # Update desktop database
9 | if [ -x /usr/bin/update-desktop-database ]; then
10 | /usr/bin/update-desktop-database -q /usr/share/applications || :
11 | fi
12 |
13 | # Update mime database
14 | if [ -x /usr/bin/update-mime-database ]; then
15 | /usr/bin/update-mime-database /usr/share/mime || :
16 | fi
17 |
18 | # Try XDG icon cache update if available
19 | if [ -x /usr/bin/xdg-icon-resource ]; then
20 | /usr/bin/xdg-icon-resource forceupdate --theme hicolor || :
21 | fi
22 |
23 | # Clear icon cache for current user if logged in
24 | if [ ! -z "$SUDO_USER" ]; then
25 | su "$SUDO_USER" -c 'gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor 2>/dev/null || :'
26 | fi
--------------------------------------------------------------------------------
/resource/lfs/test/conf/test.cfg:
--------------------------------------------------------------------------------
1 | # core test configuration file
2 | version = "1.0";
3 | independent_database = true;
4 | independent_db_path = "db";
5 | alone_gpg = true;
6 | alone_gpg_path = "gpg/gpg1";
7 | alone_gpg_db_path = "alone_db";
8 | data_path = "data";
9 | load_keys =
10 | {
11 | private_keys = (
12 | {
13 | filename = "pv1.key";
14 | md5 = "1d6ceb1aa836b582fa3750cb162ce90c";
15 | },{
16 | filename = "pv2.key";
17 | md5 = "ce52f1557a1d7e74c4f157fdf8f56d41";
18 | },{
19 | filename = "pv3.key";
20 | md5 = "ab7bc39ccb46ccdd71867a391f2d2306";
21 | },
22 | {
23 | filename = "pv4.key";
24 | md5 = "c88ff29f7c75fa118776a62313035442";
25 | },
26 | {
27 | filename = "tester.key";
28 | md5 = "8d1d711e12d27f89f0bbfcf4cb16cc4f";
29 | }
30 | );
31 | };
--------------------------------------------------------------------------------
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12
2 |
3 | ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.22.2"
4 |
5 | # Optionally install the cmake for vcpkg
6 | COPY ./reinstall-cmake.sh /tmp/
7 |
8 | RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
9 | chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
10 | fi \
11 | && rm -f /tmp/reinstall-cmake.sh
12 |
13 | # [Optional] Uncomment this section to install additional vcpkg ports.
14 | # RUN su vscode -c "${VCPKG_ROOT}/vcpkg install "
15 |
16 | RUN apt-get update && \
17 | apt-get install -y --no-install-recommends \
18 | build-essential \
19 | git \
20 | autoconf \
21 | automake \
22 | gettext \
23 | texinfo \
24 | gcc \
25 | g++ \
26 | ccache \
27 | ninja-build \
28 | libgtest-dev \
29 | libarchive-dev \
30 | libssl-dev \
31 | libgpgme-dev \
32 | qt6-base-dev \
33 | qt6-tools-dev \
34 | clangd \
35 | && apt-get clean \
36 | && rm -rf /var/lib/apt/lists/*
--------------------------------------------------------------------------------
/src/sdk/GFSDKUtils.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GFSDKUtils.h"
--------------------------------------------------------------------------------
/src/sdk/GFSDKUtils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {}
--------------------------------------------------------------------------------
/src/test/core/GpgCoreTestDirectoryBasicOpera.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgCoreTest.h"
30 |
--------------------------------------------------------------------------------
/src/ui/dialog/details/SignatureDetailsDialog.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "SignatureDetailsDialog.h"
30 |
--------------------------------------------------------------------------------
/src/core/utils/MemoryUtils.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "MemoryUtils.h"
30 |
31 | namespace GpgFrontend {} // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/GpgConstants.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "core/GpgConstants.h"
30 |
31 | namespace GpgFrontend {} // namespace GpgFrontend
32 |
--------------------------------------------------------------------------------
/src/BinaryValidate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | auto ValidateLibraries() -> bool;
32 |
33 | auto EnforceBinaryValidation() -> bool;
--------------------------------------------------------------------------------
/resource/lfs/icons/hint.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/src/ui/GpgFrontendUI.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgFrontendUI.h"
30 |
31 | Q_LOGGING_CATEGORY(ui, "ui")
32 |
33 | auto GF_UI_EXPORT GFUIValidateSymbol() -> int { return 0; }
--------------------------------------------------------------------------------
/src/ui/dialog/details/SignatureDetailsDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | class SignatureDetailsDialog : public QDialog {
32 | Q_OBJECT
33 | public:
34 | };
35 |
--------------------------------------------------------------------------------
/src/core/thread/ThreadingModel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/thread/Task.h"
32 | #include "core/thread/TaskRunner.h"
33 | #include "core/thread/TaskRunnerGetter.h"
34 |
--------------------------------------------------------------------------------
/src/core/GpgFrontendCore.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "core/GpgFrontendCore.h"
30 |
31 | Q_LOGGING_CATEGORY(core, "core")
32 |
33 | auto GF_CORE_EXPORT GFCoreValidateSymbol() -> int { return 0; }
--------------------------------------------------------------------------------
/src/Application.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GpgFrontendContext.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | auto StartApplication(const GFCxtWPtr& p_ctx) -> int;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/sdk/GFSDKUIModel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {
32 |
33 | using QObjectFactory = void* (*)(void*);
34 |
35 | struct MetaData {
36 | const char* key;
37 | const char* value;
38 | };
39 | }
--------------------------------------------------------------------------------
/src/core/module/GpgFrontendModuleSystem.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 | #include
33 | #include
34 | #include
--------------------------------------------------------------------------------
/src/test/core/GpgCoreTest.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgCoreTest.h"
30 |
31 | namespace GpgFrontend::Test {
32 |
33 | void GpgCoreTest::TearDown() {}
34 |
35 | void GpgCoreTest::SetUp() {}
36 | } // namespace GpgFrontend::Test
37 |
--------------------------------------------------------------------------------
/src/core/GpgModel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | //
32 | #include "core/typedef/GpgTypedef.h"
33 |
34 | //
35 | #include "core/model/GpgData.h"
36 | #include "core/model/GpgKey.h"
37 | #include "core/model/GpgSignature.h"
38 |
39 | // namespace GpgFrontend
40 |
--------------------------------------------------------------------------------
/src/core/utils/LocalizedUtils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | auto GF_CORE_EXPORT GetLocalizedDateByTimestamp(time_t) -> QString;
34 |
35 | auto GF_CORE_EXPORT GetUTCDateByTimestamp(time_t) -> QString;
36 |
37 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/typedef/GpgErrorTypedef.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 |
33 | namespace GpgFrontend {
34 |
35 | using GpgError = gpgme_error_t;
36 | using GpgErrorCode = gpg_err_code_t;
37 | using GpgErrorDesc = QPair;
38 |
39 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/ui/KeyDeatils.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | KeyDeatilsDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 423
10 | 616
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | QTabWidget::North
23 |
24 |
25 | 0
26 |
27 |
28 | true
29 |
30 |
31 |
32 | Tab 1
33 |
34 |
35 |
36 |
37 | Tab 2
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/core/model/KeyDatabaseInfo.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | struct KeyDatabaseInfo {
34 | int channel;
35 | QString name;
36 | QString path;
37 | QString origin_path;
38 |
39 | KeyDatabaseInfo() = default;
40 | };
41 |
42 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2 | // README at: https://github.com/devcontainers/templates/tree/main/src/cpp
3 | {
4 | "name": "C++",
5 | "hostRequirements": {
6 | "cpus": 4,
7 | "memory": "16gb",
8 | "storage": "32gb"
9 | },
10 | "build": {
11 | "dockerfile": "Dockerfile"
12 | },
13 | "features": {
14 | "ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {},
15 | "ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
16 | "ghcr.io/devcontainers/features/desktop-lite:1": {}
17 | },
18 | "forwardPorts": [6080],
19 | "portsAttributes": {
20 | "6080": {
21 | "label": "desktop"
22 | }
23 | },
24 | "customizations": {
25 | "vscode": {
26 | "extensions": [
27 | "jeff-hykin.better-cpp-syntax",
28 | "ms-vscode.cpptools-themes",
29 | "ms-vscode.cpptools",
30 | "xaver.clang-format",
31 | "llvm-vs-code-extensions.vscode-clangd",
32 | "josetr.cmake-language-support-vscode",
33 | "ms-vscode.cmake-tools",
34 | "streetsidesoftware.code-spell-checker",
35 | "vadimcn.vscode-lldb",
36 | "yzhang.markdown-all-in-one",
37 | "stkb.rewrap"
38 | ]
39 | },
40 | "settings": {
41 | "C_Cpp.intelliSenseEngine": "disabled",
42 | "clangd.path": "/usr/bin/clangd"
43 | }
44 | },
45 | "postCreateCommand": "bash .devcontainer/post-create.sh",
46 | "runArgs": ["--shm-size=1g"]
47 | }
48 |
--------------------------------------------------------------------------------
/src/sdk/GFSDKExtra.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {
32 |
33 | auto GF_SDK_EXPORT GFCompareSoftwareVersion(const char *current_version,
34 | const char *latest_version) -> int;
35 |
36 | auto GF_SDK_EXPORT GFHttpRequestUserAgent() -> const char *;
37 | }
--------------------------------------------------------------------------------
/src/ui/struct/GpgOperaResult.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgOperaResult.h"
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | GpgOperaResult::GpgOperaResult(int status, QString report, QString tag)
34 | : status(status), report(std::move(report)), tag(std::move(tag)) {}
35 |
36 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/.github/NIGHTLY_RELEASE.md:
--------------------------------------------------------------------------------
1 | This is an **unstable nightly build** of GpgFrontend. It may contain new
2 | features or fixes that are still being tested and is less stable than official
3 | releases.
4 |
5 | #### Why Nightly Releases?
6 |
7 | Nightly builds give users early access to new features and urgent fixes, often
8 | within days of request or report. This helps you get improvements faster,
9 | instead of waiting for the next stable release.
10 |
11 | #### Important Notes
12 |
13 | - **Use at your own risk.** Not recommended for production environments.
14 | - **Breaking changes may occur without notice.** Configurations and workflows
15 | might change unexpectedly.
16 | - **Quick turnaround:** Issue fixes and feature requests on GitHub are often
17 | delivered in these nightly builds.
18 | - **Thorough testing by users is highly encouraged!** Your feedback is essential
19 | for improving stability and quality before the next official release.
20 | - Report problems or suggestions via GitHub Issues or contact the maintainer.
21 |
22 | #### Security & Integrity
23 |
24 | Nightly releases are created automatically. For security, my private signing key
25 | is never uploaded to GitHub, so **these builds are not GPG-signed**.
26 | To verify integrity, please check the provided SHA256 checksums. If you need
27 | extra assurance, feel free to reach out or wait for the next official signed
28 | release.
29 |
30 | Thank you for supporting GpgFrontend!
31 |
--------------------------------------------------------------------------------
/resource/plist/MacOSXBundleInfo.plist.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME}
9 | CFBundleGetInfoString
10 | ${MACOSX_BUNDLE_INFO_STRING}
11 | CFBundleIconFile
12 | ${MACOSX_BUNDLE_ICON_FILE}
13 | CFBundleIdentifier
14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleLongVersionString
18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING}
19 | CFBundleName
20 | ${MACOSX_BUNDLE_BUNDLE_NAME}
21 | CFBundlePackageType
22 | APPL
23 | CFBundleShortVersionString
24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING}
25 | CFBundleSignature
26 | ????
27 | CFBundleVersion
28 | ${MACOSX_BUNDLE_BUNDLE_VERSION}
29 | CSResourcesFileMapped
30 |
31 | NSHumanReadableCopyright
32 | ${MACOSX_BUNDLE_COPYRIGHT}
33 | LSApplicationCategoryType
34 | public.app-category.utilities
35 |
36 |
--------------------------------------------------------------------------------
/src/test/core/GpgCoreTest.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 |
33 | #include "GpgFrontendTest.h"
34 |
35 | namespace GpgFrontend::Test {
36 |
37 | class GpgCoreTest : public ::testing::Test {
38 | public:
39 | void SetUp() override;
40 |
41 | void TearDown() override;
42 | };
43 |
44 | } // namespace GpgFrontend::Test
--------------------------------------------------------------------------------
/src/Command.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GpgFrontendContext.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | // functions
36 |
37 | auto PrintVersion() -> int;
38 |
39 | auto ParseLogLevel(const QString& level) -> int;
40 |
41 | auto RunTest(const GFCxtWPtr&) -> int;
42 |
43 | auto PrintEnvInfo() -> int;
44 |
45 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/sdk/GFSDK.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {
32 |
33 | void GF_SDK_EXPORT GFModuleLogTrace(const char*);
34 |
35 | void GF_SDK_EXPORT GFModuleLogDebug(const char*);
36 |
37 | void GF_SDK_EXPORT GFModuleLogInfo(const char*);
38 |
39 | void GF_SDK_EXPORT GFModuleLogWarn(const char*);
40 |
41 | void GF_SDK_EXPORT GFModuleLogError(const char*);
42 | }
--------------------------------------------------------------------------------
/src/sdk/GFSDKBuildInfo.h.in:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #define GF_SDK_VERSION_MAJOR "@CMAKE_PROJECT_VERSION_MAJOR@"
32 | #define GF_SDK_VERSION_MINOR "@CMAKE_PROJECT_VERSION_MINOR@"
33 | #define GF_SDK_VERSION_PATCH "@CMAKE_PROJECT_VERSION_PATCH@"
34 |
35 | #define GF_SDK_VERSION_STR \
36 | GF_SDK_VERSION_MAJOR "." GF_SDK_VERSION_MINOR "." GF_SDK_VERSION_PATCH
--------------------------------------------------------------------------------
/src/sdk/GFSDKLog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {
32 |
33 | void GF_SDK_EXPORT GFModuleLogTrace(const char*);
34 |
35 | void GF_SDK_EXPORT GFModuleLogDebug(const char*);
36 |
37 | void GF_SDK_EXPORT GFModuleLogInfo(const char*);
38 |
39 | void GF_SDK_EXPORT GFModuleLogWarn(const char*);
40 |
41 | void GF_SDK_EXPORT GFModuleLogError(const char*);
42 | }
--------------------------------------------------------------------------------
/src/ui/struct/GpgOperaResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/GFBuffer.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | struct GpgOperaResult {
36 | int status;
37 | QString report;
38 | QString tag;
39 | GFBuffer o_buffer;
40 |
41 | GpgOperaResult(int status, QString report, QString tag);
42 | };
43 |
44 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/core/model/CommonStruct.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | /**
34 | * @brief
35 | *
36 | */
37 | template
38 | struct GF_CORE_EXPORT RefDeleter {
39 | void
40 | operator()(T* _key){gpgme_unre}
41 | };
42 |
43 | template
44 | using KeyRefHandler = std::unique_ptr>; ///<
45 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/GpgRecipient.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgRecipient.h"
30 |
31 | namespace GpgFrontend {
32 |
33 | GpgRecipient::GpgRecipient() = default;
34 |
35 | GpgRecipient::GpgRecipient(gpgme_recipient_t r) {
36 | this->keyid = QString{r->keyid};
37 | this->pubkey_algo = QString{gpgme_pubkey_algo_name(r->pubkey_algo)};
38 | this->status = r->status;
39 | }
40 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/resource/lfs/icons/visibility.svg:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/src/ui/widgets/EMailEditorPage.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "ui/widgets/PlainTextEditorPage.h"
32 |
33 | class Ui_FilePage;
34 |
35 | namespace GpgFrontend::UI {
36 | class EMailEditorPage : public PlainTextEditorPage {
37 | Q_OBJECT
38 | public:
39 | EMailEditorPage();
40 |
41 | EMailEditorPage(const QString& file_path, QWidget* parent);
42 | };
43 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/core/module/ModuleInit.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend::Module {
32 |
33 | struct ModuleInitArgs {};
34 |
35 | /**
36 | * @brief init the module library
37 | *
38 | */
39 | void GF_CORE_EXPORT LoadGpgFrontendModules(ModuleInitArgs args);
40 |
41 | /**
42 | * @brief shutdown the module library
43 | *
44 | */
45 | void GF_CORE_EXPORT ShutdownGpgFrontendModules();
46 |
47 | }; // namespace GpgFrontend::Module
48 |
--------------------------------------------------------------------------------
/src/core/function/CoreSignalStation.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "core/function/CoreSignalStation.h"
30 |
31 | std::unique_ptr
32 | GpgFrontend::CoreSignalStation::instance = nullptr;
33 |
34 | auto GpgFrontend::CoreSignalStation::GetInstance()
35 | -> GpgFrontend::CoreSignalStation* {
36 | if (instance == nullptr) {
37 | instance = std::make_unique();
38 | }
39 | return instance.get();
40 | }
41 |
--------------------------------------------------------------------------------
/src/core/utils/LocalizedUtils.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "LocalizedUtils.h"
30 |
31 | namespace GpgFrontend {
32 |
33 | auto GetLocalizedDateByTimestamp(time_t timestamp) -> QString {
34 | return QLocale().toString(QDateTime::fromSecsSinceEpoch(timestamp));
35 | }
36 |
37 | auto GetUTCDateByTimestamp(time_t timestamp) -> QString {
38 | return QLocale().toString(QDateTime::fromSecsSinceEpoch(timestamp).toUTC());
39 | }
40 |
41 | } // namespace GpgFrontend
42 |
--------------------------------------------------------------------------------
/src/sdk/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021-2024 Saturneric
2 | #
3 | # This file is part of GpgFrontend.
4 | #
5 | # GpgFrontend is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # GpgFrontend is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GpgFrontend. If not, see .
17 | #
18 | # The initial version of the source code is inherited from
19 | # the gpg4usb project, which is under GPL-3.0-or-later.
20 | #
21 | # All the source code of GpgFrontend was modified and released by
22 | # Saturneric starting on May 12, 2021.
23 | #
24 | # SPDX-License-Identifier: GPL-3.0-or-later
25 |
26 | aux_source_directory(. MODULE_SDK_SOURCE)
27 | aux_source_directory(private MODULE_SDK_SOURCE)
28 |
29 | # define sdk
30 | register_library(sdk LIBRARY_TARGET ${MODULE_SDK_SOURCE})
31 | target_include_directories(${LIBRARY_TARGET} PRIVATE
32 | ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_TARGET}_autogen/include)
33 |
34 | # headers
35 | target_include_directories(${LIBRARY_TARGET} PUBLIC sdk)
36 |
37 | # link module system
38 | target_link_libraries(${LIBRARY_TARGET} PRIVATE gf_core gf_ui)
--------------------------------------------------------------------------------
/src/GpgFrontendBuildInstallInfo.h.in:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | /**
32 | * Build & Install Path Information
33 | */
34 | #define APP_LOCALE_PATH "@CMAKE_INSTALL_FULL_LOCALEDIR@"
35 | #define APP_BIN_PATH "@CMAKE_INSTALL_FULL_BINDIR@"
36 | #define APP_LOCALSTATE_PATH "@CMAKE_INSTALL_FULL_LOCALSTATEDIR@"
37 | #define APP_SYSCONF_PATH "@CMAKE_INSTALL_FULL_SYSCONFDIR@"
38 | #define APP_INFO_PATH "@CMAKE_INSTALL_FULL_INFODIR@"
39 | #define APP_LIB_PATH "@CMAKE_INSTALL_FULL_LIBDIR@"
--------------------------------------------------------------------------------
/src/ui/widgets/EMailEditorPage.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "EMailEditorPage.h"
30 |
31 | #include "ui_PlainTextEditor.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | EMailEditorPage::EMailEditorPage() {
36 | this->ui_->encodingLabel->setText("E-Mail");
37 | }
38 |
39 | EMailEditorPage::EMailEditorPage(const QString& file_path, QWidget* parent)
40 | : PlainTextEditorPage(file_path, parent) {
41 | this->ui_->encodingLabel->setText("E-Mail");
42 | }
43 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/ui/UISignalStation.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "UISignalStation.h"
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | std::unique_ptr UISignalStation::instance = nullptr;
34 |
35 | auto UISignalStation::GetInstance() -> UISignalStation* {
36 | if (instance == nullptr) {
37 | instance = std::unique_ptr(new UISignalStation());
38 | }
39 | return instance.get();
40 | }
41 |
42 | UISignalStation::UISignalStation() = default;
43 |
44 | } // namespace GpgFrontend::UI
45 |
--------------------------------------------------------------------------------
/src/core/function/SecureMemoryAllocator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | auto GF_CORE_EXPORT SMAMalloc(size_t size) -> void *;
34 |
35 | auto GF_CORE_EXPORT SMARealloc(void *ptr, size_t size) -> void *;
36 |
37 | void GF_CORE_EXPORT SMAFree(void *ptr);
38 |
39 | auto GF_CORE_EXPORT SMASecMalloc(size_t size) -> void *;
40 |
41 | auto GF_CORE_EXPORT SMASecRealloc(void *ptr, size_t size) -> void *;
42 |
43 | void GF_CORE_EXPORT SMASecFree(void *ptr);
44 |
45 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/CacheObject.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "CacheObject.h"
30 |
31 | #include "core/function/CacheManager.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | CacheObject::CacheObject(QString cache_name)
36 | : cache_name_(std::move(cache_name)) {
37 | this->QJsonDocument::operator=(
38 | CacheManager::GetInstance().LoadDurableCache(cache_name_));
39 | }
40 |
41 | CacheObject::~CacheObject() {
42 | CacheManager::GetInstance().SaveDurableCache(cache_name_, *this);
43 | }
44 |
45 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/CacheObject.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | class GF_CORE_EXPORT CacheObject : public QJsonDocument {
34 | public:
35 | /**
36 | * @brief Construct a new Cache Object object
37 | *
38 | * @param cache_name
39 | */
40 | explicit CacheObject(QString cache_name);
41 |
42 | /**
43 | * @brief Destroy the Cache Object object
44 | *
45 | */
46 | ~CacheObject();
47 |
48 | private:
49 | QString cache_name_; ///<
50 | };
51 |
52 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/sdk/GFSDKLog.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GFSDKLog.h"
30 |
31 | #include
32 |
33 | Q_LOGGING_CATEGORY(module, "module")
34 |
35 | void GFModuleLogTrace(const char* l) { qCDebug(module) << QString(l); }
36 |
37 | void GFModuleLogDebug(const char* l) { qCDebug(module) << QString(l); }
38 |
39 | void GFModuleLogInfo(const char* l) { qCInfo(module) << QString(l); }
40 |
41 | void GFModuleLogWarn(const char* l) { qCWarning(module) << QString(l); }
42 |
43 | void GFModuleLogError(const char* l) { qCCritical(module) << QString(l); }
44 |
--------------------------------------------------------------------------------
/src/ui/widgets/TOFUInfoPage.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | /**
36 | * @brief
37 | *
38 | */
39 | class TOFUInfoPage : public QWidget {
40 | Q_OBJECT
41 | public:
42 | /**
43 | * @brief Construct a new TOFUInfoPage object
44 | *
45 | * @param tofu_info
46 | * @param parent
47 | */
48 | explicit TOFUInfoPage(const GpgTOFUInfo &tofu_info,
49 | QWidget *parent = nullptr);
50 | };
51 | } // namespace GpgFrontend::UI
52 |
--------------------------------------------------------------------------------
/src/core/model/GpgRecipient.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | struct GF_CORE_EXPORT GpgRecipient {
36 | /* The key ID of key for which the text was encrypted. */
37 | QString keyid;
38 |
39 | /* The public key algorithm of the recipient key. */
40 | QString pubkey_algo;
41 |
42 | /* The status of the recipient. */
43 | GpgError status;
44 |
45 | GpgRecipient();
46 |
47 | explicit GpgRecipient(gpgme_recipient_t r);
48 | };
49 |
50 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/utils/CacheUtils.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "CacheUtils.h"
30 |
31 | #include "core/function/CacheManager.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | void SetCacheValue(const QString& key, QString value) {
36 | CacheManager::GetInstance().SaveCache(key, std::move(value));
37 | }
38 |
39 | auto GetCacheValue(const QString& key) -> QString {
40 | return CacheManager::GetInstance().LoadCache(key);
41 | }
42 |
43 | void ResetCacheValue(const QString& key) {
44 | CacheManager::GetInstance().ResetCache(key);
45 | }
46 |
47 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021-2024 Saturneric
2 | #
3 | # This file is part of GpgFrontend.
4 | #
5 | # GpgFrontend is free software: you can redistribute it and/or modify
6 | # it under the terms of the GNU General Public License as published by
7 | # the Free Software Foundation, either version 3 of the License, or
8 | # (at your option) any later version.
9 | #
10 | # GpgFrontend is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | # GNU General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU General Public License
16 | # along with GpgFrontend. If not, see .
17 | #
18 | # The initial version of the source code is inherited from
19 | # the gpg4usb project, which is under GPL-3.0-or-later.
20 | #
21 | # All the source code of GpgFrontend was modified and released by
22 | # Saturneric starting on May 12, 2021.
23 | #
24 | # SPDX-License-Identifier: GPL-3.0-or-later
25 |
26 | # Set configure for test
27 | include(CTest)
28 | enable_testing()
29 | find_package(GTest REQUIRED)
30 |
31 | aux_source_directory(./core TEST_SOURCE)
32 | aux_source_directory(. TEST_SOURCE)
33 |
34 | # define test library
35 | register_library(test LIBRARY_TARGET ${TEST_SOURCE})
36 |
37 | # set up pch
38 | target_precompile_headers(${LIBRARY_TARGET} PUBLIC GpgFrontendTest.h)
39 |
40 | # link options
41 | target_link_libraries(${LIBRARY_TARGET} PRIVATE GTest::gtest)
42 | target_link_libraries(${LIBRARY_TARGET} PRIVATE gf_core)
43 |
44 | add_test(AllTestsInGpgFrontend ${LIBRARY_TARGET})
45 |
--------------------------------------------------------------------------------
/src/ui/dialog/keypair_details/KeyDetailsDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/function/gpg/GpgContext.h"
32 | #include "core/typedef/GpgTypedef.h"
33 | #include "ui/dialog/GeneralDialog.h"
34 |
35 | namespace GpgFrontend::UI {
36 |
37 | class KeyDetailsDialog : public GeneralDialog {
38 | Q_OBJECT
39 |
40 | public:
41 | explicit KeyDetailsDialog(int channel, const GpgKeyPtr& key,
42 | QWidget* parent = nullptr);
43 |
44 | private:
45 | QTabWidget* tab_widget_{};
46 | int current_gpg_context_channel_;
47 | };
48 | } // namespace GpgFrontend::UI
49 |
--------------------------------------------------------------------------------
/src/sdk/GFSDKExtra.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GFSDKExtra.h"
30 |
31 | #include
32 | #include
33 |
34 | #include "private/GFSDKPrivat.h"
35 |
36 | auto GFCompareSoftwareVersion(const char *current_version,
37 | const char *latest_version) -> int {
38 | return GpgFrontend::GFCompareSoftwareVersion(GFUnStrDup(current_version),
39 | GFUnStrDup(latest_version));
40 | }
41 | auto GFHttpRequestUserAgent() -> const char * {
42 | return GFStrDup(GpgFrontend::GetHttpRequestUserAgent());
43 | }
--------------------------------------------------------------------------------
/src/ui/function/SetOwnerTrustLevel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | class SetOwnerTrustLevel : public QWidget {
36 | Q_OBJECT
37 | public:
38 | /**
39 | * @brief Set the Owner Trust Level object
40 | *
41 | * @param parent
42 | */
43 | explicit SetOwnerTrustLevel(QWidget* parent);
44 |
45 | /**
46 | * @brief
47 | *
48 | * @param key_id
49 | * @return true
50 | * @return false
51 | */
52 | auto Exec(int channel, const GpgAbstractKeyPtr& key) -> bool;
53 | };
54 |
55 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/sdk/GFSDKUI.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GFSDKUIModel.h"
32 |
33 | extern "C" {
34 |
35 | auto GF_SDK_EXPORT GFUIMountEntry(const char* id, MetaData** meta_data_array,
36 | int meta_data_array_size,
37 | QObjectFactory factory) -> int;
38 |
39 | auto GF_SDK_EXPORT GFUICreateGUIObject(QObjectFactory factory, void* data)
40 | -> void*;
41 |
42 | auto GF_SDK_EXPORT GFUIMainWindowPtr() -> void*;
43 |
44 | auto GF_SDK_EXPORT GFUIActiveWindowPtr() -> void*;
45 |
46 | auto GF_SDK_EXPORT GFUIShowDialog(void* dialog, void* parent) -> bool;
47 | }
--------------------------------------------------------------------------------
/src/core/model/GpgEncryptResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | class GF_CORE_EXPORT GpgEncryptResult {
36 | public:
37 | auto IsGood() -> bool;
38 |
39 | auto GetRaw() -> gpgme_encrypt_result_t;
40 |
41 | auto InvalidRecipients() -> QContainer>;
42 |
43 | explicit GpgEncryptResult(gpgme_encrypt_result_t);
44 |
45 | GpgEncryptResult();
46 |
47 | virtual ~GpgEncryptResult();
48 |
49 | private:
50 | QSharedPointer result_ref_ = nullptr; ///<
51 | };
52 |
53 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/GpgSignResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | class GF_CORE_EXPORT GpgSignResult {
36 | public:
37 | auto IsGood() -> bool;
38 |
39 | auto GetRaw() -> gpgme_sign_result_t;
40 |
41 | auto HashAlgo() -> QString;
42 |
43 | auto InvalidSigners() -> QContainer>;
44 |
45 | explicit GpgSignResult(gpgme_sign_result_t);
46 |
47 | GpgSignResult();
48 |
49 | virtual ~GpgSignResult();
50 |
51 | private:
52 | QSharedPointer result_ref_ = nullptr; ///<
53 | };
54 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/utils/CacheUtils.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | /**
34 | * @brief set a temp cache under a certain key
35 | *
36 | */
37 | void GF_CORE_EXPORT SetCacheValue(const QString &key, QString value);
38 |
39 | /**
40 | * @brief after get the temp cache, its value will be imediately ease in
41 | * storage
42 | *
43 | * @return QString
44 | */
45 | auto GF_CORE_EXPORT GetCacheValue(const QString &key) -> QString;
46 |
47 | /**
48 | * @brief imediately ease temp cache in storage
49 | *
50 | * @return QString
51 | */
52 | void GF_CORE_EXPORT ResetCacheValue(const QString &);
53 |
54 | } // namespace GpgFrontend
55 |
--------------------------------------------------------------------------------
/src/core/model/GpgDecryptResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/GpgRecipient.h"
32 | #include "core/typedef/GpgTypedef.h"
33 |
34 | namespace GpgFrontend {
35 |
36 | class GF_CORE_EXPORT GpgDecryptResult {
37 | public:
38 | auto IsGood() -> bool;
39 |
40 | auto GetRaw() -> gpgme_decrypt_result_t;
41 |
42 | auto Recipients() -> QContainer;
43 |
44 | explicit GpgDecryptResult(gpgme_decrypt_result_t);
45 |
46 | GpgDecryptResult();
47 |
48 | virtual ~GpgDecryptResult();
49 |
50 | private:
51 | QSharedPointer result_ref_ = nullptr; ///<
52 | };
53 |
54 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/GpgVerifyResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/GpgSignature.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | class GF_CORE_EXPORT GpgVerifyResult {
36 | public:
37 | [[nodiscard]] auto IsGood() const -> bool;
38 |
39 | [[nodiscard]] auto GetRaw() const -> gpgme_verify_result_t;
40 |
41 | [[nodiscard]] auto GetSignature() const -> QContainer;
42 |
43 | explicit GpgVerifyResult(gpgme_verify_result_t);
44 |
45 | GpgVerifyResult();
46 |
47 | virtual ~GpgVerifyResult();
48 |
49 | private:
50 | QSharedPointer result_ref_ = nullptr; ///<
51 | };
52 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/sdk/GFSDKBasicModel.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 | #include
33 |
34 | extern "C" {
35 |
36 | // MAX STRLEN -> 64 MB
37 | constexpr int32_t kGfStrlenMax = static_cast(1024 * 1024 * 32);
38 |
39 | using GFCommandExecuteCallback = void (*)(void* data, int errcode,
40 | const char* out, const char* err);
41 |
42 | using GFCommandExecuteContext = struct {
43 | char* cmd;
44 | int32_t argc;
45 | char** argv;
46 | GFCommandExecuteCallback cb;
47 | void* data; ///< must free by user
48 | };
49 |
50 | using GFTranslatorDataReader = int (*)(const char* locale, char** data);
51 | }
--------------------------------------------------------------------------------
/src/ui/widgets/ModuleListView.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/module/Module.h"
32 |
33 | namespace GpgFrontend::UI {
34 | class ModuleListView : public QListView {
35 | Q_OBJECT
36 | public:
37 | explicit ModuleListView(QWidget *parent);
38 |
39 | auto GetCurrentModuleID() -> Module::ModuleIdentifier;
40 |
41 | signals:
42 | void SignalSelectModule(Module::ModuleIdentifier);
43 |
44 | protected:
45 | void currentChanged(const QModelIndex ¤t,
46 | const QModelIndex &previous) override;
47 |
48 | private:
49 | QStandardItemModel *model_;
50 |
51 | void load_module_information();
52 | };
53 | }; // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/core/function/result_analyse/GpgResultAnalyse.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "GpgResultAnalyse.h"
30 |
31 | auto GpgFrontend::GpgResultAnalyse::GetResultReport() const -> const QString {
32 | return *stream_.string();
33 | }
34 |
35 | auto GpgFrontend::GpgResultAnalyse::GetStatus() const -> int { return status_; }
36 |
37 | void GpgFrontend::GpgResultAnalyse::setStatus(int m_status) {
38 | if (m_status < status_) status_ = m_status;
39 | }
40 |
41 | void GpgFrontend::GpgResultAnalyse::Analyse() {
42 | if (!analysed_) {
43 | doAnalyse();
44 | analysed_ = true;
45 | }
46 | }
47 |
48 | auto GpgFrontend::GpgResultAnalyse::GetChannel() const -> int {
49 | return current_gpg_context_channel_;
50 | }
51 |
--------------------------------------------------------------------------------
/ui/GnuPGConfigManagerDialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | GnuPGConfigManagerDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 605
10 | 621
11 |
12 |
13 |
14 | GnuPG Config Manager
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | TextLabel
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | PushButton
38 |
39 |
40 |
41 |
42 |
43 |
44 | Qt::Vertical
45 |
46 |
47 |
48 | 20
49 | 40
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/src/ui/dialog/SubKeyPicker.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 | #include "ui/dialog/GeneralDialog.h"
33 | #include "ui/widgets/KeyTreeView.h"
34 |
35 | namespace GpgFrontend::UI {
36 | class SubKeyPicker : public GeneralDialog {
37 | Q_OBJECT
38 | public:
39 | explicit SubKeyPicker(int channel, GpgAbstractKeyPtrList keys,
40 | QWidget* parent);
41 |
42 | [[nodiscard]] auto GetSelectedKeyWithFlags() const -> GpgAbstractKeyPtrList;
43 |
44 | private:
45 | int channel_;
46 | KeyTreeView* tree_view_;
47 | QPushButton* confirm_btn_;
48 | QPushButton* cancel_btn_;
49 | GpgAbstractKeyPtrList buffered_keys_; ///<
50 | };
51 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/ui/function/KeyGenerateHelper.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/GpgKeyGenerateInfo.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | auto SearchAlgoByName(const QString& name,
36 | const QContainer& algos) -> QContainer;
37 |
38 | auto GetAlgoByNameAndKeyLength(const QString& name, int key_length,
39 | const QContainer& algos)
40 | -> std::tuple;
41 |
42 | auto GetAlgoByName(const QString& name, const QContainer& algos)
43 | -> std::tuple;
44 |
45 | void SetKeyLengthComboxBoxByAlgo(QComboBox* combo,
46 | const QContainer& algos);
47 | } // namespace GpgFrontend::UI
48 |
--------------------------------------------------------------------------------
/src/ui/dialog/RevocationOptionsDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "ui/dialog/GeneralDialog.h"
32 |
33 | class Ui_RevocationOptionsDialog;
34 |
35 | namespace GpgFrontend::UI {
36 | class RevocationOptionsDialog : public GeneralDialog {
37 | Q_OBJECT
38 | public:
39 | explicit RevocationOptionsDialog(const QStringList& codes, QWidget* parent);
40 |
41 | [[nodiscard]] auto Code() const -> int;
42 |
43 | [[nodiscard]] auto Text() const -> QString;
44 |
45 | signals:
46 | void SignalRevokeOptionAccepted(int code, QString text);
47 |
48 | private:
49 | QSharedPointer ui_; ///<
50 | int code_;
51 | QString text_;
52 |
53 | void slot_button_box_accepted();
54 | };
55 |
56 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/ui/GpgFrontendApplication.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | class GF_UI_EXPORT GpgFrontendApplication : public QApplication {
34 | Q_OBJECT
35 | public:
36 | /**
37 | * @brief Construct a new GpgFrontend Application object
38 | *
39 | * @param argc
40 | * @param argv
41 | */
42 | explicit GpgFrontendApplication(int &argc, char *argv[]);
43 |
44 | /**
45 | * @brief Destroy the GpgFrontend Application object
46 | *
47 | */
48 | ~GpgFrontendApplication() override = default;
49 |
50 | protected:
51 | /**
52 | * @brief
53 | *
54 | * @param event
55 | * @return bool
56 | */
57 | bool notify(QObject *receiver, QEvent *event) override;
58 | };
59 |
60 | } // namespace GpgFrontend::UI
61 |
--------------------------------------------------------------------------------
/src/ui/GpgFrontendUIInit.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | /**
34 | * @brief
35 | *
36 | */
37 | void GF_UI_EXPORT PreInitGpgFrontendUI();
38 |
39 | /**
40 | * @brief init the UI library
41 | *
42 | */
43 | void GF_UI_EXPORT InitGpgFrontendUI(QApplication *);
44 |
45 | /**
46 | * @brief
47 | *
48 | */
49 | void GF_UI_EXPORT WaitingAllInitializationFinished();
50 |
51 | /**
52 | * @brief init the UI library
53 | *
54 | */
55 | void GF_UI_EXPORT DestroyGpgFrontendUI();
56 |
57 | /**
58 | * @brief run main window
59 | */
60 | auto GF_UI_EXPORT RunGpgFrontendUI(QApplication *) -> int;
61 |
62 | /**
63 | * @brief
64 | *
65 | */
66 | void GF_UI_EXPORT InitModulesTranslations();
67 |
68 | }; // namespace GpgFrontend::UI
69 |
--------------------------------------------------------------------------------
/cmake/FindPackageMessage.cmake:
--------------------------------------------------------------------------------
1 | # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 | # file Copyright.txt or https://cmake.org/licensing for details.
3 |
4 | #[=======================================================================[.rst:
5 | FindPackageMessage
6 | ------------------
7 |
8 | .. code-block:: cmake
9 |
10 | find_package_message( "message for user" "find result details")
11 |
12 | This function is intended to be used in FindXXX.cmake modules files.
13 | It will print a message once for each unique find result. This is
14 | useful for telling the user where a package was found. The first
15 | argument specifies the name (XXX) of the package. The second argument
16 | specifies the message to display. The third argument lists details
17 | about the find result so that if they change the message will be
18 | displayed again. The macro also obeys the QUIET argument to the
19 | find_package command.
20 |
21 | Example:
22 |
23 | .. code-block:: cmake
24 |
25 | if(X11_FOUND)
26 | find_package_message(X11 "Found X11: ${X11_X11_LIB}"
27 | "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
28 | else()
29 | ...
30 | endif()
31 | #]=======================================================================]
32 |
33 | function(find_package_message pkg msg details)
34 | # Avoid printing a message repeatedly for the same find result.
35 | if(NOT ${pkg}_FIND_QUIETLY)
36 | string(REPLACE "\n" "" details "${details}")
37 | set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
38 | if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
39 | # The message has not yet been printed.
40 | message(STATUS "${msg}")
41 |
42 | # Save the find details in the cache to avoid printing the same
43 | # message again.
44 | set("${DETAILS_VAR}" "${details}"
45 | CACHE INTERNAL "Details about finding ${pkg}")
46 | endif()
47 | endif()
48 | endfunction()
--------------------------------------------------------------------------------
/src/Initialize.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GpgFrontendContext.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | /**
36 | * @brief
37 | *
38 | * @param p_ctx
39 | */
40 | void PreInit(const GFCxtWPtr &p_ctx);
41 |
42 | /**
43 | * @brief init global PATH env
44 | *
45 | */
46 | void InitGlobalPathEnv();
47 |
48 | /**
49 | * @brief
50 | *
51 | */
52 | void InitLocale();
53 |
54 | /**
55 | * @brief
56 | *
57 | * @param args
58 | */
59 | void InitGlobalBasicEnv(const GFCxtWPtr &, bool);
60 |
61 | /**
62 | * @brief
63 | *
64 | * @param p_ctx
65 | */
66 | void InitGlobalBasicEnvSync(const GFCxtWPtr &p_ctx);
67 |
68 | /**
69 | * @brief
70 | *
71 | * @param p_ctx
72 | */
73 | void ShutdownGlobalBasicEnv(const GFCxtWPtr &p_ctx);
74 |
75 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/typedef/CoreTypedef.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
34 | template
35 | using QContainer = QVector;
36 | #else
37 | template
38 | using QContainer = QList;
39 | #endif
40 |
41 | using GFError = uint32_t;
42 | using ByteArray = QByteArray; ///<
43 | using BypeArrayRef = ByteArray&; ///<
44 | using BypeArrayConstRef = const ByteArray&; ///<
45 | using StringArgsPtr = QStringList; ///<
46 | using StringArgsRef = QStringList&; ///<
47 |
48 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
49 | #define QCS2QSL(vec) (QStringList(vec.begin(), vec.end()))
50 | #else
51 | #define QCS2QSL(vec) (vec)
52 | #endif
53 |
54 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/thread/FileReadTask.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/GpgFrontendCore.h"
32 | #include "core/thread/Task.h"
33 |
34 | namespace GpgFrontend::UI {
35 |
36 | /**
37 | * @brief
38 | *
39 | */
40 | class GF_CORE_EXPORT FileReadTask : public GpgFrontend::Thread::Task {
41 | Q_OBJECT
42 | public:
43 | explicit FileReadTask(QString path);
44 |
45 | virtual ~FileReadTask() override;
46 |
47 | int Run() override;
48 |
49 | signals:
50 | void SignalFileBytesRead(QByteArray bytes);
51 | void SignalFileBytesReadEnd();
52 | void SignalFileBytesReadNext();
53 |
54 | private:
55 | QString read_file_path_;
56 | QFile target_file_;
57 | QEventLoop looper;
58 |
59 | private slots:
60 | void slot_read_bytes();
61 | };
62 |
63 | } // namespace GpgFrontend::UI
64 |
--------------------------------------------------------------------------------
/src/ui/dialog/SignersPicker.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 | #include "ui/dialog//GeneralDialog.h"
33 |
34 | namespace GpgFrontend::UI {
35 |
36 | class KeyList;
37 |
38 | /**
39 | * @brief
40 | *
41 | */
42 | class SignersPicker : public GeneralDialog {
43 | Q_OBJECT
44 |
45 | public:
46 | /**
47 | * @brief Construct a new Signers Picker object
48 | *
49 | * @param parent
50 | */
51 | explicit SignersPicker(int channel, QWidget* parent = nullptr);
52 |
53 | /**
54 | * @brief Get the Checked Signers object
55 | *
56 | * @return GpgFrontend::KeyIdArgsListPtr
57 | */
58 | auto GetCheckedSigners() -> GpgAbstractKeyPtrList;
59 |
60 | private:
61 | KeyList* key_list_; ///<
62 | };
63 |
64 | } // namespace GpgFrontend::UI
65 |
--------------------------------------------------------------------------------
/src/core/function/basic/ChannelObject.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "ChannelObject.h"
30 |
31 | namespace GpgFrontend {
32 |
33 | ChannelObject::ChannelObject() noexcept = default;
34 |
35 | ChannelObject::ChannelObject(int channel, QString type)
36 | : channel_(channel), type_(std::move(type)) {}
37 |
38 | #ifdef DEBUG
39 | ChannelObject::~ChannelObject() noexcept {
40 | LOG_D() << "Releasing Channel Object: " << this->type_;
41 | }
42 | #else
43 | ChannelObject::~ChannelObject() noexcept = default;
44 | #endif
45 |
46 | void ChannelObject::SetChannel(int channel) { this->channel_ = channel; }
47 |
48 | auto ChannelObject::GetChannel() const -> int { return channel_; }
49 |
50 | auto ChannelObject::GetDefaultChannel() -> int {
51 | return kGpgFrontendDefaultChannel;
52 | }
53 |
54 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/ui/widgets/GRTTreeView.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | class GRTTreeView : public QTreeView {
34 | Q_OBJECT
35 | public:
36 | /**
37 | * @brief Construct a new GRTTreeView object
38 | *
39 | * @param parent
40 | */
41 | explicit GRTTreeView(QWidget* parent);
42 |
43 | /**
44 | * @brief Destroy the GRTTreeView object
45 | *
46 | */
47 | virtual ~GRTTreeView() override;
48 |
49 | protected:
50 | /**
51 | * @brief
52 | *
53 | * @param event
54 | */
55 | void paintEvent(QPaintEvent* event) override;
56 |
57 | private slots:
58 |
59 | /**
60 | * @brief
61 | *
62 | */
63 | void slot_adjust_column_widths();
64 |
65 | private:
66 | bool initial_resize_done_ = false;
67 | };
68 |
69 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/core/model/GpgGenerateKeyResult.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 |
33 | #include "core/GpgFrontendCore.h"
34 |
35 | namespace GpgFrontend {
36 |
37 | class GF_CORE_EXPORT GpgGenerateKeyResult {
38 | public:
39 | auto IsGood() -> bool;
40 |
41 | auto GetFingerprint() -> QString const;
42 |
43 | explicit GpgGenerateKeyResult(gpgme_genkey_result_t);
44 |
45 | GpgGenerateKeyResult();
46 |
47 | GpgGenerateKeyResult(const GpgGenerateKeyResult &);
48 |
49 | auto operator=(const GpgGenerateKeyResult &) -> GpgGenerateKeyResult &;
50 |
51 | virtual ~GpgGenerateKeyResult();
52 |
53 | private:
54 | using ResultRefHandler = QSharedPointer; ///<
55 |
56 | ResultRefHandler result_ref_ = nullptr; ///<
57 | };
58 |
59 | } // namespace GpgFrontend
60 |
--------------------------------------------------------------------------------
/src/ui/dialog/key_generate/GenerateCardKeyDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "ui/dialog/GeneralDialog.h"
32 |
33 | class Ui_GenerateCardKeyDialog;
34 |
35 | namespace GpgFrontend::UI {
36 | class GenerateCardKeyDialog : public GeneralDialog {
37 | Q_OBJECT
38 |
39 | public:
40 | /**
41 | * @brief Construct a new Generate Card Key Dialog object
42 | *
43 | * @param parent
44 | */
45 | explicit GenerateCardKeyDialog(int channel_, const QString& serial_number,
46 | QWidget* parent);
47 |
48 | private:
49 | /**
50 | * @brief
51 | *
52 | */
53 | void slot_generate_card_key();
54 |
55 | private:
56 | int channel_;
57 | const QString& serial_number_;
58 | QSharedPointer ui_; ///<
59 | };
60 | }; // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project
2 | src/GpgFrontend.h
3 | src/GpgFrontendBuildInfo.h
4 | src/GpgFrontendBuildInstallInfo.h
5 | src/core/GpgFrontendCoreExport.h
6 | src/ui/GpgFrontendUIExport.h
7 | src/test/GpgFrontendTestExport.h
8 | src/sdk/GFSDKExport.h
9 | src/sdk/GFSDKBuildInfo.h
10 | docs/
11 |
12 | # gettext
13 | *.mo
14 |
15 | #Vscode
16 | .vscode/*
17 |
18 | #CLion
19 | .idea/*
20 |
21 | # macOS
22 | .DS_Store
23 |
24 | # Clangd
25 | .cache/
26 |
27 |
28 | # C++
29 |
30 | # Prerequisites
31 | *.d
32 |
33 | # Compiled Object files
34 | *.slo
35 | *.lo
36 | *.o
37 | *.obj
38 |
39 | # Precompiled Headers
40 | *.gch
41 | *.pch
42 |
43 | # Compiled Dynamic libraries
44 | *.so
45 | *.dylib
46 | # *.dll
47 |
48 | # Fortran module files
49 | *.mod
50 | *.smod
51 |
52 | # Compiled Static libraries
53 | *.lai
54 | *.la
55 | *.a
56 | *.lib
57 |
58 | # Executables
59 | # *.exe
60 | *.out
61 | *.app
62 |
63 |
64 |
65 |
66 |
67 | # CMake
68 |
69 | # CLion
70 | cmake-build-debug/
71 | cmake-build-release/
72 |
73 | # Unix
74 | build/
75 |
76 | # General
77 | CMakeLists.txt.user
78 | CMakeCache.txt
79 | CMakeFiles
80 | CMakeScripts
81 | Testing
82 | Makefile
83 | cmake_install.cmake
84 | install_manifest.txt
85 | compile_commands.json
86 | CTestTestfile.cmake
87 | _deps
88 |
89 |
90 |
91 |
92 | # Qt
93 |
94 | # Qt-es
95 | object_script.*.Release
96 | object_script.*.Debug
97 | *_plugin_import.cpp
98 | /.qmake.cache
99 | /.qmake.stash
100 | *.pro.user
101 | *.pro.user.*
102 | *.qbs.user
103 | *.qbs.user.*
104 | *.moc
105 | moc_*.cpp
106 | moc_*.h
107 | qrc_*.cpp
108 | ui_*.h
109 | *.qmlc
110 | *.jsc
111 | Makefile*
112 | *build-*
113 | *.qm
114 | *.prl
115 |
116 | # Qt unit tests
117 | target_wrapper.*
118 |
119 | # QtCreator
120 | *.autosave
121 |
122 |
123 |
124 |
125 | #Flatpak
126 | .flatpak-builder
127 | .flatpak-builder/
128 |
129 |
130 |
131 |
132 |
133 | #VSCode
134 | .vscode
--------------------------------------------------------------------------------
/src/core/function/result_analyse/GpgSignResultAnalyse.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GpgResultAnalyse.h"
32 | #include "core/model/GpgSignResult.h"
33 |
34 | namespace GpgFrontend {
35 |
36 | /**
37 | * @brief
38 | *
39 | */
40 | class GF_CORE_EXPORT GpgSignResultAnalyse : public GpgResultAnalyse {
41 | Q_OBJECT
42 | public:
43 | /**
44 | * @brief Construct a new Sign Result Analyse object
45 | *
46 | * @param error
47 | * @param result
48 | */
49 | explicit GpgSignResultAnalyse(int channel, GpgError error,
50 | GpgSignResult result);
51 |
52 | protected:
53 | /**
54 | * @brief
55 | *
56 | */
57 | void doAnalyse() override;
58 |
59 | private:
60 | GpgError error_; ///<
61 |
62 | GpgSignResult result_; ///<
63 | };
64 |
65 | } // namespace GpgFrontend
66 |
--------------------------------------------------------------------------------
/src/core/struct/cache_object/FavoriteKeyPairsByKeyDatabaseCO.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | struct FavoriteKeyPairsByKeyDatabaseCO {
34 | QStringList key_ids;
35 |
36 | FavoriteKeyPairsByKeyDatabaseCO() = default;
37 |
38 | explicit FavoriteKeyPairsByKeyDatabaseCO(const QJsonObject& j) {
39 | if (!j.contains("key_ids") || !j["key_ids"].isArray()) return;
40 | for (const auto& i : j["key_ids"].toArray()) {
41 | if (!i.isString()) continue;
42 |
43 | key_ids.append(i.toString());
44 | }
45 | }
46 |
47 | [[nodiscard]] auto ToJson() const -> QJsonObject {
48 | QJsonObject j;
49 | auto a = QJsonArray();
50 | for (const auto& k : key_ids) {
51 | a.push_back(k);
52 | }
53 | j["key_ids"] = a;
54 | return j;
55 | }
56 | };
57 |
58 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/ui/dialog/controller/ModuleControllerDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/module/Module.h"
32 | #include "ui/dialog/GeneralDialog.h"
33 |
34 | class Ui_ModuleControllerDialog;
35 |
36 | namespace GpgFrontend::UI {
37 |
38 | class ModuleListView;
39 |
40 | class ModuleControllerDialog : public GeneralDialog {
41 | Q_OBJECT
42 | public:
43 | /**
44 | * @brief Construct a new Module Controller Dialog object
45 | *
46 | * @param parent
47 | */
48 | explicit ModuleControllerDialog(QWidget* parent);
49 |
50 | private slots:
51 | /**
52 | * @brief
53 | *
54 | */
55 | void slot_load_module_details(Module::ModuleIdentifier);
56 |
57 | private:
58 | QSharedPointer ui_; ///<
59 | Module::ModuleManager* module_manager_;
60 | };
61 |
62 | } // namespace GpgFrontend::UI
63 |
--------------------------------------------------------------------------------
/src/core/function/result_analyse/GpgEncryptResultAnalyse.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "GpgResultAnalyse.h"
32 | #include "core/model/GpgEncryptResult.h"
33 |
34 | namespace GpgFrontend {
35 | /**
36 | * @brief
37 | *
38 | */
39 | class GF_CORE_EXPORT GpgEncryptResultAnalyse : public GpgResultAnalyse {
40 | Q_OBJECT
41 | public:
42 | /**
43 | * @brief Construct a new Encrypt Result Analyse object
44 | *
45 | * @param error
46 | * @param result
47 | */
48 | explicit GpgEncryptResultAnalyse(int channel, GpgError error,
49 | GpgEncryptResult result);
50 |
51 | protected:
52 | /**
53 | * @brief
54 | *
55 | */
56 | void doAnalyse() final;
57 |
58 | private:
59 | GpgError error_; ///<
60 | GpgEncryptResult result_; ///<
61 | };
62 | } // namespace GpgFrontend
63 |
--------------------------------------------------------------------------------
/src/core/GpgCoreInit.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/KeyDatabaseInfo.h"
32 |
33 | namespace GpgFrontend {
34 |
35 | struct CoreInitArgs {
36 | bool gather_external_gnupg_info;
37 | bool unit_test_mode;
38 | };
39 |
40 | /**
41 | * @brief
42 | *
43 | */
44 | void GF_CORE_EXPORT DestroyGpgFrontendCore();
45 |
46 | /**
47 | * @brief
48 | *
49 | */
50 | auto GF_CORE_EXPORT InitGpgFrontendCore(CoreInitArgs) -> int;
51 |
52 | /**
53 | * @brief
54 | *
55 | */
56 | void GF_CORE_EXPORT StartMonitorCoreInitializationStatus();
57 |
58 | /**
59 | * @brief
60 | *
61 | * @return true
62 | * @return false
63 | */
64 | auto GF_CORE_EXPORT InitGpgME() -> bool;
65 |
66 | /**
67 | * @brief
68 | *
69 | * @return true
70 | * @return false
71 | */
72 | auto GF_CORE_EXPORT InitBasicPath() -> bool;
73 |
74 | } // namespace GpgFrontend
75 |
--------------------------------------------------------------------------------
/src/ui/struct/UIMountPoint.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | struct UIMountPoint {
32 | QString id;
33 | QString entry_type;
34 | QMap meta_data_desc;
35 |
36 | UIMountPoint() = default;
37 |
38 | explicit UIMountPoint(const QJsonObject& j) {
39 | if (const auto v = j["id"]; v.isDouble()) {
40 | id = v.toString();
41 | }
42 | if (const auto v = j["entry_type"]; v.isDouble()) {
43 | entry_type = v.toString();
44 | }
45 | if (const auto v = j["meta_data_desc"]; v.isDouble()) {
46 | meta_data_desc = v.toVariant().toMap();
47 | }
48 | }
49 |
50 | [[nodiscard]] auto ToJson() const -> QJsonObject {
51 | QJsonObject j;
52 | j["id"] = id;
53 | j["entry_type"] = entry_type;
54 | j["meta_data_desc"] = QJsonObject::fromVariantMap(meta_data_desc);
55 |
56 | return j;
57 | }
58 | };
--------------------------------------------------------------------------------
/src/ui/widgets/HelpPage.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend::UI {
32 |
33 | /**
34 | * @brief
35 | *
36 | */
37 | class HelpPage : public QWidget {
38 | Q_OBJECT
39 | public:
40 | /**
41 | * @brief Construct a new Help Page object
42 | *
43 | * @param path
44 | * @param parent
45 | */
46 | explicit HelpPage(const QString& path, QWidget* parent = nullptr);
47 |
48 | /**
49 | * @brief Get the Browser object
50 | *
51 | * @return QTextBrowser*
52 | */
53 | QTextBrowser* GetBrowser();
54 |
55 | public slots:
56 |
57 | /**
58 | * @brief
59 | *
60 | * @param url
61 | */
62 | void slot_open_url(const QUrl& url);
63 |
64 | private:
65 | QTextBrowser* browser_; ///< The textbrowser of the tab
66 | QUrl localized_help(const QUrl& path);
67 | };
68 |
69 | } // namespace GpgFrontend::UI
70 |
--------------------------------------------------------------------------------
/src/ui/dialog/keypair_details/KeyPairPhotosTab.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/function/gpg/GpgAttributeHelper.h"
32 | #include "core/typedef/GpgTypedef.h"
33 |
34 | class Ui_KeyPairPhotosTab;
35 |
36 | namespace GpgFrontend::UI {
37 | class KeyPairPhotosTab : public QWidget {
38 | Q_OBJECT
39 |
40 | public:
41 | explicit KeyPairPhotosTab(int channel, GpgKeyPtr key,
42 | const QContainer& infos,
43 | QWidget* parent = nullptr);
44 | ~KeyPairPhotosTab() override;
45 |
46 | private slots:
47 |
48 | void slot_view_photo();
49 |
50 | private:
51 | QSharedPointer ui_;
52 | int current_gpg_context_channel_;
53 | GpgKeyPtr key_;
54 | QContainer infos_;
55 | QContainer jpg_infos_;
56 | };
57 |
58 | } // namespace GpgFrontend::UI
--------------------------------------------------------------------------------
/src/ui/dialog/WaitingDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "ui/dialog/GeneralDialog.h"
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | /**
36 | * @brief
37 | *
38 | */
39 | class WaitingDialog : public GeneralDialog {
40 | Q_OBJECT
41 | public:
42 | /**
43 | * @brief Construct a new Waiting Dialog object
44 | *
45 | * @param title
46 | * @param parent
47 | */
48 | explicit WaitingDialog(const QString& title, bool range,
49 | QWidget* parent = nullptr);
50 |
51 | public slots:
52 |
53 | /**
54 | * @brief max 100, min 0
55 | *
56 | */
57 | void SlotUpdateValue(int value);
58 |
59 | signals:
60 |
61 | /**
62 | * @brief
63 | *
64 | * @param value
65 | */
66 | void SignalUpdateValue(int value);
67 |
68 | private:
69 | QProgressBar* pb_;
70 | };
71 |
72 | } // namespace GpgFrontend::UI
73 |
--------------------------------------------------------------------------------
/src/GpgFrontendBuildInfo.h.in:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | /**
32 | * Logic Version (*.*.*)
33 | */
34 | #define VERSION_MAJOR "@CMAKE_PROJECT_VERSION_MAJOR@"
35 | #define VERSION_MINOR "@CMAKE_PROJECT_VERSION_MINOR@"
36 | #define VERSION_PATCH "@CMAKE_PROJECT_VERSION_PATCH@"
37 |
38 | /**
39 | * Code Version (According to Git)
40 | */
41 | #define GIT_BRANCH_NAME "@GIT_BRANCH_NAME@"
42 | #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
43 |
44 | /**
45 | * Generated Information (According to CMake)
46 | */
47 | #define BUILD_VERSION "@BUILD_VERSION@"
48 | #define GIT_VERSION "@GIT_VERSION@"
49 |
50 | /**
51 | * Build Information
52 | */
53 | #define BUILD_FLAG "@BUILD_FLAG@"
54 | #define BUILD_TIMESTAMP "@BUILD_TIMESTAMP@"
55 | #define APP_INSTALL_FLAG "@APP_INSTALL_FLAG@"
56 |
57 | /**
58 | * @brief Network
59 | *
60 | */
61 | #define HTTP_REQUEST_USER_AGENT "@HTTP_REQUEST_USER_AGENT@"
--------------------------------------------------------------------------------
/resource/lfs/test/data/tester.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PGP PRIVATE KEY BLOCK-----
2 |
3 | lQOXBGV9TBkBCACvNttc8LaFpNesK9os5eV8CVCNgAFqFMC5o5L5gNFldQ3EiRgE
4 | m1tZWKTfPsU8Jn6TrGz3M5I4JGcGx7Neqe24uShnjocvfeTXFd8tNZliimESlh3Q
5 | lLTSOr5pO8Qq6gtwhjyh08Ctj2iryvXRvK5D3a81DrAOaDMQ0PsZa4F2PZJ+CSN1
6 | HOE859Iq03zGHqdG5OAfx7ohfYL7NhHfovyc6+/iKaSbRoNIasBXzfOqwxLR3084
7 | 7CseitNZf3Z2xcnC3h/1TxoGSNeiYpvt67wXPOKc5XNJ6x/AERsytyZv3llONvuR
8 | wOfJCAv1J+rt+kYCV39lLn5z8MAG+kyaDtnRABEBAAEAB/de70+BgWtj6M0dcc/k
9 | 7oDzk+3GvXSxZaKG8yTPdgdUUaKuum6pEFmOhNklnNKBT4TbFAchFHBFZclCLdyi
10 | OLBKm7L+E9vA1RWznxuCrhKjBxdRsBoMydtaN+SztWO0sjCV53sys5PSdmw1qOKd
11 | oaifskhxwbjiwCfrFKWjlacFHluYZd6fr3T6ajOyPb/6F67Cy5HkhvBZouY2Cro/
12 | v6MiAWEHRYRQ7tc4RsVTjudpmcIHd/z0JR19KfLQxVVentygEI6syMRCtO1Yf1QM
13 | s6SWfTeODW0ij6IOm4atWxX2whV8wM3YkGmCiWkK+93zYTeR3KrF1Q90oz4uKr+E
14 | iXkEAMCtWEmWZWt0PxuTtZth3vie7YUemBn16W2Rs3X73iyW0AUh66cwD/xQSYR/
15 | bwCUU7wZb8CdoWvDYYxOQE7A2MOCpW9cXASAKL8XGrdeq7QTGWg22yCA/j4c5dWN
16 | +GozuC8vP5hrIdW6LPFFjpGmeLUuYLETBX7zd8Xg2kPn1HY5BADozEwF5MRiVXgC
17 | vzWqPHmGK23c7Sq1FTcwiCXnaChglX62KniBEEGKw1BkByJPzl8HbYBdw7n4tQDx
18 | kbl1bZIptaEq4zg/gWgcwPFKNiT93oWAUMevkJS4gjJFMeuypcpB9+TuipqYa2JJ
19 | rbfQSZaiYJ89uyE7QpZLToKZFL/AWQQA2yrSZGQKPT3IFD/y53kkpsm0A4ROIsEL
20 | G0f5SdtX7jW3eEVJwEUNqcQqofdt0IdrWVUpAq9nxR+x28XGxJi7PmhZ70uER66Z
21 | OjbYAWeMLuGs9FW46Hu2v5HIOM0WmrLcxuMXLCimyx94hF79D12gDvMkrPj7gpZg
22 | NbLoEi6sUtJE1LQ7dGVzdGVyKHRlc3RlciBmb3IgdW5pdCB0ZXN0KTx0ZXN0ZXJA
23 | Z3BnZnJvbnRlbmRkLmJrdHVzLmNvbT6JAVEEEwEIADsWIQTofGotjZXIGN6Ts65q
24 | J2T4KY3rKQUCZX1MGQIbLwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgAAKCRBq
25 | J2T4KY3rKSPvB/4qVzmh6w1qUwgiznzsOqtzWJ+wGJE5F0Q7p5USb0OAUwzRDyKn
26 | qYFuXq/NU+azFK+xTHQbVamQEO/JwE0sqHmUCznOYBoszkdl3ztmlSbxUAAlC1NL
27 | GYPHm9cRV4BO+YzR1Ah4itPpOJ9l6CgyVB58EYpUHtiEAAvCfCBGgqxtJTfyJ7Hx
28 | +zZ48UQxXHj5MthTPaL04k1mrcVMQ47U1BGjcy/iLzQbAxqhHSbXYB8sDqDeP5mp
29 | i8hoVjPBsWDafB1ZQGt8ubWs0pEGwOwiZKLpj32soVdNjl5VSG+Jh4u/UIIOz6Yl
30 | AbMbTzrOSfNyGFk6cPJmFj3zfsFO4CSDcLJW
31 | =kbKr
32 | -----END PGP PRIVATE KEY BLOCK-----
33 |
--------------------------------------------------------------------------------
/src/ui/widgets/TOFUInfoPage.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #include "TOFUInfoPage.h"
30 |
31 | GpgFrontend::UI::TOFUInfoPage::TOFUInfoPage(
32 | const GpgFrontend::GpgTOFUInfo & /*tofu_info*/, QWidget *parent)
33 | : QWidget(parent) {
34 | auto grid_layout = new QGridLayout();
35 |
36 | grid_layout->addWidget(new QLabel(tr("Key ID") + ": "), 0, 0);
37 | grid_layout->addWidget(new QLabel(tr("Algorithm") + ": "), 1, 0);
38 | grid_layout->addWidget(new QLabel(tr("Key Size") + ": "), 2, 0);
39 | grid_layout->addWidget(new QLabel(tr("Nominal Usage") + ": "), 3, 0);
40 | grid_layout->addWidget(new QLabel(tr("Actual Usage") + ": "), 4, 0);
41 | grid_layout->addWidget(new QLabel(tr("Expires on") + ": "), 5, 0);
42 | grid_layout->addWidget(new QLabel(tr("Last Update") + ": "), 6, 0);
43 | grid_layout->addWidget(new QLabel(tr("Secret Key Existence") + ": "), 7, 0);
44 |
45 | setLayout(grid_layout);
46 | }
47 |
--------------------------------------------------------------------------------
/.devcontainer/reinstall-cmake.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #-------------------------------------------------------------------------------------------------------------
3 | # Copyright (c) Microsoft Corporation. All rights reserved.
4 | # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
5 | #-------------------------------------------------------------------------------------------------------------
6 | #
7 | set -e
8 |
9 | CMAKE_VERSION=${1:-"none"}
10 |
11 | if [ "${CMAKE_VERSION}" = "none" ]; then
12 | echo "No CMake version specified, skipping CMake reinstallation"
13 | exit 0
14 | fi
15 |
16 | # Cleanup temporary directory and associated files when exiting the script.
17 | cleanup() {
18 | EXIT_CODE=$?
19 | set +e
20 | if [[ -n "${TMP_DIR}" ]]; then
21 | echo "Executing cleanup of tmp files"
22 | rm -Rf "${TMP_DIR}"
23 | fi
24 | exit $EXIT_CODE
25 | }
26 | trap cleanup EXIT
27 |
28 |
29 | echo "Installing CMake..."
30 | apt-get -y purge --auto-remove cmake
31 | mkdir -p /opt/cmake
32 |
33 | architecture=$(dpkg --print-architecture)
34 | case "${architecture}" in
35 | arm64)
36 | ARCH=aarch64 ;;
37 | amd64)
38 | ARCH=x86_64 ;;
39 | *)
40 | echo "Unsupported architecture ${architecture}."
41 | exit 1
42 | ;;
43 | esac
44 |
45 | CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
46 | CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
47 | TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)
48 |
49 | echo "${TMP_DIR}"
50 | cd "${TMP_DIR}"
51 |
52 | curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O
53 | curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O
54 |
55 | sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}"
56 | sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license
57 |
58 | ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
59 | ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest
60 |
--------------------------------------------------------------------------------
/src/ui/dialog/settings/SettingsAppearance.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | class Ui_AppearanceSettings;
32 |
33 | namespace GpgFrontend::UI {
34 |
35 | class AppearanceTab : public QWidget {
36 | Q_OBJECT
37 |
38 | public:
39 | /**
40 | * @brief Construct a new Appearance Tab object
41 | *
42 | * @param parent
43 | */
44 | explicit AppearanceTab(QWidget* parent = nullptr);
45 |
46 | /**
47 | * @brief Set the Settings object
48 | *
49 | */
50 | void SetSettings();
51 |
52 | /**
53 | * @brief
54 | *
55 | */
56 | void ApplySettings();
57 |
58 | private:
59 | QSharedPointer ui_; ///<
60 |
61 | QButtonGroup* icon_style_group_; ///<
62 | QButtonGroup* icon_size_group_;
63 |
64 | signals:
65 |
66 | /**
67 | * @brief
68 | *
69 | * @param needed
70 | */
71 | void SignalRestartNeeded();
72 | };
73 |
74 | } // namespace GpgFrontend::UI
75 |
--------------------------------------------------------------------------------
/src/ui/dialog/QuitDialog.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/CoreTypedef.h"
32 | #include "ui/dialog/GeneralDialog.h"
33 |
34 | namespace GpgFrontend::UI {
35 |
36 | /**
37 | * @brief
38 | *
39 | */
40 | class QuitDialog : public GeneralDialog {
41 | Q_OBJECT
42 |
43 | public:
44 | /**
45 | * @brief Construct a new Quit Dialog object
46 | *
47 | * @param parent
48 | * @param unsavedDocs
49 | */
50 | QuitDialog(QWidget* parent, const QHash& unsavedDocs);
51 |
52 | /**
53 | * @brief Get the Tab Ids To Save object
54 | *
55 | * @return QContainer
56 | */
57 | auto GetTabIdsToSave() -> QContainer;
58 |
59 | signals:
60 |
61 | void SignalDiscard();
62 |
63 | void SignalSave(const QContainer& tab_ids);
64 |
65 | void SignalCancel();
66 |
67 | private:
68 | QTableWidget* file_list_; ///<
69 | };
70 |
71 | } // namespace GpgFrontend::UI
72 |
--------------------------------------------------------------------------------
/src/GpgFrontend.h.in:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | // qt global
32 | #include
33 |
34 | // global build info
35 |
36 | #define PROJECT_NAME "@CMAKE_PROJECT_NAME@"
37 | #define OS_PLATFORM "@OS_PLATFORM@"
38 | #define LOCALE_DIR "@LOCALE_DIR@"
39 |
40 | // Various platform-specific macros
41 |
42 | #if defined(QT_VERSION) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
43 | #include
44 | #else
45 | #ifndef Q_OS_LINUX
46 | #if defined(__linux__) || defined(__linux)
47 | #define Q_OS_LINUX 1
48 | #endif
49 | #endif
50 |
51 | #ifndef Q_OS_MACOS
52 | #if defined(__APPLE__) && defined(__MACH__)
53 | #define Q_OS_MACOS 1
54 | #endif
55 | #endif
56 |
57 | #ifndef Q_OS_WINDOWS
58 | #if defined(_WIN32) || defined(WIN32) || defined(_WIN64)
59 | #define Q_OS_WINDOWS 1
60 | #endif
61 | #endif
62 | #endif
63 |
64 | #ifdef Q_OS_WINDOWS
65 | #include
66 | // should include winsock2.h before windows.h
67 | #include
68 | #endif
--------------------------------------------------------------------------------
/src/core/model/GFDataExchanger.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include
32 | #include
33 |
34 | #include "core/utils/MemoryUtils.h"
35 |
36 | namespace GpgFrontend {
37 |
38 | class GFDataExchanger {
39 | public:
40 | using SecureByteDeque = std::deque>;
41 | using SecureByteQueue = std::queue;
42 |
43 | explicit GFDataExchanger(ssize_t size);
44 |
45 | auto Write(const std::byte* buffer, size_t size) -> ssize_t;
46 |
47 | auto Read(std::byte* buffer, size_t size) -> ssize_t;
48 |
49 | void CloseWrite();
50 |
51 | private:
52 | std::condition_variable not_full_, not_empty_;
53 | SecureByteQueue queue_;
54 | std::mutex mutex_;
55 | const ssize_t queue_max_size_;
56 | std::atomic_bool close_ = false;
57 | };
58 |
59 | auto GF_CORE_EXPORT CreateStandardGFDataExchanger()
60 | -> QSharedPointer;
61 |
62 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/function/CoreSignalStation.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | class GpgPassphraseContext;
34 |
35 | /**
36 | * @brief
37 | *
38 | */
39 | class GF_CORE_EXPORT CoreSignalStation : public QObject {
40 | Q_OBJECT
41 | static std::unique_ptr instance;
42 |
43 | public:
44 | /**
45 | * @brief Get the Instance object
46 | *
47 | * @return SignalStation*
48 | */
49 | static auto GetInstance() -> CoreSignalStation*;
50 |
51 | signals:
52 |
53 | /**
54 | * @brief
55 | *
56 | */
57 | void SignalNeedUserInputPassphrase(QSharedPointer);
58 |
59 | /**
60 | * @brief
61 | *
62 | */
63 | void SignalBadGnupgEnv(QString);
64 |
65 | /**
66 | * @brief
67 | *
68 | */
69 | void SignalGoodGnupgEnv();
70 |
71 | /**
72 | * @brief
73 | *
74 | */
75 | void SignalCoreFullyLoaded();
76 | };
77 |
78 | } // namespace GpgFrontend
79 |
--------------------------------------------------------------------------------
/src/core/model/GpgPassphraseContext.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | /**
4 | * Copyright (C) 2021-2024 Saturneric
5 | *
6 | * This file is part of GpgFrontend.
7 | *
8 | * GpgFrontend is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * GpgFrontend is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with GpgFrontend. If not, see .
20 | *
21 | * The initial version of the source code is inherited from
22 | * the gpg4usb project, which is under GPL-3.0-or-later.
23 | *
24 | * All the source code of GpgFrontend was modified and released by
25 | * Saturneric starting on May 12, 2021.
26 | *
27 | * SPDX-License-Identifier: GPL-3.0-or-later
28 | *
29 | */
30 |
31 | #pragma once
32 |
33 | namespace GpgFrontend {
34 |
35 | class GF_CORE_EXPORT GpgPassphraseContext : public QObject {
36 | Q_OBJECT
37 | public:
38 | GpgPassphraseContext(const QString& uids_info, const QString& passphrase_info,
39 | bool prev_was_bad, bool ask_for_new);
40 |
41 | GpgPassphraseContext();
42 |
43 | void SetPassphrase(const QString& passphrase);
44 |
45 | [[nodiscard]] auto GetPassphrase() const -> QString;
46 |
47 | [[nodiscard]] auto GetUidsInfo() const -> QString;
48 |
49 | [[nodiscard]] auto GetPassphraseInfo() const -> QString;
50 |
51 | [[nodiscard]] auto IsPreWasBad() const -> bool;
52 |
53 | [[nodiscard]] auto IsAskForNew() const -> bool;
54 |
55 | private:
56 | QString passphrase_info_;
57 | QString uids_info_;
58 | QString passphrase_;
59 | bool prev_was_bad_;
60 | bool ask_for_new_;
61 | };
62 |
63 | } // namespace GpgFrontend
--------------------------------------------------------------------------------
/src/core/model/SettingsObject.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | namespace GpgFrontend {
32 |
33 | /**
34 | * @brief The SettingsObject class
35 | * This class is used to store data for the application securely.
36 | *
37 | */
38 | class GF_CORE_EXPORT SettingsObject : public QJsonObject {
39 | public:
40 | /**
41 | * @brief Construct a new Settings Object object
42 | *
43 | * @param settings_name The name of the settings object
44 | */
45 | explicit SettingsObject(QString settings_name);
46 |
47 | /**
48 | * @brief Construct a new Settings Object object
49 | *
50 | * @param _sub_json
51 | */
52 | explicit SettingsObject(QJsonObject sub_json);
53 |
54 | /**
55 | * @brief Destroy the Settings Object object
56 | *
57 | */
58 | ~SettingsObject();
59 |
60 | /**
61 | * @brief
62 | *
63 | */
64 | void Store(const QJsonObject&);
65 |
66 | private:
67 | QString settings_name_; ///<
68 | };
69 | } // namespace GpgFrontend
70 |
--------------------------------------------------------------------------------
/src/ui/GpgFrontendUI.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | extern "C" {
32 | auto GF_UI_EXPORT GFUIValidateSymbol() -> int;
33 | }
34 |
35 | // qt
36 | #include
37 |
38 | // private declare area of ui
39 | #ifdef GF_UI_PRIVATE
40 |
41 | // declare logging category
42 | Q_DECLARE_LOGGING_CATEGORY(ui)
43 |
44 | #define LOG_D() qCDebug(ui)
45 | #define LOG_I() qCInfo(ui)
46 | #define LOG_W() qCWarning(ui)
47 | #define LOG_E() qCCritical(ui)
48 | #define LOG_F() qCFatal(ui)
49 |
50 | #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
51 | #define LOG_F(...) qCFatal(ui)
52 | #else
53 | #define LOG_F(...) qFatal()
54 | #endif
55 |
56 | #define FLOG_D(...) qCDebug(ui, __VA_ARGS__)
57 | #define FLOG_I(...) qCInfo(ui, __VA_ARGS__)
58 | #define FLOG_W(...) qCWarning(ui, __VA_ARGS__)
59 | #define FLOG_E(...) qCCritical(ui, __VA_ARGS__)
60 |
61 | #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
62 | #define FLOG_F(...) qCFatal(ui, __VA_ARGS__)
63 | #else
64 | #define FLOG_F(...) qFatal(__VA_ARGS__)
65 | #endif
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/src/ui/dialog/ADSKsPicker.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/typedef/GpgTypedef.h"
32 | #include "ui/dialog//GeneralDialog.h"
33 | #include "ui/model/GpgKeyTreeProxyModel.h"
34 |
35 | namespace GpgFrontend::UI {
36 |
37 | class KeyTreeView;
38 |
39 | /**
40 | * @brief
41 | *
42 | */
43 | class ADSKsPicker : public GeneralDialog {
44 | Q_OBJECT
45 |
46 | public:
47 | /**
48 | * @brief Construct a new Signers Picker object
49 | *
50 | * @param parent
51 | */
52 | explicit ADSKsPicker(int channel, GpgKeyPtr key,
53 | const GpgKeyTreeProxyModel::KeyFilter& filter,
54 | QWidget* parent = nullptr);
55 |
56 | private slots:
57 | /**
58 | * @brief
59 | *
60 | * @param s_keys
61 | */
62 | void slot_add_adsk(const QContainer& s_keys);
63 |
64 | private:
65 | KeyTreeView* tree_view_; ///<
66 | bool accepted_ = false;
67 | int channel_;
68 | GpgKeyPtr key_;
69 | };
70 |
71 | } // namespace GpgFrontend::UI
72 |
--------------------------------------------------------------------------------
/src/ui/widgets/VerifyKeyDetailBox.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021-2024 Saturneric
3 | *
4 | * This file is part of GpgFrontend.
5 | *
6 | * GpgFrontend is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * GpgFrontend is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with GpgFrontend. If not, see .
18 | *
19 | * The initial version of the source code is inherited from
20 | * the gpg4usb project, which is under GPL-3.0-or-later.
21 | *
22 | * All the source code of GpgFrontend was modified and released by
23 | * Saturneric starting on May 12, 2021.
24 | *
25 | * SPDX-License-Identifier: GPL-3.0-or-later
26 | *
27 | */
28 |
29 | #pragma once
30 |
31 | #include "core/model/GpgSignature.h"
32 |
33 | namespace GpgFrontend::UI {
34 | /**
35 | * @brief
36 | *
37 | */
38 | class VerifyKeyDetailBox : public QGroupBox {
39 | Q_OBJECT
40 | public:
41 | /**
42 | * @brief Construct a new Verify Key Detail Box object
43 | *
44 | * @param signature
45 | * @param parent
46 | */
47 | explicit VerifyKeyDetailBox(int channel, const GpgSignature& signature,
48 | QWidget* parent);
49 |
50 | private slots:
51 |
52 | /**
53 | * @brief
54 | *
55 | */
56 | void slot_import_form_key_server();
57 |
58 | private:
59 | /**
60 | * @brief Create a key info grid object
61 | *
62 | * @param signature
63 | * @return QGridLayout*
64 | */
65 | QGridLayout* create_key_info_grid(const GpgSignature& signature);
66 |
67 | int current_gpg_context_channel_;
68 | GpgKeyPtr key_; ///< fingerprint of the key
69 | };
70 |
71 | } // namespace GpgFrontend::UI
72 |
--------------------------------------------------------------------------------