已合并
verify profile #313
ren_ze_hua创建于 1月17日
verify profile #313
已合并
共 1 个文件变更+9-1
| @@ -270,7 +270,15 @@ int32_t CodeSignUtils::EnforceCodeSignForApp(const std::string &path, const Entr | |||
| 270 | 270 | ||
| 271 | int32_t CodeSignUtils::EnableKeyInProfile(const std::string &bundleName, const ByteBuffer &profileBuffer) | 271 | int32_t CodeSignUtils::EnableKeyInProfile(const std::string &bundleName, const ByteBuffer &profileBuffer) |
| 272 | { | 272 | { |
| 273 | - int ret = EnableKeyInProfileByRust(bundleName.c_str(), profileBuffer.GetBuffer(), profileBuffer.GetSize()); | 273 | + Verify::ProvisionInfo info; |
| 274 | + int ret = Verify::VerifyProfileByP7bBlock(profileBuffer.GetSize(), | ||
| 275 | + static_cast<unsigned char*>(profileBuffer.GetBuffer()), false, info); | ||
| 276 | + if (ret != CS_SUCCESS) { | ||
| 277 | + LOG_ERROR("Profile verify failed. ret = %{public}d", ret); | ||
| 278 | + return ret; | ||
| 279 | + } | ||
| 280 | + | ||
| 281 | + ret = EnableKeyInProfileByRust(bundleName.c_str(), profileBuffer.GetBuffer(), profileBuffer.GetSize()); | ||
| 274 | if (ret == CS_SUCCESS) { | 282 | if (ret == CS_SUCCESS) { |
| 275 | ReportUserDataSize(); | 283 | ReportUserDataSize(); |
| 276 | return ret; | 284 | return ret; |