frankosterfeld / qtkeychain

Platform-independent Qt API for storing passwords securely.
Other
412 stars 162 forks source link

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

Open ikushn-s opened 6 years ago

ikushn-s commented 6 years ago

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...

ckamm commented 6 years ago

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