Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 25 of 61) sorted by relevance

123

/base/security/huks/test/unittest/huks_lite_test/liteos_m_adapter/
Dhks_curve25519_test.c96 osThreadAttr_t attr; in LITE_TEST_CASE() local
98 attr.name = "test"; in LITE_TEST_CASE()
99 attr.attr_bits = 0U; in LITE_TEST_CASE()
100 attr.cb_mem = NULL; in LITE_TEST_CASE()
101 attr.cb_size = 0U; in LITE_TEST_CASE()
102 attr.stack_mem = NULL; in LITE_TEST_CASE()
103 attr.stack_size = TEST_TASK_STACK_SIZE; in LITE_TEST_CASE()
104 attr.priority = g_setPriority; in LITE_TEST_CASE()
105 id = osThreadNew((osThreadFunc_t)LocalHksCurve25519Test002, NULL, &attr); in LITE_TEST_CASE()
/base/security/crypto_framework/frameworks/key/
Dsym_key_generator.c55 static const SymKeyGenFuncSet *FindAbility(SymKeyAttr *attr) in FindAbility() argument
57 if (attr == NULL) { in FindAbility()
61 if (SYMKEY_ABILITY_SET[i].algo == attr->algo) { in FindAbility()
65 LOGE("Algo not support! [Algo]: %d", attr->algo); in FindAbility()
69 static void SetKeyLength(HCF_ALG_PARA_VALUE value, void *attr) in SetKeyLength() argument
71 SymKeyAttr *keyAttr = (SymKeyAttr *)attr; in SetKeyLength()
95 static HcfResult OnSetSymKeyParameter(const HcfParaConfig* config, void *attr) in OnSetSymKeyParameter() argument
97 if ((config == NULL) || (attr == NULL)) { in OnSetSymKeyParameter()
105 SetKeyLength(config->paraValue, attr); in OnSetSymKeyParameter()
184 SymKeyAttr attr = {0}; in HcfSymKeyGeneratorCreate() local
[all …]
/base/useriam/user_auth_framework/test/fuzztest/clients/coauthclient_fuzzer/
Dco_auth_client_fuzzer.cpp164 std::vector<uint8_t> attr; in FuzzExecutorCallbackServiceOnBeginExecute() local
165 Common::FillFuzzUint8Vector(parcel, attr); in FuzzExecutorCallbackServiceOnBeginExecute()
166 Attributes command(attr); in FuzzExecutorCallbackServiceOnBeginExecute()
177 std::vector<uint8_t> attr; in FuzzExecutorCallbackServiceOnEndExecute() local
178 Common::FillFuzzUint8Vector(parcel, attr); in FuzzExecutorCallbackServiceOnEndExecute()
179 Attributes command(attr); in FuzzExecutorCallbackServiceOnEndExecute()
189 std::vector<uint8_t> attr; in FuzzExecutorCallbackServiceOnSetProperty() local
190 Common::FillFuzzUint8Vector(parcel, attr); in FuzzExecutorCallbackServiceOnSetProperty()
191 Attributes properties(attr); in FuzzExecutorCallbackServiceOnSetProperty()
201 std::vector<uint8_t> attr; in FuzzExecutorCallbackServiceOnGetProperty() local
[all …]
/base/security/device_security_level/baselib/utils/include/
Dutils_mutex.h51 pthread_mutexattr_t attr; in InitRecursiveMutex() local
52 pthread_mutexattr_init(&attr); in InitRecursiveMutex()
53 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); in InitRecursiveMutex()
54 (void)pthread_mutex_init(&mutex->mutex, &attr); in InitRecursiveMutex()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/rsa/src/
Dcipher_rsa_openssl.c33 CipherAttr attr; member
127 CipherAttr attr = impl->attr; in SetDetailParams() local
128 const EVP_MD *md = GetOpensslDigestAlg(attr.md); in SetDetailParams()
129 if (md == NULL && attr.paddingMode == HCF_OPENSSL_RSA_PKCS1_OAEP_PADDING) { in SetDetailParams()
133 const EVP_MD *mgf1md = GetOpensslDigestAlg(attr.mgf1md); in SetDetailParams()
134 if (mgf1md == NULL && attr.paddingMode == HCF_OPENSSL_RSA_PKCS1_OAEP_PADDING) { in SetDetailParams()
139 if (GetOpensslPadding(attr.paddingMode, &opensslPadding) != HCF_SUCCESS) { in SetDetailParams()
148 if (attr.paddingMode == HCF_OPENSSL_RSA_PKCS1_OAEP_PADDING) { in SetDetailParams()
179 impl->attr.mode = (int32_t)opMode; in EngineInit()
238 CipherAttr attr = impl->attr; in EngineDoFinal() local
[all …]
/base/useriam/user_auth_framework/frameworks/native/ipc/src/
Dexecutor_callback_proxy.cpp79 auto attr = command.Serialize(); in OnBeginExecute() local
80 if (!data.WriteUInt8Vector(attr)) { in OnBeginExecute()
111 auto attr = command.Serialize(); in OnEndExecute() local
112 if (!data.WriteUInt8Vector(attr)) { in OnEndExecute()
139 auto attr = properties.Serialize(); in OnSetProperty() local
140 if (!data.WriteUInt8Vector(attr)) { in OnSetProperty()
184 std::vector<uint8_t> attr; in OnGetProperty() local
185 if (!reply.ReadUInt8Vector(&attr)) { in OnGetProperty()
189 values = Attributes(attr); in OnGetProperty()
/base/useriam/user_auth_framework/test/fuzztest/services/servicecore_fuzzer/src/
Dresource_node_fuzzer.cpp199 std::vector<uint8_t> attr; in FuzzResourceNodeBeginExecute() local
200 Common::FillFuzzUint8Vector(parcel, attr); in FuzzResourceNodeBeginExecute()
201 Attributes command(attr); in FuzzResourceNodeBeginExecute()
213 std::vector<uint8_t> attr; in FuzzResourceNodeEndExecute() local
214 Common::FillFuzzUint8Vector(parcel, attr); in FuzzResourceNodeEndExecute()
215 Attributes command(attr); in FuzzResourceNodeEndExecute()
226 std::vector<uint8_t> attr; in FuzzResourceNodeSetProperty() local
227 Common::FillFuzzUint8Vector(parcel, attr); in FuzzResourceNodeSetProperty()
228 Attributes properties(attr); in FuzzResourceNodeSetProperty()
239 std::vector<uint8_t> attr; in FuzzResourceNodeGetProperty() local
[all …]
/base/useriam/user_auth_framework/test/unittest/executors/
Didentify_command_unit_test.cpp87 Attributes attr; variable
88 auto command = Common::MakeShared<IdentifyCommand>(executor, testScheduleId, attr, messenger);
109 Attributes attr; variable
110 auto command = Common::MakeShared<IdentifyCommand>(executor, testScheduleId, attr, messenger);
139 Attributes attr; variable
140 auto command = Common::MakeShared<IdentifyCommand>(executor, testScheduleId, attr, messenger);
156 Attributes attr; variable
157 auto command = Common::MakeShared<IdentifyCommand>(executor, testScheduleId, attr, messenger);
185 Attributes attr; variable
186 auto command = Common::MakeShared<IdentifyCommand>(executor, testScheduleId, attr, messenger);
[all …]
Denroll_command_unit_test.cpp87 Attributes attr; variable
88 auto command = Common::MakeShared<EnrollCommand>(executor, testScheduleId, attr, messenger);
109 Attributes attr; variable
110 auto command = Common::MakeShared<EnrollCommand>(executor, testScheduleId, attr, messenger);
139 Attributes attr; variable
140 auto command = Common::MakeShared<EnrollCommand>(executor, testScheduleId, attr, messenger);
156 Attributes attr; variable
157 auto command = Common::MakeShared<EnrollCommand>(executor, testScheduleId, attr, messenger);
186 Attributes attr; variable
187 auto command = Common::MakeShared<EnrollCommand>(executor, testScheduleId, attr, messenger);
[all …]
Dauth_command_unit_test.cpp87 Attributes attr; variable
88 auto command = Common::MakeShared<AuthCommand>(executor, testScheduleId, attr, messenger);
108 Attributes attr; variable
109 auto command = Common::MakeShared<AuthCommand>(executor, testScheduleId, attr, messenger);
138 Attributes attr; variable
139 auto command = Common::MakeShared<AuthCommand>(executor, testScheduleId, attr, messenger);
155 Attributes attr; variable
156 auto command = Common::MakeShared<AuthCommand>(executor, testScheduleId, attr, messenger);
184 Attributes attr; variable
185 auto command = Common::MakeShared<AuthCommand>(executor, testScheduleId, attr, messenger);
[all …]
/base/security/device_auth/deps_adapter/os_adapter/impl/src/liteos/
Dhc_thread.c51 pthread_attr_t attr; in Start() local
52 pthread_attr_init(&attr); in Start()
53 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); in Start()
56 pthread_attr_setstacksize(&attr, thread->stackSize); in Start()
59 int result = pthread_create(&thread->thread, &attr, StaticThreadFunc, thread); in Start()
60 pthread_attr_destroy(&attr); in Start()
/base/security/device_auth/deps_adapter/os_adapter/impl/src/linux/
Dhc_thread.c55 pthread_attr_t attr; in Start() local
56 pthread_attr_init(&attr); in Start()
57 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); in Start()
60 pthread_attr_setstacksize(&attr, thread->stackSize); in Start()
63 int result = pthread_create(&thread->thread, &attr, StaticThreadFunc, thread); in Start()
64 pthread_attr_destroy(&attr); in Start()
Dhc_condition.c124 pthread_condattr_t attr; in InitHcCond() local
125 pthread_condattr_init(&attr); in InitHcCond()
126 pthread_cond_init(&hcCond->cond, &attr); in InitHcCond()
127 pthread_condattr_destroy(&attr); in InitHcCond()
/base/security/huks/utils/condition/
Dhks_condition.c85 pthread_condattr_t attr; in HksConditionCreate() local
86 pthread_condattr_init(&attr); in HksConditionCreate()
87 ret = pthread_cond_init(&condition->cond, &attr); in HksConditionCreate()
88 pthread_condattr_destroy(&attr); in HksConditionCreate()
/base/account/os_account/frameworks/account_iam/src/
Daccount_iam_callback_service.cpp84 Attributes attr; in OnResult() local
85 attr.SetUint8ArrayValue(Attributes::AttributeKey::ATTR_SIGNATURE, result.token); in OnResult()
86attr.SetInt32Value(Attributes::AttributeKey::ATTR_REMAIN_TIMES, result.authProperty.remainingTimes… in OnResult()
87attr.SetInt32Value(Attributes::AttributeKey::ATTR_FREEZING_TIME, result.authProperty.freezingTime); in OnResult()
88 callback_->OnResult(resultCode, attr); in OnResult()
105 Attributes attr; in OnSetData() local
106 idmCallback_->OnResult(ERR_ACCOUNT_COMMON_INSUFFICIENT_MEMORY_ERROR, attr); in OnSetData()
/base/useriam/user_auth_framework/frameworks/native/client/src/
Dexecutor_messenger_client.cpp56 auto attr = Common::MakeShared<Attributes>(finalResult.Serialize()); in Finish() local
57 if (attr == nullptr) { in Finish()
61 return messenger_->Finish(scheduleId, srcRole, static_cast<ResultCode>(resultCode), attr); in Finish()
/base/useriam/user_auth_framework/test/fuzztest/clients/userauthclient_fuzzer/
Duser_auth_client_fuzzer.cpp196 std::vector<uint8_t> attr; in FuzzUserAuthCallbackServiceOnResult() local
197 Common::FillFuzzUint8Vector(parcel, attr); in FuzzUserAuthCallbackServiceOnResult()
198 Attributes extraInfo(attr); in FuzzUserAuthCallbackServiceOnResult()
210 std::vector<uint8_t> attr; in FuzzUserAuthCallbackServiceOnAcquireInfo() local
211 Common::FillFuzzUint8Vector(parcel, attr); in FuzzUserAuthCallbackServiceOnAcquireInfo()
212 Attributes extraInfo(attr); in FuzzUserAuthCallbackServiceOnAcquireInfo()
223 std::vector<uint8_t> attr; in FuzzGetPropCallbackServiceOnPropResult() local
224 Common::FillFuzzUint8Vector(parcel, attr); in FuzzGetPropCallbackServiceOnPropResult()
225 Attributes extraInfo(attr); in FuzzGetPropCallbackServiceOnPropResult()
/base/hiviewdfx/hilog_lite/frameworks/featured/
Dhiview_log.c309 static void SecDecodeFlags(SecChar ch, SecFormatAttr *attr) in SecDecodeFlags() argument
313 attr->flags |= SECUREC_FLAG_SIGN_SPACE; in SecDecodeFlags()
316 attr->flags |= SECUREC_FLAG_SIGN; in SecDecodeFlags()
319 attr->flags |= SECUREC_FLAG_LEFT; in SecDecodeFlags()
322 attr->flags |= SECUREC_FLAG_LEADZERO; /* add zero th the front */ in SecDecodeFlags()
325 attr->flags |= SECUREC_FLAG_ALTERNATE; /* output %x with 0x */ in SecDecodeFlags()
333 static int SecDecodeSize(SecChar ch, SecFormatAttr *attr, const SecChar **format) in SecDecodeSize() argument
338 attr->flags |= SECUREC_FLAG_INTMAX; in SecDecodeSize()
343 attr->flags |= SECUREC_FLAG_LONGLONG | SECUREC_FLAG_LONG_DOUBLE; in SecDecodeSize()
348 attr->flags |= SECUREC_FLAG_LONGLONG; /* long long */ in SecDecodeSize()
[all …]
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/aes/src/
Dcipher_aes_openssl.c40 CipherAttr attr; member
207 switch (impl->attr.mode) { in GetCipherType()
209 return CipherEcbType(impl->attr.keySize); in GetCipherType()
211 return CipherCbcType(impl->attr.keySize); in GetCipherType()
213 return CipherCtrType(impl->attr.keySize); in GetCipherType()
215 return CipherOfbType(impl->attr.keySize); in GetCipherType()
217 return CipherCfbType(impl->attr.keySize); in GetCipherType()
219 return CipherCfb1Type(impl->attr.keySize); in GetCipherType()
221 return CipherCfb8Type(impl->attr.keySize); in GetCipherType()
223 return CipherCfb128Type(impl->attr.keySize); in GetCipherType()
[all …]
Dcipher_3des_openssl.c33 CipherAttr attr; member
49 switch (impl->attr.mode) { in GetCipherType()
134 int32_t padding = (cipherImpl->attr.paddingMode == HCF_ALG_NOPADDING) ? 0 : EVP_PADDING_PKCS7; in EngineCipherInit()
278 HcfResult HcfCipherDesGeneratorSpiCreate(CipherAttr *attr, HcfCipherGeneratorSpi **generator) in HcfCipherDesGeneratorSpiCreate() argument
280 if ((attr == NULL) || (generator == NULL)) { in HcfCipherDesGeneratorSpiCreate()
290 (void)memcpy_s(&returnImpl->attr, sizeof(CipherAttr), attr, sizeof(CipherAttr)); in HcfCipherDesGeneratorSpiCreate()
/base/security/access_token/interfaces/innerkits/nativetoken/test/unittest/src/
Dnativetoken_oper_test.cpp178 StrArrayAttr attr; variable
179 attr.strKey = "dcaps";
180 attr.maxStrNum = 1;
181 attr.maxStrLen = 10;
187 EXPECT_NE(GetInfoArrFromJson(jsonroot, test, &resSize, &attr), 0);
194 EXPECT_NE(GetInfoArrFromJson(jsonroot, test, &resSize, &attr), 0);
201 EXPECT_NE(GetInfoArrFromJson(jsonroot, test, &resSize, &attr), 0);
/base/security/crypto_framework/frameworks/crypto_operation/
Dcipher.c219 static const HcfCipherGenFuncSet *FindAbility(CipherAttr *attr) in FindAbility() argument
221 if (attr == NULL) { in FindAbility()
225 if (CIPHER_ABILITY_SET[i].algo == attr->algo) { in FindAbility()
229 LOGE("Algo not support! [Algo]: %d", attr->algo); in FindAbility()
235 CipherAttr attr = {0}; in HcfCipherCreate() local
240 if (ParseAndSetParameter(transformation, (void *)&attr, OnSetParameter) != HCF_SUCCESS) { in HcfCipherCreate()
245 const HcfCipherGenFuncSet *funcSet = FindAbility(&attr); in HcfCipherCreate()
261 HcfResult res = funcSet->createFunc(&attr, &spiObj); in HcfCipherCreate()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/aes/inc/
Daes_openssl.h42 HcfResult HcfCipherDesGeneratorSpiCreate(CipherAttr *attr, HcfCipherGeneratorSpi **generator);
44 HcfResult HcfCipherAesGeneratorSpiCreate(CipherAttr *attr, HcfCipherGeneratorSpi **generator);
/base/account/os_account/test/fuzztest/iamaccount/setproperty_fuzzer/
Dsetproperty_fuzzer.cpp39 std::vector<uint8_t> attr = {static_cast<uint8_t>(size)}; in SetPropertyFuzzTest() local
43 .attrs = Attributes(attr), in SetPropertyFuzzTest()
/base/security/crypto_framework/plugin/openssl_plugin/key/sym_key_generator/src/
Dsym_key_openssl.c33 SymKeyAttr attr; member
188 if (sprintf_s(keySizeChar, MAX_KEY_STR_SIZE, "%d", impl->attr.keySize) < 0) { in GetAlgoName()
200 HCF_ALG_VALUE type = impl->attr.algo; in GetAlgoName()
262 int32_t res = HcfSymmKeySpiCreate(impl->attr.keySize / KEY_BIT, returnSymmKey); in GenerateSymmKey()
290 …if ((key->len == 0) || (key->len > MAX_KEY_LEN) || ((impl->attr.keySize / KEY_BIT) != (int32_t)key… in ConvertSymmKey()
316 HcfResult HcfSymKeyGeneratorSpiCreate(SymKeyAttr *attr, HcfSymKeyGeneratorSpi **generator) in HcfSymKeyGeneratorSpiCreate() argument
318 if ((attr == NULL) || (generator == NULL)) { in HcfSymKeyGeneratorSpiCreate()
328 (void)memcpy_s(&returnGenerator->attr, sizeof(SymKeyAttr), attr, sizeof(SymKeyAttr)); in HcfSymKeyGeneratorSpiCreate()

123