Home
last modified time | relevance | path

Searched refs:cred (Results 1 - 25 of 44) sorted by relevance

12

/base/security/device_security_level/test/dslm_unit_test/
H A Ddslm_oem_property_test.cpp78 const char *cred = "test"; in HWTEST_F() local
84 ret = VerifyDslmCredential(cred, nullptr, &list); in HWTEST_F()
87 ret = VerifyDslmCredential(cred, &info, &list); in HWTEST_F()
106 const char *cred = "eyJ0eXAiOiAiRFNMIn0="; in HWTEST_F() local
108 int32_t ret = VerifyDslmCredential(cred, &info, &list); in HWTEST_F()
113 const char *cred = "eyJ0eXAiOiAiRFNMIn0=." in HWTEST_F() local
118 int32_t ret = VerifyDslmCredential(cred, &info, &list); in HWTEST_F()
123 const char *cred = "eyJ0eXAiOiAiRFNMIn0=." in HWTEST_F() local
130 int32_t ret = VerifyDslmCredential(cred, &info, &list); in HWTEST_F()
150 const char *cred in HWTEST_F() local
157 const char *cred = "eyJ0eXAiOiAiRFNMIn0=." HWTEST_F() local
167 const char *cred = "eyJ0eXAiOiAiRFNMIn0=." HWTEST_F() local
195 const char *cred = HWTEST_F() local
237 const char *cred = HWTEST_F() local
273 const char *cred = HWTEST_F() local
315 const char *cred = HWTEST_F() local
357 const char *cred = HWTEST_F() local
397 const char *cred = HWTEST_F() local
440 const char *cred = HWTEST_F() local
481 const char *cred = HWTEST_F() local
524 const char *cred = HWTEST_F() local
565 const char *cred = HWTEST_F() local
608 const char *cred = HWTEST_F() local
648 const char *cred = "eyJ0eXAiOiAiRFNMIn0=.eyJ0eXBlIjogImRlYnVnIiwgIm1h" HWTEST_F() local
[all...]
H A Ddslm_test.cpp522 DslmCredBuff cred = {(CredType)3, 9, info}; in HWTEST_F() local
529 int32_t ret = BuildDeviceSecInfoResponse(random, (DslmCredBuff *)&cred, &msg); in HWTEST_F()
540 DslmCredBuff cred = {(CredType)3, 9, info}; in HWTEST_F() local
545 int32_t ret = BuildDeviceSecInfoResponse(random, (DslmCredBuff *)&cred, msg); in HWTEST_F()
556 int32_t ret = BuildDeviceSecInfoResponse(random, (DslmCredBuff *)&cred, &msgPtr); in HWTEST_F()
841 DslmCredBuff *cred = nullptr; in HWTEST_F() local
844 int32_t ret = ParseDeviceSecInfoResponse(&msg, &challenge, &version, &cred); in HWTEST_F()
851 EXPECT_NE(nullptr, cred); in HWTEST_F()
852 EXPECT_EQ(2U, cred->type); in HWTEST_F()
853 EXPECT_EQ(strlen(except), cred in HWTEST_F()
867 DslmCredBuff *cred = nullptr; HWTEST_F() local
883 DslmCredBuff *cred = nullptr; HWTEST_F() local
899 DslmCredBuff **cred = nullptr; HWTEST_F() local
916 DslmCredBuff *cred = nullptr; HWTEST_F() local
933 DslmCredBuff cred; HWTEST_F() local
970 DslmCredBuff *cred = nullptr; HWTEST_F() local
1006 DslmCredBuff *cred = nullptr; HWTEST_F() local
1096 DslmCredBuff *cred = nullptr; HWTEST_F() local
1118 DslmCredBuff cred = { HWTEST_F() local
1736 DslmCredBuff cred = {CRED_TYPE_STANDARD, 9, info}; HWTEST_F() local
1748 DslmCredBuff cred = {CRED_TYPE_LARGE, 9, info}; HWTEST_F() local
1767 DslmCredBuff cred = {CRED_TYPE_SMALL, 9, info}; HWTEST_F() local
1780 char cred[] = "test"; HWTEST_F() local
1961 DslmCredBuff *cred = (DslmCredBuff *)MALLOC(sizeof(DslmCredBuff)); HWTEST_F() local
[all...]
/base/hiviewdfx/hilog/frameworks/libhilog/socket/
H A Dseq_packet_socket_server.cpp62 struct ucred cred = { 0 }; in AcceptingLoop() local
64 (void)getsockopt(acceptResult, SOL_SOCKET, SO_PEERCRED, &cred, &len); in AcceptingLoop()
65 std::cout << "Ucred: pid:" << cred.pid << ", uid: " << cred.uid << ", gid: " << cred.gid << std::endl; in AcceptingLoop()
69 handler->SetCredential(cred); in AcceptingLoop()
H A Ddgram_socket_server.cpp22 int DgramSocketServer::RecvPacket(std::vector<char>& buffer, struct ucred *cred) in RecvPacket() argument
37 if (cred != nullptr) { in RecvPacket()
58 } else if (cred != nullptr) { in RecvPacket()
64 *cred = *receivedUcred; in RecvPacket()
H A Dhilog_input_socket_server.cpp76 ucred cred; in ServingThread() local
77 while ((ret = RecvPacket(data, &cred)) >= 0) { in ServingThread()
79 m_packetHandler(cred, data, ret); in ServingThread()
H A Dsocket.cpp33 void Socket::SetCredential(struct ucred& cred) in SetCredential() argument
35 socketCred = cred; in SetCredential()
/base/security/device_security_level/services/dslm/
H A Ddslm_inner_process.c85 DslmCredBuff *cred = NULL; in VerifyDeviceInfoResponse() local
92 ret = ParseDeviceSecInfoResponse(buff, &nonce, &version, &cred); in VerifyDeviceInfoResponse()
101 DestroyDslmCred(cred); in VerifyDeviceInfoResponse()
109 DestroyDslmCred(cred); in VerifyDeviceInfoResponse()
114 ret = DefaultVerifyDslmCred(&device->identity, device->nonce, cred, &device->credInfo); in VerifyDeviceInfoResponse()
115 DestroyDslmCred(cred); in VerifyDeviceInfoResponse()
H A Ddslm_msg_utils.c33 static uint8_t *GenerateSecInfoResponseJson(uint64_t challenge, const DslmCredBuff *cred) in GenerateSecInfoResponseJson() argument
53 DslmAddFieldIntToJson(body, FIELD_CRED_TYPE, cred->type); in GenerateSecInfoResponseJson()
61 credBase64Str = Base64EncodeApp(cred->credVal, cred->credLen); in GenerateSecInfoResponseJson()
174 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg) in BuildDeviceSecInfoResponse() argument
176 if ((cred == NULL) || (msg == NULL) || (*msg != NULL)) { in BuildDeviceSecInfoResponse()
184 out->buff = GenerateSecInfoResponseJson(challenge, cred); in BuildDeviceSecInfoResponse()
195 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, DslmCredBuff **cred) in ParseDeviceSecInfoResponse() argument
197 if (msg == NULL || challenge == NULL || version == NULL || cred == NULL) { in ParseDeviceSecInfoResponse()
201 if (msg->buff == NULL || *cred ! in ParseDeviceSecInfoResponse()
[all...]
H A Ddslm_msg_utils.h36 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg);
40 int32_t ParseDeviceSecInfoResponse(const MessageBuff *msg, uint64_t *challenge, uint32_t *version, DslmCredBuff **cred);
H A Ddslm_core_process.c71 DslmCredBuff *cred = NULL; in OnPeerMsgRequestInfoReceived() local
72 ret = DefaultRequestDslmCred(deviceId, &reqObject, &cred); in OnPeerMsgRequestInfoReceived()
79 ret = BuildDeviceSecInfoResponse(reqObject.challenge, cred, &resBuff); in OnPeerMsgRequestInfoReceived()
84 DestroyDslmCred(cred); in OnPeerMsgRequestInfoReceived()
/base/startup/init/services/param/liteos/
H A Dparam_litedac.c24 security->cred.pid = getpid(); in InitLocalSecurityLabel()
25 security->cred.uid = getuid(); in InitLocalSecurityLabel()
26 security->cred.gid = 0; in InitLocalSecurityLabel()
28 security->cred.pid = 0; in InitLocalSecurityLabel()
29 security->cred.uid = 0; in InitLocalSecurityLabel()
30 security->cred.gid = 0; in InitLocalSecurityLabel()
/base/security/certificate_manager/test/unittest/common_permission_test/
H A Dcm_common_permission_test.cpp211 struct Credential cred; in HWTEST_F() local
212 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential)); in HWTEST_F()
213 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN; in HWTEST_F()
214 cred.credData.data = static_cast<uint8_t *>(malloc(MAX_LEN_CERTIFICATE_CHAIN)); in HWTEST_F()
215 ASSERT_TRUE(cred.credData.data != nullptr); in HWTEST_F()
220 int32_t ret = CmGetAppCert(&uri, CM_CREDENTIAL_STORE, &cred); in HWTEST_F()
223 free(cred.credData.data); in HWTEST_F()
234 struct Credential cred; in HWTEST_F() local
235 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential)); in HWTEST_F()
236 cred in HWTEST_F()
527 struct Credential cred; HWTEST_F() local
[all...]
/base/security/certificate_manager/test/unittest/inner_permission_test/
H A Dcm_inner_permission_test.cpp204 struct Credential cred; in HWTEST_F() local
205 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential)); in HWTEST_F()
206 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN; in HWTEST_F()
207 cred.credData.data = static_cast<uint8_t *>(malloc(MAX_LEN_CERTIFICATE_CHAIN)); in HWTEST_F()
208 ASSERT_TRUE(cred.credData.data != nullptr); in HWTEST_F()
213 int32_t ret = CmGetAppCert(&uri, CM_CREDENTIAL_STORE, &cred); in HWTEST_F()
216 free(cred.credData.data); in HWTEST_F()
429 struct Credential cred; in HWTEST_F() local
430 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential)); in HWTEST_F()
431 cred in HWTEST_F()
[all...]
/base/web/webview/ohos_adapter/cert_mgr_adapter/src/
H A Dcert_mgr_adapter_impl.cpp360 struct Credential cred; in GetAppCert() local
361 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential)); in GetAppCert()
362 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN; in GetAppCert()
363 cred.credData.data = static_cast<uint8_t *>(malloc(MAX_LEN_CERTIFICATE_CHAIN)); in GetAppCert()
364 if (cred.credData.data == nullptr) { in GetAppCert()
370 int32_t ret = CmGetAppCert(&uri, CM_CREDENTIAL_STORE, &cred); in GetAppCert()
373 free(cred.credData.data); in GetAppCert()
374 cred.credData.data = nullptr; in GetAppCert()
378 *len = cred.credData.size; in GetAppCert()
379 if (memcpy_s(certData, MAX_LEN_CERTIFICATE_CHAIN, cred in GetAppCert()
[all...]
/base/useriam/user_auth_framework/services/core/src/
H A Dresource_node_utils.cpp120 for (auto &cred : in) { in ClassifyCredInfoByExecutor()
121 if (cred == nullptr) { in ClassifyCredInfoByExecutor()
122 IAM_LOGE("cred is null"); in ClassifyCredInfoByExecutor()
125 uint64_t executorIndex = cred->GetExecutorIndex(); in ClassifyCredInfoByExecutor()
129 out[executorIndex].push_back(cred); in ClassifyCredInfoByExecutor()
/base/security/device_auth/services/session_manager/src/session/v2/
H A Ddev_session_v2.c342 static void RemoveUnsupportedProtocols(IdentityInfo *cred) in RemoveUnsupportedProtocols() argument
345 while (index < HC_VECTOR_SIZE(&cred->protocolVec)) { in RemoveUnsupportedProtocols()
346 ProtocolEntity *entity = cred->protocolVec.get(&cred->protocolVec, index); in RemoveUnsupportedProtocols()
353 HC_VECTOR_POPELEMENT(&cred->protocolVec, &popEntity, index); in RemoveUnsupportedProtocols()
362 IdentityInfo *cred = impl->credList.get(&impl->credList, index); in CheckAllCredsValidity() local
363 RemoveUnsupportedProtocols(cred); in CheckAllCredsValidity()
364 uint32_t protocolNum = HC_VECTOR_SIZE(&cred->protocolVec); in CheckAllCredsValidity()
372 DestroyIdentityInfo(cred); in CheckAllCredsValidity()
482 static int32_t AddAllCredAbilityToCredInfo(SessionImpl *impl, IdentityInfo *cred, CJso argument
508 AddPreSharedCredInfo(SessionImpl *impl, IdentityInfo *cred, CJson *credInfo) AddPreSharedCredInfo() argument
517 AddCertCredInfo(SessionImpl *impl, IdentityInfo *cred, CJson *credInfo) AddCertCredInfo() argument
540 AddCredInfoToEventData(SessionImpl *impl, IdentityInfo *cred, CJson *eventData) AddCredInfoToEventData() argument
859 GenerateHandshakeEventData(SessionImpl *impl, IdentityInfo *cred, CJson *eventData) GenerateHandshakeEventData() argument
905 AddStartHandshakeMsg(SessionImpl *impl, IdentityInfo *cred, CJson *sessionMsg) AddStartHandshakeMsg() argument
984 CreateIsoSubSession(SessionImpl *impl, const IdentityInfo *cred, AuthSubSession **returnSubSession) CreateIsoSubSession() argument
1013 CreateDlSpekeSubSession(SessionImpl *impl, const IdentityInfo *cred, AuthSubSession **returnSubSession) CreateDlSpekeSubSession() argument
1064 CreateEcSpekeSubSession(SessionImpl *impl, const IdentityInfo *cred, AuthSubSession **returnSubSession) CreateEcSpekeSubSession() argument
1289 AddAuthInfoToContextByCred(SessionImpl *impl, IdentityInfo *cred) AddAuthInfoToContextByCred() argument
1333 AddAuthSubSessionToVec(SessionImpl *impl, IdentityInfo *cred, ProtocolEntity *entity) AddAuthSubSessionToVec() argument
1355 ClientCreateAuthSubSessionByCred(SessionImpl *impl, IdentityInfo *cred) ClientCreateAuthSubSessionByCred() argument
1451 SetPeerUserIdToContext(CJson *context, const CJson *inputData, const IdentityInfo *cred) SetPeerUserIdToContext() argument
1484 ServerCreateAuthSubSessionByCred(SessionImpl *impl, const CJson *inputData, IdentityInfo *cred) ServerCreateAuthSubSessionByCred() argument
1694 SetAuthPsk(SessionImpl *impl, const CJson *inputData, IdentityInfo *cred) SetAuthPsk() argument
[all...]
/base/startup/init/services/param/base/
H A Dparam_base.c419 if (srcLabel->cred.gid == node->gid) {
429 srcLabel->cred.pid, gids, sizeof(gids) / sizeof(gids[0]));
446 if (srcLabel->cred.uid == 0) {
465 if (srcLabel->cred.uid == node->uid) {
476 if (CheckUserInGroup(space, node, srcLabel->cred.uid) == 0) {
483 PARAM_LOGW("Param '%s' label gid:%d uid:%d mode 0%x", name, srcLabel->cred.gid, srcLabel->cred.uid, mode);
515 info.uc.pid = srcLabel->cred.pid;
516 info.uc.uid = srcLabel->cred.uid;
517 info.uc.gid = srcLabel->cred
[all...]
/base/hiviewdfx/hilog/frameworks/libhilog/socket/include/
H A Ddgram_socket_server.h32 int RecvPacket(std::vector<char>& buffer, struct ucred *cred = nullptr);
H A Dsocket.h32 void SetCredential(struct ucred& cred);
/base/security/device_security_level/test/dslm_fuzz_test/dslm_fuzzer/
H A Ddslm_fuzzer.cpp194 DslmCredBuff cred = {CRED_TYPE_STANDARD, 9, info}; in VerifyOhosDslmCredTest() local
197 (void)VerifyOhosDslmCred(&device, challenge, &cred, &credInfo); in VerifyOhosDslmCredTest()
199 cred.type = CRED_TYPE_LARGE; in VerifyOhosDslmCredTest()
200 (void)VerifyOhosDslmCred(&device, challenge, &cred, &credInfo); in VerifyOhosDslmCredTest()
201 (void)VerifyOhosDslmCred(nullptr, challenge, &cred, &credInfo); in VerifyOhosDslmCredTest()
296 DslmCredBuff cred = {CRED_TYPE_STANDARD, 9, info}; in BuildDeviceSecInfoResponseTest() local
298 (void)BuildDeviceSecInfoResponse(challenge, &cred, &msg); in BuildDeviceSecInfoResponseTest()
/base/hiviewdfx/hilog/services/hilogd/include/
H A Dlog_collector.h39 void onDataRecv(const ucred& cred, std::vector<char>& data, int dataLen);
/base/hiviewdfx/hilog/services/hilogd/
H A Dlog_collector.cpp69 void LogCollector::onDataRecv(const ucred& cred, std::vector<char>& data, int dataLen) in onDataRecv()
84 msg.pid = cred.pid; in onDataRecv()
H A Dmain.cpp153 auto onDataReceive = [&logCollector](const ucred& cred, std::vector<char>& data, int dataLen) { in HilogdEntry()
154 logCollector.onDataRecv(cred, data, dataLen); in HilogdEntry()
/base/startup/init/test/unittest/param/
H A Dparamservice_unittest.cpp57 GetParamSecurityLabel()->cred.uid = 1000; // 1000 test uid in SetUp()
58 GetParamSecurityLabel()->cred.gid = 1000; // 1000 test gid in SetUp()
83 GetParamSecurityLabel()->cred.gid = 9999; // 9999 test gid in TestAddSecurityLabel1()
103 GetParamSecurityLabel()->cred.gid = 9999; // 9999 test gid in TestAddSecurityLabel2()
128 GetParamSecurityLabel()->cred.gid = 9999; // 9999 test gid in TestAddSecurityLabel3()
161 GetParamSecurityLabel()->cred.gid = 9999; // 9999 test gid in TestAddSecurityLabel4()
/base/security/device_security_level/services/dfx/
H A Ddslm_hidumper.c179 DslmCredBuff *cred = NULL; in GetDefaultStatus() local
180 *requestResult = DefaultRequestDslmCred(device, &object, &cred); in GetDefaultStatus()
185 *verifyResult = DefaultVerifyDslmCred(device, object.challenge, cred, &info); in GetDefaultStatus()
187 DestroyDslmCred(cred); in GetDefaultStatus()

Completed in 16 milliseconds

12