[630][adas] 修改证书认证流程

This commit is contained in:
xinfengkun
2024-03-13 20:11:01 +08:00
parent 13ef6245ed
commit e41b04687b
15 changed files with 133 additions and 32 deletions

View File

@@ -360,15 +360,27 @@ class MoGoAdasListenerImpl : OnAdasListener {
/**
* 自动驾驶设备基础信息请求
* 连接时启用认证 后才会有认证结果
* 如果启用认证在AdasOptions中未传递RootCrt需要在此回调中调用{@link AdasManager#certification(String, ByteString)}进行域控证书认证
*
* @param header 头
* @param basicInfoReq 数据
*/
override fun onBasicInfoReq(header: MessagePad.Header?, basicInfoReq: MessagePad.BasicInfoReq) {
invokeAutopilotSNRequest(basicInfoReq)
}
/**
* 域控证书认证状态
* 启用认证需要配置 AdasOptions.setEnableCertification()
* 连接时启用认证 后才会有证认结果
* ROOT证书异常会影响校验域控证书
* PAD证书异常会影响域控端校验的证书校验域控端证书校验失败将会断开连接且并不会给出断开原因ADAS LIB会执行重连操作如果配置启用重连
* 校验域控证书认证失败会主动断开连接,且不进行重连
* 假如校验域控证书认证失败会主动断开连接,且不进行重连
*
* @param status 域控证书认证结果{@link AdasConstants.CertificationStatus}
*/
override fun onBasicInfoReq(status: AdasConstants.CertificationStatus) {
invokeAutopilotSNRequest(status)
override fun onCertification(status: AdasConstants.CertificationStatus) {
}
//工控机基础配置信息

View File

@@ -33,6 +33,7 @@ import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.TEST
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DRIVER
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.PASSENGER
import com.zhjt.mogo.adas.data.AdasConstants
import mogo.telematics.pad.MessagePad
/**
* ADAS-SDK与工控机连接状态回调
@@ -265,7 +266,7 @@ class MoGoAdasMsgConnectStatusListenerImpl :
/**
* 工控机获取SN
*/
override fun onAutopilotSNRequest(status: AdasConstants.CertificationStatus) {
override fun onAutopilotSNRequest(basicInfoReq: MessagePad.BasicInfoReq) {
syncBasicInfoToAutopilot()
}