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)