summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/vehicle_signal/vehicle_signal_config.dart2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/vehicle_signal/vehicle_signal_config.dart b/lib/vehicle_signal/vehicle_signal_config.dart
index 3f0ff1d..1eca347 100644
--- a/lib/vehicle_signal/vehicle_signal_config.dart
+++ b/lib/vehicle_signal/vehicle_signal_config.dart
@@ -10,14 +10,12 @@ final sockConnectprovider = FutureProvider.family<WebSocket, HttpClient>(
// load certificates and set context and returns http client
Future<HttpClient> initializeClient() async {
- ByteData dataCA = await rootBundle.load('assets/cert/CA.pem');
ByteData dataCert = await rootBundle.load('assets/cert/Client.pem');
ByteData dataKey = await rootBundle.load('assets/cert/Client.key');
SecurityContext ctx = SecurityContext.defaultContext;
ctx.useCertificateChainBytes(dataCert.buffer.asUint8List());
ctx.usePrivateKeyBytes(dataKey.buffer.asUint8List());
- ctx.setTrustedCertificatesBytes(dataCA.buffer.asUint8List());
HttpClient client = HttpClient(context: ctx)
..findProxy = null
..badCertificateCallback = (cert, host, port) {