Project

General

Profile

Actions

Feature #104

open

SSL Implementation

Added by Subodh Neelapati 12 months ago. Updated 12 months ago.

Status:
In Progress
Priority:
High
Start date:
23/04/2024
Due date:
% Done:

0%

Estimated time:
8:00 h
Deployed In:
Category:

Description

Search SSL Flutter package and implement it on project.

Actions #1

Updated by Subodh Neelapati 12 months ago

  • Due date changed from 23/04/2024 to 25/04/2024
Actions #2

Updated by Jyoshna Behara 12 months ago

  • Due date deleted (25/04/2024)
  • Status changed from New to In Progress

Has dependency on packages - no accurate sample of code.

Below 2 ways implemented but not worked as required.

1.   (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
(client) {
SecurityContext context = SecurityContext.defaultContext;
getRootBundle().then((value) => {
context.setTrustedCertificatesBytes(value.buffer.asUint8List()),
client = HttpClient(context: context)
});
return client;
};

2. class HttpOverridesService extends HttpOverrides{
@override
HttpClient createHttpClient(SecurityContext? context){
return super.createHttpClient(context)
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
}
}

Actions

Also available in: Atom PDF