Skip to content

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

Closed
florentos17 wants to merge 20 commits intomasterfrom
Allow-Self-Signed-Certificates
Closed

TF-3456 Checkbox to be able to accept self-signed certificates#3473
florentos17 wants to merge 20 commits intomasterfrom
Allow-Self-Signed-Certificates

Conversation

@florentos17
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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 ?

@chibenwa chibenwa closed this Apr 3, 2026
@chibenwa chibenwa added the cyrus label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants