mirror of
https://gitee.com/openharmony/security_certificate_manager
synced 2024-11-23 15:40:27 +00:00
调整subjectName长度限制
Signed-off-by: 张余 <1459392684@qq.com>
This commit is contained in:
parent
65a112752b
commit
4b9bf00b7b
@ -41,8 +41,8 @@ extern "C" {
|
||||
#define MAX_COUNT_CERTIFICATE 256
|
||||
#define MAX_LEN_URI 256
|
||||
#define MAX_AUTH_LEN_URI 256
|
||||
#define MAX_LEN_CERT_ALIAS 65 /* include 1 byte: the terminator('\0') */
|
||||
#define MAX_LEN_SUBJECT_NAME 256
|
||||
#define MAX_LEN_CERT_ALIAS 129 /* include 1 byte: the terminator('\0') */
|
||||
#define MAX_LEN_SUBJECT_NAME 1025 /* include 1 byte: the terminator('\0') */
|
||||
#define MAX_LEN_PACKGE_NAME 64
|
||||
#define MAX_LEN_MAC_KEY 64
|
||||
#define MAX_UINT32_LEN 16
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "cm_mem.h"
|
||||
#include "os_account_manager.h"
|
||||
|
||||
#define MAX_SIZE_CAPACITY 409600
|
||||
|
||||
using namespace OHOS;
|
||||
|
||||
void CmSendResponse(const struct CmContext *context, int32_t result, const struct CmBlob *response)
|
||||
@ -43,6 +45,7 @@ void CmSendResponse(const struct CmContext *context, int32_t result, const struc
|
||||
if (response == nullptr) {
|
||||
reply->WriteUint32(0);
|
||||
} else {
|
||||
reply->SetMaxCapacity(MAX_SIZE_CAPACITY);
|
||||
reply->WriteUint32(response->size);
|
||||
reply->WriteBuffer(response->data, static_cast<size_t>(response->size));
|
||||
}
|
||||
|
@ -421,7 +421,8 @@ HWTEST_F(CmSysAppCertTest, SysAppCertTest018, TestSize.Level0)
|
||||
char retUriBuf[MAX_LEN_URI] = {0};
|
||||
struct CmBlob sysKeyUri = { sizeof(retUriBuf), reinterpret_cast<uint8_t *>(retUriBuf) };
|
||||
|
||||
uint8_t certAliasBuf[] = "12345678901234567890123456789012345678901234567890123456789012345";
|
||||
uint8_t certAliasBuf[] = "123456789012345678901234567890123456789012345678901234567890 \
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789";
|
||||
struct CmBlob certAlias018 = { sizeof(certAliasBuf), certAliasBuf }; /* certAlias size beyond max */
|
||||
|
||||
struct CmAppCertParam appCertParam = { (struct CmBlob *)&g_eccAppCert, (struct CmBlob *)&g_appCertPwd,
|
||||
|
Loading…
Reference in New Issue
Block a user