Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds SSL client cert storage to webflow + Login Flow v2 #1389

Merged
merged 3 commits into from
Aug 28, 2019

Conversation

misch7
Copy link
Member

@misch7 misch7 commented Aug 27, 2019

The previous commit 50cd6af - Build a webflowcredentials
changed:

src/gui/wizard/flow2authcredspage.cpp in line 135 to use WebFlowCredentials
instead of HttpCredentials.
But the WebFlowCredentials class didn't include code to store and load SSL client
certificates and keys from the keychain.

This commit migrates the useful stuff from the old HttpCredentials class
into WebFlowCredentials.

Successfully tested on Windows. Please test on other systems and verify it's safe! :)

Signed-off-by: Michael Schuster michael@schuster.ms

The previous commit 50cd6af - Build a webflowcredentials
changed:

src/gui/wizard/flow2authcredspage.cpp in line 135 to use WebFlowCredentials
instead of HttpCredentials.
But the WebFlowCredentials class didn't include code to store and load SSL client
certificates and keys from the keychain.

This commit migrates the useful stuff from the old HttpCredentials class
into WebFlowCredentials.

Successfully tested on Windows. Please test on other systems and verify it's safe! :)

Signed-off-by: Michael Schuster <michael@schuster.ms>
@misch7 misch7 requested a review from rullzer August 27, 2019 01:43
Else authentication will still fail in setups that have a chain of
certificates supplied.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on linux as well.
With my commit also against a setup where multiple CA certs are provided as well.

@misch7
Copy link
Member Author

misch7 commented Aug 27, 2019

@rullzer Nice, works like a charm now on Linux for me too! 👍

Sadly Drone is very busy so we'll have to wait for the merge. 💤

@rullzer rullzer merged commit 85a2860 into master Aug 28, 2019
@delete-merged-branch delete-merged-branch bot deleted the webflow-client-ssl branch August 28, 2019 05:40
misch7 added a commit that referenced this pull request Dec 7, 2019
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:
- #1389
- #1394

This (again) fixes the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
misch7 added a commit that referenced this pull request Dec 8, 2019
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:
- #1389
- #1394

This (again) fixes the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
misch7 added a commit that referenced this pull request Dec 8, 2019
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:
- #1389
- #1394

This (again) fixes the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 72be80c)
Signed-off-by: Michael Schuster <michael@schuster.ms>
misch7 added a commit that referenced this pull request Dec 24, 2019
…t SSL keys and large certs

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

This fix implements the new wrapper class KeychainChunk with wrapper jobs ReadJob and WriteJob
to encapsulate the QKeychain handling of ReadPasswordJob and WritePasswordJob with binaryData
but split every supplied keychain entry's data into 2048 byte chunks, on Windows only.

The wrapper is used for all keychain operations in WebFlowCredentials, except for the server password.

All finished keychain jobs now get deleted properly, to avoid memory leaks.

For reference also see previous fixes:
- #1389
- #1394

This should finally fix the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
misch7 added a commit that referenced this pull request Dec 24, 2019
…t SSL keys and large certs

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

This fix implements the new wrapper class KeychainChunk with wrapper jobs ReadJob and WriteJob
to encapsulate the QKeychain handling of ReadPasswordJob and WritePasswordJob with binaryData
but split every supplied keychain entry's data into 2048 byte chunks, on Windows only.

The wrapper is used for all keychain operations in WebFlowCredentials, except for the server password.

All finished keychain jobs now get deleted properly, to avoid memory leaks.

For reference also see previous fixes:
- #1389
- #1394

This should finally fix the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
misch7 added a commit that referenced this pull request Dec 24, 2019
…t SSL keys and large certs

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

This fix implements the new wrapper class KeychainChunk with wrapper jobs ReadJob and WriteJob
to encapsulate the QKeychain handling of ReadPasswordJob and WritePasswordJob with binaryData
but split every supplied keychain entry's data into 2048 byte chunks, on Windows only.

The wrapper is used for all keychain operations in WebFlowCredentials, except for the server password.

All finished keychain jobs now get deleted properly, to avoid memory leaks.

For reference also see previous fixes:
- #1389
- #1394

This should finally fix the re-opened issue:
- #863

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 9b034a2)
Signed-off-by: Michael Schuster <michael@schuster.ms>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants