Files
security_access_token/services
openharmony_ci 704e50ba3a !4820 merge fixwaning into master
修复 TokenSync SoftBus 生命周期与参数校验问题

Created-by: panyongchaox
Commit-by: panyongchaox
Merged-by: openharmony_ci
Description: ### 关联的issue:
https://gitcode.com/openharmony/security_security_component_manager/issues/415

### 关联PR:
https://gitcode.com/openharmony/security_security_component_manager/pull/439

### 修改描述(修改功能描述,规格变更说明):
- 完善 UUID、压缩缓冲区、networkId 和 atm tokenId 的输入及边界校验。
- 修复客户端 socket 创建、绑定重试、map 更新和关闭路径的资源一致性问题。
- 统一无效 socket 判断,修复延迟关闭任务并发状态。
- 增加对应 mock、覆盖率和单元测试代码。

### 测试用例(附上截图,不涉及不需要说明不涉及原因):
1、TDD:
![image.png](https://raw.gitcode.com/user-images/assets/4390047/3df332c0-b714-4f86-afff-c8b5431a0359/image.png 'image.png')
2、XTS:
![image.png](https://raw.gitcode.com/user-images/assets/4390047/5392ae8a-2590-4d89-93ad-57dd945f66b1/image.png 'image.png')
3、手工用例:

### 兼容性上库自检:
- [x] 不涉及API功能发生变化
- [x] 不涉及公开回调函数或生命周期规格变化
- [x] 不涉及参数规格收紧
- [x] 不涉及新增权限校验
- [x] 不涉及接口使用约束收紧
- [x] 不涉及系统实例数量收紧
- [x] 不涉及修改接口返回数据
- [x] 未新增或修改公开错误码
- [x] 接口性能未出现明显劣化

### 权限合入自检:
- [x] 不涉及权限定义或权限文档变更

### 安全编码自检:
- [x] 外部缓冲区、字符串、整数及资源描述符在使用前校验
- [x] 初始化失败路径回滚 DeviceManager 和 SoftBus 资源
- [x] socket map 更新受锁保护,失败路径关闭 socket
- [x] 使用 RAII 管理 fulfillMutex_
- [x] 未改变分布式权限协议字段、版本或设备身份含义

### 日志规范自检:
- [x] 失败路径保留必要诊断日志
- [x] 未打印 Token、完整设备标识或其他敏感信息

See merge request: openharmony/security_access_token!4820
2026-08-21 15:39:34 +08:00
..
2026-04-18 18:50:06 +08:00