From 8d876c8592153e810ebfe2719b70e31b94e96e5c Mon Sep 17 00:00:00 2001 From: aakash-s45 Date: Thu, 15 Sep 2022 22:37:39 +0530 Subject: Patch for an error caused due to missing file CA.pem is no longer in the asset folder but still in use in the app. Bug-AGL: SPEC-4543 Change-Id: I2142f493dec035777a1da0b36edc10bb5dcee5a2 Signed-off-by: Aakash Solanki --- lib/vehicle_signal/vehicle_signal_config.dart | 2 -- 1 file changed, 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( // load certificates and set context and returns http client Future 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) { -- cgit 1.2.3-korg