Skip to content

TF-3456 Checkbox to be able to accept self-signed certificates #3473

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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

florentos17
Copy link
Collaborator

@florentos17 florentos17 commented Feb 5, 2025

tackling issue #3456

the design can easily be changed, for now i kept it simple with an ExpansionTile and a LabeledCheckbox

here is a video demo:

demo-checkbox-accept-ssc.webm

@florentos17
Copy link
Collaborator Author

florentos17 commented Feb 11, 2025

I noticed a flaw in my previous work: with the current state, self-signed certificates can be accepted upon login (cf demo) but the choice is not remembered for later requests.
For example, if the users checks accept, he can login to a server using a self-signed certificate, but later when he wants to upload an attachment for an email, an Bad Handshake error is thrown.

Here is what happens:

  1. When the app starts, Get.put() registers a DioClient with default settings, meaning self-signed certificates are rejected ;
  2. When the user logs in, OIDCHttpClient updates its own DioClient instance to accept or reject self-signed certificates based on the user’s choice ;
  3. Later, whenever a DioClient is needed, Get.find() retrieves the initially registered instance, which still has the default settings (self-signed certificates are not accepted).

Possible solutions:

  • One solution would be to cache the user’s choice and change DioClient's constructor to apply the cached setting, if any.
  • Or, maybe easier, once the user has made its choice, replace the existing DioClient in GetX with a new one that has the correct setting ? The problem with that is, GetX already registered many objects based on the initial DioClient (OIDCHttpClient, DownloadClient, EmailAPI...). It would be easier to just erase and reload every NetworkBindings dependency ? Would that be acceptable ?

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.

3 participants