Home
last modified time | relevance | path

Searched refs:authUri (Results 1 – 24 of 24) sorted by relevance

/base/security/certificate_manager/test/unittest/src/
Dcm_is_authed_test.cpp65 static void TestGrantApp(struct CmBlob *authUri) in TestGrantApp() argument
71 int32_t ret = CmGrantAppCertificate(&keyUri, appId, authUri); in TestGrantApp()
83 struct CmBlob *authUri = nullptr; /* authUri is NULL */ variable
84 int32_t ret = CmIsAuthorizedApp(authUri);
98 struct CmBlob authUri = { 0, uriData }; /* authUri size is 0 */ variable
99 int32_t ret = CmIsAuthorizedApp(&authUri);
113 struct CmBlob authUri = { sizeof(uriData), nullptr }; /* authUri data is null */ variable
114 int32_t ret = CmIsAuthorizedApp(&authUri);
128 struct CmBlob authUri = { strlen((char *)uriData), uriData }; /* authUri data not end of '\0' */ variable
129 int32_t ret = CmIsAuthorizedApp(&authUri);
[all …]
Dcm_grant_test.cpp69 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestNormalGrant() local
76 authUri.size = DEFAULT_AUTH_URI_LEN; /* clear authUri size */ in TestNormalGrant()
77 ret = CmGrantAppCertificate(&keyUri, appId, &authUri); in TestNormalGrant()
96 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
100 int32_t ret = CmGrantAppCertificate(keyUri, appId, &authUri);
116 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
120 int32_t ret = CmGrantAppCertificate(&keyUri, appId, &authUri);
136 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
140 int32_t ret = CmGrantAppCertificate(&keyUri, appId, &authUri);
156 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
[all …]
Dcm_init_test.cpp84 struct CmBlob *authUri = nullptr; /* authUri is NULL */ variable
89 int32_t ret = CmInit(authUri, &spec, &handle);
102 struct CmBlob authUri = { 0, uriData }; /* authUri size is 0 */ variable
107 int32_t ret = CmInit(&authUri, &spec, &handle);
120 struct CmBlob authUri = { sizeof(uriData), nullptr }; /* authUri data is null */ variable
125 int32_t ret = CmInit(&authUri, &spec, &handle);
138 struct CmBlob authUri = { strlen((char *)uriData), uriData }; /* authUri data not end of '\0' */ variable
143 int32_t ret = CmInit(&authUri, &spec, &handle);
156 struct CmBlob authUri = { sizeof(uriData), uriData }; variable
161 int32_t ret = CmInit(&authUri, &spec, &handle);
[all …]
Dcm_get_auth_list_test.cpp65 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in SetUp() local
67 ret = CmGrantAppCertificate(&g_keyUri, appId, &authUri); in SetUp()
100 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestGrant() local
105 authUri.size = DEFAULT_AUTH_URI_LEN; in TestGrant()
106 ret = CmGrantAppCertificate(&g_keyUri, appId, &authUri); in TestGrant()
108 ret = CmIsAuthorizedApp(&authUri); in TestGrant()
Dcm_remove_grant_test.cpp69 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestRemoveGrant() local
72 ret = CmGrantAppCertificate(&keyUri, appId, &authUri); in TestRemoveGrant()
/base/security/certificate_manager/test/unittest/multi_thread_test/src/
Dcm_grant_multi_thread_test.cpp77 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestGrantAppCertificate() local
85 authUri.size = DEFAULT_AUTH_URI_LEN; /* clear authUri size */ in TestGrantAppCertificate()
86 ret = CmGrantAppCertificate(&keyUri, appId, &authUri); in TestGrantAppCertificate()
110 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
114 int32_t ret = CmGrantAppCertificate(keyUri, appId, &authUri);
130 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
134 int32_t ret = CmGrantAppCertificate(&keyUri, appId, &authUri);
150 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
154 int32_t ret = CmGrantAppCertificate(&keyUri, appId, &authUri);
170 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; variable
[all …]
Dcm_get_auth_list_multi_thread_test.cpp70 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in SetUp() local
72 ret = CmGrantAppCertificate(&g_keyUri, appId, &authUri); in SetUp()
105 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestGrant() local
110 authUri.size = DEFAULT_AUTH_URI_LEN; in TestGrant()
111 ret = CmGrantAppCertificate(&g_keyUri, appId, &authUri); in TestGrant()
113 ret = CmIsAuthorizedApp(&authUri); in TestGrant()
Dcm_remove_grant_multi_thread_test.cpp74 struct CmBlob authUri = { DEFAULT_AUTH_URI_LEN, authUriData }; in TestRemoveGrantPreAction() local
77 ret = CmGrantAppCertificate(&keyUri, appId, &authUri); in TestRemoveGrantPreAction()
/base/security/certificate_manager/test/fuzz_test/cmgrantappcertificate_fuzzer/
Dcmgrantappcertificate_fuzzer.cpp47 struct CmBlob authUri = { 0, nullptr }; in DoSomethingInterestingWithMyAPI() local
48 if (!GetCmBlobFromBuffer(myData, &remainSize, &offset, &authUri)) { in DoSomethingInterestingWithMyAPI()
54 (void)CmGrantAppCertificate(&keyUri, appUid, &authUri); in DoSomethingInterestingWithMyAPI()
/base/security/certificate_manager/test/fuzz_test/cminit_fuzzer/
Dcminit_fuzzer.cpp37 struct CmBlob authUri = { 0, nullptr }; in DoSomethingInterestingWithMyAPI() local
38 if (!GetCmBlobFromBuffer(myData, &remainSize, &offset, &authUri)) { in DoSomethingInterestingWithMyAPI()
59 (void)CmInit(&authUri, &spec, &handle); in DoSomethingInterestingWithMyAPI()
/base/security/certificate_manager/interfaces/innerkits/cert_manager_standard/main/src/
Dcert_manager_api.c147 …int32_t CmGrantAppCertificate(const struct CmBlob *keyUri, uint32_t appUid, struct CmBlob *authUri) in CmGrantAppCertificate() argument
150 if ((keyUri == NULL) || (authUri == NULL)) { in CmGrantAppCertificate()
155 int32_t ret = CmClientGrantAppCertificate(keyUri, appUid, authUri); in CmGrantAppCertificate()
173 CM_API_EXPORT int32_t CmIsAuthorizedApp(const struct CmBlob *authUri) in CmIsAuthorizedApp() argument
176 if (authUri == NULL) { in CmIsAuthorizedApp()
181 int32_t ret = CmClientIsAuthorizedApp(authUri); in CmIsAuthorizedApp()
199 CM_API_EXPORT int32_t CmInit(const struct CmBlob *authUri, const struct CmSignatureSpec *spec, stru… in CmInit() argument
202 if ((authUri == NULL) || (spec == NULL) || (handle == NULL)) { in CmInit()
207 int32_t ret = CmClientInit(authUri, spec, handle); in CmInit()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/
Dcert_manager_service.h32 uint32_t appUid, struct CmBlob *authUri);
37 int32_t CmServiceIsAuthorizedApp(const struct CmContext *context, const struct CmBlob *authUri);
41 int32_t CmServiceInit(const struct CmContext *context, const struct CmBlob *authUri,
Dcert_manager_auth_mgr.h26 uint32_t appUid, struct CmBlob *authUri);
31 int32_t CmAuthIsAuthorizedApp(const struct CmContext *context, const struct CmBlob *authUri);
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/
Dcm_ipc_client.h46 … CmClientGrantAppCertificate(const struct CmBlob *keyUri, uint32_t appUid, struct CmBlob *authUri);
50 int32_t CmClientIsAuthorizedApp(const struct CmBlob *authUri);
54 int32_t CmClientInit(const struct CmBlob *authUri, const struct CmSignatureSpec *spec, struct CmBlo…
/base/security/certificate_manager/interfaces/innerkits/cert_manager_standard/main/include/
Dcert_manager_api.h44 …nt32_t CmGrantAppCertificate(const struct CmBlob *keyUri, uint32_t appUid, struct CmBlob *authUri);
48 CM_API_EXPORT int32_t CmIsAuthorizedApp(const struct CmBlob *authUri);
52 CM_API_EXPORT int32_t CmInit(const struct CmBlob *authUri, const struct CmSignatureSpec *spec, stru…
/base/security/certificate_manager/interfaces/kits/napi/src/
Dcm_napi_grant.cpp45 struct CmBlob *authUri = nullptr; member
67 FreeCmBlob(context->authUri); in FreeGrantAsyncContext()
182 context->authUri = static_cast<CmBlob *>(CmMalloc(sizeof(CmBlob))); in GrantUidExecute()
183 if (context->authUri == nullptr) { in GrantUidExecute()
188 (void)memset_s(context->authUri, sizeof(CmBlob), 0, sizeof(CmBlob)); in GrantUidExecute()
190 context->authUri->data = static_cast<uint8_t *>(CmMalloc(OUT_AUTH_URI_SIZE)); in GrantUidExecute()
191 if (context->authUri->data == nullptr) { in GrantUidExecute()
196 (void)memset_s(context->authUri->data, OUT_AUTH_URI_SIZE, 0, OUT_AUTH_URI_SIZE); in GrantUidExecute()
197 context->authUri->size = OUT_AUTH_URI_SIZE; in GrantUidExecute()
199 context->errCode = CmGrantAppCertificate(context->keyUri, context->appUid, context->authUri); in GrantUidExecute()
[all …]
Dcm_napi_sign_verify.cpp47 struct CmBlob *authUri = nullptr; member
71 FreeCmBlob(context->authUri); in FreeSignVerifyAsyncContext()
151 napi_value result = ParseString(env, argv[index], context->authUri); in ParseCMInitParams()
431 context->errCode = CmInit(context->authUri, context->spec, context->handle); in InitExecute()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_auth_mgr.c252 struct CmBlob *authUri) in ConstructAuthUri() argument
282 ret = CmConstructUri(&uri, authUri); in ConstructAuthUri()
287 …tic int32_t GenerateAuthUri(const struct CMUri *uriObj, uint32_t clientUid, struct CmBlob *authUri) in GenerateAuthUri() argument
308 if (authUri->size < tempAuthUri.size) { in GenerateAuthUri()
313 if (memcpy_s(authUri->data, authUri->size, tempAuthUri.data, tempAuthUri.size) != EOK) { in GenerateAuthUri()
318 authUri->size = tempAuthUri.size; in GenerateAuthUri()
327 uint32_t appUid, struct CmBlob *authUri) in CmAuthGrantAppCertificate() argument
354 ret = GenerateAuthUri(&uriObj, appUid, authUri); in CmAuthGrantAppCertificate()
486 int32_t CmAuthIsAuthorizedApp(const struct CmContext *context, const struct CmBlob *authUri) in CmAuthIsAuthorizedApp() argument
490 int32_t ret = GetAndCheckUriObj(&uriObj, authUri); in CmAuthIsAuthorizedApp()
Dcert_manager_service.c146 uint32_t appUid, struct CmBlob *authUri) in CmServiceGrantAppCertificate() argument
148 if (CheckUri(keyUri) != CM_SUCCESS || CmCheckBlob(authUri) != CM_SUCCESS) { in CmServiceGrantAppCertificate()
158 return CmAuthGrantAppCertificate(context, keyUri, appUid, authUri); in CmServiceGrantAppCertificate()
177 int32_t CmServiceIsAuthorizedApp(const struct CmContext *context, const struct CmBlob *authUri) in CmServiceIsAuthorizedApp() argument
179 if (CheckUri(authUri) != CM_SUCCESS) { in CmServiceIsAuthorizedApp()
189 return CmAuthIsAuthorizedApp(context, authUri); in CmServiceIsAuthorizedApp()
207 int32_t CmServiceInit(const struct CmContext *context, const struct CmBlob *authUri, in CmServiceInit() argument
210 if (CheckUri(authUri) != CM_SUCCESS || CmCheckBlob(handle) != CM_SUCCESS) { in CmServiceInit()
221 ret = CmCheckAndGetCommonUri(context, authUri, &commonUri); in CmServiceInit()
/base/security/certificate_manager/test/unittest/common_permission_test/
Dcm_common_permission_test.cpp359 struct CmBlob authUri = { sizeof(authUriData), authUriData }; variable
361 int32_t ret = CmGrantAppCertificate(&uri, 0, &authUri);
417 struct CmBlob authUri = { sizeof(uriData), uriData }; variable
422 int32_t ret = CmInit(&authUri, &spec, &handle);
/base/security/certificate_manager/test/unittest/inner_permission_test/
Dcm_inner_permission_test.cpp329 struct CmBlob authUri = { sizeof(authUriData), authUriData }; variable
331 int32_t ret = CmGrantAppCertificate(&uri, 0, &authUri);
360 struct CmBlob authUri = { sizeof(uriData), uriData }; variable
361 int32_t ret = CmIsAuthorizedApp(&authUri);
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_ipc_client.c646 …t CmClientGrantAppCertificate(const struct CmBlob *keyUri, uint32_t appUid, struct CmBlob *authUri) in CmClientGrantAppCertificate() argument
648 if (CmCheckBlob(keyUri) != CM_SUCCESS || CmCheckBlob(authUri) != CM_SUCCESS) { in CmClientGrantAppCertificate()
658 …_t ret = ClientSerializationAndSend(CM_MSG_GRANT_APP_CERT, params, CM_ARRAY_SIZE(params), authUri); in CmClientGrantAppCertificate()
702 int32_t CmClientIsAuthorizedApp(const struct CmBlob *authUri) in CmClientIsAuthorizedApp() argument
704 if (CmCheckBlob(authUri) != CM_SUCCESS) { in CmClientIsAuthorizedApp()
710 { .tag = CM_TAG_PARAM0_BUFFER, .blob = *authUri }, in CmClientIsAuthorizedApp()
741 int32_t CmClientInit(const struct CmBlob *authUri, const struct CmSignatureSpec *spec, struct CmBlo… in CmClientInit() argument
743 if (CmCheckBlob(authUri) != CM_SUCCESS || CmCheckBlob(handle) != CM_SUCCESS) { in CmClientInit()
750 { .tag = CM_TAG_PARAM0_BUFFER, .blob = *authUri }, in CmClientInit()
/base/security/certificate_manager/interfaces/kits/js/
D@ohos.security.certManager.d.ts284 function init(authUri: string, spec: CMSignatureSpec, callback: AsyncCallback<CMHandle>) : void;
285 function init(authUri: string, spec: CMSignatureSpec) : Promise<CMHandle>;
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/
Dcm_ipc_service.c732 struct CmBlob authUri = { 0, NULL }; in CmIpcServiceIsAuthorizedApp() local
737 { .tag = CM_TAG_PARAM0_BUFFER, .blob = &authUri }, in CmIpcServiceIsAuthorizedApp()
745 ret = CmServiceIsAuthorizedApp(&cmContext, &authUri); in CmIpcServiceIsAuthorizedApp()
752 CmReport(__func__, &cmContext, &authUri, ret); in CmIpcServiceIsAuthorizedApp()
800 struct CmBlob authUri = { 0, NULL }; in CmIpcServiceInit() local
803 { .tag = CM_TAG_PARAM0_BUFFER, .blob = &authUri }, in CmIpcServiceInit()
820 ret = CmServiceInit(&cmContext, &authUri, &spec, outData); in CmIpcServiceInit()