From a6487c4966df78d356c56e13289310b5e2b7c87a Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Mon, 8 Apr 2024 17:40:02 +0800 Subject: [PATCH] =?UTF-8?q?[640][app]=20=E6=B7=BB=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=95=8C=E9=9D=A2=E5=90=8E=E7=9A=84=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autopilot/MoGoAutopilotControlProvider.kt | 12 ++++++------ .../function/call/cloud/CallerCloudCertManager.kt | 10 +++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt index b08efc0941..bfdfffcc4c 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt @@ -130,8 +130,8 @@ class MoGoAutopilotControlProvider : .setPingAddressList(AdasManager.getInstance().pingAddressList) .setPassenger(false) .setEnableCertification(SharedPrefsMgr.getInstance().getBoolean("${MoGoConfig.AUTOPILOT_CERTIFICATION}-${DebugConfig.getNetMode()}", MoGoConfig.AUTOPILOT_CERTIFICATION_DEFAULT_VALUE)) - .setRootCrt(CallerCloudCertManager.getRootCrtF()) - .setDeviceCrt(CallerCloudCertManager.getDeviceCrtF()) + .setRootCrt(CallerCloudCertManager.getRootCrtFDecode()) + .setDeviceCrt(CallerCloudCertManager.getDeviceCrtFDecode()) .setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear) // .setSubscribeInterfaceOptions(subscribeInterfaceOptions)// .build() @@ -261,8 +261,8 @@ class MoGoAutopilotControlProvider : .setPingAddressList(AdasManager.getInstance().pingAddressList) .setPassenger(false)// 乘客端直连工控机改为false .setEnableCertification(SharedPrefsMgr.getInstance().getBoolean("${MoGoConfig.AUTOPILOT_CERTIFICATION}-${DebugConfig.getNetMode()}", MoGoConfig.AUTOPILOT_CERTIFICATION_DEFAULT_VALUE)) - .setRootCrt(CallerCloudCertManager.getRootCrtF()) - .setDeviceCrt(CallerCloudCertManager.getDeviceCrtF()) + .setRootCrt(CallerCloudCertManager.getRootCrtFDecode()) + .setDeviceCrt(CallerCloudCertManager.getDeviceCrtFDecode()) .setUnableLaunchAutopilotGear(FunctionBuildConfig.unableLaunchAutopilotGear) .build() AdasManager.getInstance().create(mContext, options, MoGoAdasMsgConnectStatusListenerImpl()) @@ -322,8 +322,8 @@ class MoGoAutopilotControlProvider : val options = AdasOptions.newBuilder() .setPassenger(false) .setEnableCertification(SharedPrefsMgr.getInstance().getBoolean("${MoGoConfig.AUTOPILOT_CERTIFICATION}-${DebugConfig.getNetMode()}", MoGoConfig.AUTOPILOT_CERTIFICATION_DEFAULT_VALUE)) - .setRootCrt(CallerCloudCertManager.getRootCrtF()) - .setDeviceCrt(CallerCloudCertManager.getDeviceCrtF()) + .setRootCrt(CallerCloudCertManager.getRootCrtFDecode()) + .setDeviceCrt(CallerCloudCertManager.getDeviceCrtFDecode()) .setConnectionMode(AdasOptions.IPC_CONNECTION_MODE.SPECIFIED) .setSpecifiedAddress(autoPilotIp) .build() diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/cloud/CallerCloudCertManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/cloud/CallerCloudCertManager.kt index cd35221a0e..bd2f04dc58 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/cloud/CallerCloudCertManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/cloud/CallerCloudCertManager.kt @@ -27,6 +27,14 @@ object CallerCloudCertManager { } fun getDeviceCrtF(): String? { + return certProviderApi.getDeviceCrtF() + } + + fun getRootCrtF(): String? { + return certProviderApi.getRootCrtF() + } + + fun getDeviceCrtFDecode(): String? { var crt = certProviderApi.getDeviceCrtF() if (!crt.isNullOrEmpty()) { crt = String(Base64.decode(crt, Base64.NO_WRAP), StandardCharsets.UTF_8) @@ -34,7 +42,7 @@ object CallerCloudCertManager { return crt } - fun getRootCrtF(): String? { + fun getRootCrtFDecode(): String? { var crt = certProviderApi.getRootCrtF() if (!crt.isNullOrEmpty()) { crt = String(Base64.decode(crt, Base64.NO_WRAP), StandardCharsets.UTF_8)