[640][app] 添加获取界面后的证书
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user