Home
last modified time | relevance | path

Searched refs:cred (Results 1 – 25 of 54) sorted by relevance

123

/ohos5.0/base/security/device_security_level/test/dslm_unit_test/
H A Ddslm_oem_property_test.cpp195 const char *cred = variable
237 const char *cred = variable
273 const char *cred = variable
315 const char *cred = variable
357 const char *cred = variable
397 const char *cred = variable
440 const char *cred = variable
481 const char *cred = variable
524 const char *cred = variable
565 const char *cred = variable
[all …]
H A Ddslm_test.cpp850 EXPECT_EQ(0, strncmp(except, (const char *)cred->credVal, cred->credLen));
851 DestroyDslmCred(cred);
929 DslmCredBuff cred; variable
1101 DestroyDslmCred(cred);
1114 DslmCredBuff cred = { variable
1758 char cred[] = "test"; variable
1922 cred->credLen = 9;
1923 cred->credVal = nullptr;
1924 DestroyDslmCred(cred);
1926 cred = nullptr;
[all …]
/ohos5.0/base/security/certificate_manager/test/unittest/common_permission_test/
H A Dcm_common_permission_test.cpp211 struct Credential cred; variable
213 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN;
215 ASSERT_TRUE(cred.credData.data != nullptr);
223 free(cred.credData.data);
234 struct Credential cred; variable
236 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN;
238 ASSERT_TRUE(cred.credData.data != nullptr);
246 free(cred.credData.data);
527 struct Credential cred; variable
531 ASSERT_TRUE(cred.credData.data != nullptr);
[all …]
/ohos5.0/base/security/security_guard/oem_property/hos/
H A Dsecurity_guard_model.cfg24 "fieldName": "cred",
38 "fieldName": "cred",
52 "fieldName": "cred",
66 "fieldName": "cred",
80 "fieldName": "cred",
94 "fieldName": "cred",
108 "fieldName": "cred",
142 "fieldName": "cred",
156 "fieldName": "cred",
170 "fieldName": "cred",
[all …]
/ohos5.0/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::e… 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()
/ohos5.0/base/security/device_security_level/services/dslm/
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 …ecInfoResponse(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 != NULL) { in ParseDeviceSecInfoResponse()
249 *cred = out; in ParseDeviceSecInfoResponse()
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.h36 int32_t BuildDeviceSecInfoResponse(uint64_t challenge, const DslmCredBuff *cred, MessageBuff **msg);
40 …cInfoResponse(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()
/ohos5.0/base/security/certificate_manager/test/unittest/inner_permission_test/
H A Dcm_inner_permission_test.cpp204 struct Credential cred; variable
205 (void)memset_s(&cred, sizeof(struct Credential), 0, sizeof(struct Credential));
206 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN;
208 ASSERT_TRUE(cred.credData.data != nullptr);
213 int32_t ret = CmGetAppCert(&uri, CM_CREDENTIAL_STORE, &cred);
216 free(cred.credData.data);
429 struct Credential cred; variable
431 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN;
433 ASSERT_TRUE(cred.credData.data != nullptr);
434 ret = CmGetAppCert(&keyUri, CM_PRI_CREDENTIAL_STORE, &cred);
[all …]
/ohos5.0/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()
/ohos5.0/base/web/webview/ohos_adapter/cert_mgr_adapter/src/
H A Dcert_mgr_adapter_impl.cpp360 struct Credential cred; in GetAppCert() local
362 cred.credData.size = MAX_LEN_CERTIFICATE_CHAIN; in GetAppCert()
364 if (cred.credData.data == nullptr) { 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.credData.data, cred.credData.size) != EOK) { in GetAppCert()
381 free(cred.credData.data); in GetAppCert()
382 cred.credData.data = nullptr; in GetAppCert()
386 free(cred.credData.data); in GetAppCert()
[all …]
/ohos5.0/base/security/device_auth/services/session_manager/src/session/v2/
H A Ddev_session_v2.c346 ProtocolEntity *entity = cred->protocolVec.get(&cred->protocolVec, index); in RemoveUnsupportedProtocols()
363 RemoveUnsupportedProtocols(cred); in CheckAllCredsValidity()
372 DestroyIdentityInfo(cred); in CheckAllCredsValidity()
524 if (cred->proof.certInfo.isPseudonym) { in AddCertCredInfo()
546 if (cred->proofType == PRE_SHARED) { in AddCredInfoToEventData()
986 if (cred->proofType == CERTIFICATED) { in CreateIsoSubSession()
1015 if (cred->proofType == CERTIFICATED) { in CreateDlSpekeSubSession()
1300 if (cred->proofType == CERTIFICATED) { in AddAuthInfoToContextByCred()
1357 uint32_t protocolNum = cred->protocolVec.size(&cred->protocolVec); in ClientCreateAuthSubSessionByCred()
1453 if (cred->proofType != CERTIFICATED) { in SetPeerUserIdToContext()
[all …]
/ohos5.0/base/startup/init/services/param/base/
H A Dparam_base.c419 if (srcLabel->cred.gid == node->gid) { in DacCheckGroupPermission()
446 if (srcLabel->cred.uid == 0) { in DacCheckParamPermission()
465 if (srcLabel->cred.uid == node->uid) { in DacCheckParamPermission()
483 …PARAM_LOGW("Param '%s' label gid:%d uid:%d mode 0%x", name, srcLabel->cred.gid, srcLabel->cred.uid… in DacCheckParamPermission()
515 info.uc.pid = srcLabel->cred.pid; in SelinuxCheckParamPermission()
516 info.uc.uid = srcLabel->cred.uid; in SelinuxCheckParamPermission()
517 info.uc.gid = srcLabel->cred.gid; in SelinuxCheckParamPermission()
530 … name, GetSelinuxContent(name), srcLabel->cred.pid, srcLabel->cred.uid, srcLabel->cred.gid); in SelinuxCheckParamPermission()
541 if (srcLabel->cred.uid == 0 && srcLabel->cred.pid == 1) { in CheckParamPermission_()
567 if (srcLabel->cred.uid == 0 && srcLabel->cred.pid == 1 && mode == DAC_WRITE) { in CheckParamPermission_()
[all …]
/ohos5.0/base/useriam/user_auth_framework/services/core/src/
H A Dresource_node_utils.cpp121 for (auto &cred : in) { in ClassifyCredInfoByExecutor() local
122 if (cred == nullptr) { in ClassifyCredInfoByExecutor()
126 uint64_t executorIndex = cred->GetExecutorIndex(); in ClassifyCredInfoByExecutor()
130 out[executorIndex].push_back(cred); in ClassifyCredInfoByExecutor()
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/netlink/src/
H A Dnetlink_listener.cpp64 struct ucred cred; in UeventKernelMulticastRecv() local
65 …if (memcpy_s(&cred, sizeof(cred), CMSG_DATA(cmsg), sizeof(struct ucred)) != EOK || cred.uid != 0) { in UeventKernelMulticastRecv()
/ohos5.0/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()
/ohos5.0/docs/zh-cn/device-dev/subsystems/
H A Dsubsys-security-devicesecuritylevel.md432 生成一个名为cred.txt的凭据文件,并指定设备型号为rk3568、设备版本号为3.0.0、设备安全等级为SL3等payload信息。
435 …--field-model rk3568 --field-software-version 3.0.0 --field-security-level SL3 --cred-file cred.txt
441 cat cred.txt
448 ./dslm_cred_tool.py verify --cred-file cred.txt
482 hdc_std file send cred.txt /system/etc/dslm_finger.cfg
/ohos5.0/base/security/device_security_level/services/dfx/
H A Ddslm_hidumper.c151 DslmCredBuff *cred = NULL; in GetDefaultStatus() local
152 *requestResult = DefaultRequestDslmCred(device, &object, &cred); in GetDefaultStatus()
157 *verifyResult = DefaultVerifyDslmCred(device, object.challenge, cred, &info); in GetDefaultStatus()
159 DestroyDslmCred(cred); in GetDefaultStatus()
/ohos5.0/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()
/ohos5.0/base/startup/init/services/loopevent/task/
H A Dle_streamtask.c169 struct ucred cred = {-1, -1, -1}; in DumpStreamConnectTaskInfo_() local
171 if (getsockopt(LE_GetSocketFd(taskHandle), SOL_SOCKET, SO_PEERCRED, &cred, &credSize) == 0) { in DumpStreamConnectTaskInfo_()
172 printf("\t Service Pid: %d \n", cred.pid); in DumpStreamConnectTaskInfo_()
173 printf("\t Service Uid: %u \n", cred.uid); in DumpStreamConnectTaskInfo_()
174 printf("\t Service Gid: %u \n", cred.gid); in DumpStreamConnectTaskInfo_()
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/wrapper/
H A Ddata_receiver.cpp99 ucred *cred = reinterpret_cast<ucred *>(CMSG_DATA(cmsgHeader)); in ReceiveMessage() local
100 uid = cred->uid; in ReceiveMessage()

123