Update to the latest changes#1
Open
CMGeorge wants to merge 202 commits into
Open
Conversation
As mentioned in #141
Generate Qt 5.12.1+ compatible qt_Qt5Keychain.pri
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
Add French translation (untested)
Don't quote LIBS arguments
…n1String Convert QStringLiteral to QLatin1String to keep compatibility with Qt4
- by David Geiger <david.david@mageialinux-online.org>
Update and complete French translation
Add Russian translation
We had to work around QCoreApplication not creating a BApplication: When not used in a GUI application, we must create a BApplication object ourselves as it's required for the API we use. At least until QCoreApplication is fixed to create one maybe.
The generated cmake config files where not portable.
Before:
set_target_properties(qt5keychain PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreFoundation.framework;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework"
IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libqt5keychain.0.10.90.dylib"
IMPORTED_SONAME_RELWITHDEBINFO "/Users/hannah/ownstuff/drone-scripts/macos-64-clang/lib/libqt5keychain.1.dylib"
)
After:
set_target_properties(qt5keychain PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core;-framework Foundation;-framework Security"
IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libqt5keychain.0.10.90.dylib"
IMPORTED_SONAME_RELWITHDEBINFO "/Users/hannah/CraftRoot/lib/libqt5keychain.1.dylib"
)
We are adding all dependencies to the PUBLIC part of target_link_libraries invocation, which forces all dependent packages to link against it too through IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE in $prefix/lib/cmake/Qt5Keychain/Qt5KeychainLibraryDepends-release.cmake. Since it is implementation detail and not a part of the interface, we need to move it to the PRIVATE section instead: https://cmake.org/cmake/help/v3.16/command/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents
Not required in other platforms
This change fixes cross building from Linux to Windows when using the mingw tool chain. Using capital library names breaks the build on Linux (whereas for Windows it should not matter, as file names are case insensitive there).
Use files from tag v5.74.0-rc1 of upstream repo.
As I say in #42 (comment) , the result of `qmake -query QT_INSTALL_TRANSLATIONS` is the place where **Qt** stores its translations, not the target directory to install other translations. This commit introduces `QTKEYCHAIN_TRANSLATIONS_DIR` as a CMake cache variable defaulting to a reasonable location inside `${CMAKE_INSTALL_DATADIR}`. `QT_TRANSLATIONS_DIR` is still checked, in case some packager already relies on it. Closes #42. Closes #54.
When just starting up, on a slow system, 500ms may be too little time for KWallet to respond When this happens we fall back to libsecret, which can result in the right secrets not being available Instead use the default Qt DBus timeout (25s) If KWallet is not available the call will fail fast Fixes #242
display user@domain if a non empty user is given. This makes it easier to find an entry in e.g. seahorse as the display name is the one that is listed first.
To improve test coverage write multiple keys for a service key. This way it can be tested if multiple keys are actually working without overwriting each other.
From the job description both, service name and key can be empty strings. Since in that case there is no way to identify more than one entry assume this is invalid and return an error
Add tests that utilize an empty service key as is allowed by the API description
…ly (#289) * Refactor keychainclass.h to use dynamic job creation Commented out persistent member variables for credential jobs. * Refactor KeyChainClass to use local credential jobs Refactor KeyChainClass to use local job instances for reading, writing, and deleting keys. Removed unused member jobs and added auto-delete functionality.
In the ongoing migration from KWallet to QtKeychain in Plasma, in order to migrate without too strong rewrites and most important have the existing stored data still working, (some secrets actually have the structure of multiple key value maps) make reading from map still work. return it as a json serialized string, which is also how the kwallet compatibility layer stores maps on secretservice. This is only supported while reading, so when writing again it will be written directly as a serialized json string. this makes an implicit data migration which will make easier to go completely away from kwallet.
Qt nowadays has a hard requirement for c++17, compiling with c++11 will cause build failures. so we force compilation with c++17
Using Qt6::DBus / Qt6::Core is more robust than relying on the Qt6Core_LIBRARIES / Qt6DBus_LIBRARIES libraries. It seems that not every Qt installation provides these variables. This most notably fixes compilation against conan-provided Qt
Implement a Wasm backend for QtKeychain that leverages the browser's native credential management. Since Wasm runs in a restricted sandbox, this implementation uses a transient HTML bridge form to: - Trigger native browser password manager prompts (Auto-fill/Save). - Interface with the Credential Management API (navigator.credentials). - Maintain CSP compliance by using DOM APIs rather than raw innerHTML. - Support asynchronous job flow using Emscripten's Asyncify. Includes a new GitHub Actions workflow for automated Wasm builds using Qt 6.5.3 and Emscripten 3.1.25.
Guard navigator.credentials.get/.store Promise callbacks with an isJobAlive() check against window.qtk_active_jobs before calling back into C++. If the C++ job is destroyed while a Promise is in flight, hide_bridge_form already removes the entry from the map, so the check prevents access to the freed pointer. Also drop the unnecessary null guards on the three EMSCRIPTEN_KEEPALIVE callbacks; job is always `this` from scheduledStart() and cannot be null.
Invert the logic and assume Qt 6 unless -DBUILD_WITH_QT5=ON is passed.
Make sure that errors reading/writing data (e.g. because the data is too long for the current implementation, see issue #263) results in proper errors, not just Java exceptions printed to the console.
Plain RSA encryption only supports payloads of 245 bytes. Work around this by generating an AES key, encrypting the AES key with RSA, then store the RSA-encrypted AES key and the AES-encrypted payload. Backward-compatibility is maintained by using a magic prefix for the new format. Fixes #263 Implemented with the help of Github Copilot (Claude Sonnet 4.6)
Replace deprecated android.security.KeyPairGeneratorSpec usage with android.security.keystore.KeyGenParameterSpec (API 23+). Implemented with the help of Github Copilot (Claude Sonnet 4.6)
Mode::Map not handled in modeToString switch The Map value was added to the Mode enum in 0.16.0 but modeToString's switch statement doesn't cover it, triggering -Wswitch on GCC. Also adds the matching branch in stringToMode for symmetry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.