mirror of
https://gitee.com/openharmony/security_appverify
synced 2024-11-27 08:40:33 +00:00
commit
c7e2fef25b
@ -273,6 +273,7 @@ AppProvisionVerifyResult ParseProvision(const std::string& appProvision, Provisi
|
||||
{
|
||||
cJSON* obj = cJSON_Parse(appProvision.c_str());
|
||||
if (obj == NULL || !cJSON_IsObject(obj)) {
|
||||
cJSON_Delete(obj);
|
||||
return PROVISION_INVALID;
|
||||
}
|
||||
from_json(obj, info);
|
||||
@ -386,6 +387,7 @@ AppProvisionVerifyResult ParseProfile(const std::string& appProvision, Provision
|
||||
{
|
||||
cJSON* jsonObj = cJSON_Parse(appProvision.c_str());
|
||||
if (jsonObj == NULL || !cJSON_IsObject(jsonObj)) {
|
||||
cJSON_Delete(jsonObj);
|
||||
return PROVISION_INVALID;
|
||||
}
|
||||
from_json(jsonObj, info);
|
||||
|
@ -260,8 +260,9 @@ void HapCertVerifyOpensslUtils::WriteX509CrlToStream(std::ofstream& crlFile, X50
|
||||
crlFile.seekp(posStart + sizeof(totalLen));
|
||||
char buf[OPENSSL_READ_CRL_LEN_EACH_TIME];
|
||||
int32_t readLen = BIO_read(derBio, buf, sizeof(buf));
|
||||
int32_t readTime = 0;
|
||||
while (readLen > 0 && (++readTime < OPENSSL_READ_CRL_MAX_TIME)) {
|
||||
int32_t readTime = 1;
|
||||
while (readLen > 0 && (readTime < OPENSSL_READ_CRL_MAX_TIME)) {
|
||||
readTime++;
|
||||
crlFile.write(buf, readLen);
|
||||
totalLen += readLen;
|
||||
readLen = BIO_read(derBio, buf, sizeof(buf));
|
||||
|
Loading…
Reference in New Issue
Block a user