Windows: Workaround for storing >= 4k (4096 bit) client-cert SSL keys
authorMichael Schuster <michael@schuster.ms>
Sat, 7 Dec 2019 04:27:50 +0000 (05:27 +0100)
committerMichael Schuster <48932272+misch7@users.noreply.github.com>
Sun, 8 Dec 2019 01:47:22 +0000 (02:47 +0100)
commit72be80cbd972113930f84529764f3a1a3ada0292
treeb87f0771692760c4fee42f662953cefc1d1d19f0
parent99a27d19b9fb9330f9299d5fb9d04c872044f34c
Windows: Workaround for storing >= 4k (4096 bit) client-cert SSL keys

With QtKeychain on Windows, storing larger keys in one keychain entry causes the
following error due to limits in the Windows APIs:
  Error: "Credential size exceeds maximum size of 2560"

To avoid overhead on the other platforms and balance code duplication, this
approach puts some read- and write-parts into Windows-only defines.

For reference also see previous fixes:
- https://github.com/nextcloud/desktop/pull/1389
- https://github.com/nextcloud/desktop/pull/1394

This (again) fixes the re-opened issue:
- https://github.com/nextcloud/desktop/issues/863

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/creds/webflowcredentials.cpp
src/gui/creds/webflowcredentials.h