qtkeychain icon indicating copy to clipboard operation
qtkeychain copied to clipboard

The 'service' parameter does not influence Windows Credential Store target name

Open ikushn-s opened this issue 7 years ago • 1 comments

https://github.com/frankosterfeld/qtkeychain/blob/2220ce55c098edec358a58cd8182c35cbda07e31/keychain_win.cpp#L23-L26

Different entries are created on Mac and Linux for different service parameter values. But this parameter is not taken into account if Windows Credential Store is used (the parameter is used by PlainTextStore on Windows unless a custom QSettings object is passed). This forces me to prepend the service string to the key string ifdef-ed on Windows only.

Perhaps this prepending should be done in keychain_win.cpp instead to improve the API's consistency across platforms and configurations? The unfortunate downside of this approach is breaking the target name compatibility with earlier qtkeychain versions. I'm not sure how critical this downside is for Windows...

ikushn-s avatar Oct 24 '17 12:10 ikushn-s

The owncloud client is using the same "prepend the service to the key" workaround on windows.

ckamm avatar Jul 18 '18 10:07 ckamm