Lines Matching refs:certChain
45 void FreeCertChain(struct OH_Huks_CertChain *certChain, const uint32_t pos)
47 if (certChain == nullptr || certChain->certs == nullptr) {
51 if (certChain->certs[j].data != nullptr) {
52 free(certChain->certs[j].data);
53 certChain->certs[j].data = nullptr;
56 if (certChain->certs != nullptr) {
57 free(certChain->certs);
58 certChain->certs = nullptr;
61 int32_t ConstructDataToCertChain(struct OH_Huks_CertChain *certChain)
63 if (certChain == nullptr) {
66 certChain->certsCount = CERT_COUNT;
68 …certChain->certs = (struct OH_Huks_Blob *)malloc(sizeof(struct OH_Huks_Blob) * (certChain->certsCo…
69 if (certChain->certs == nullptr) {
72 for (uint32_t i = 0; i < certChain->certsCount; i++) {
73 certChain->certs[i].size = g_size;
74 certChain->certs[i].data = (uint8_t *)malloc(certChain->certs[i].size);
75 if (certChain->certs[i].data == nullptr) {
76 FreeCertChain(certChain, i);
107 OH_Huks_CertChain certChain = { &certs, 0 };
123 (void)ConstructDataToCertChain(&certChain);
125 ohResult = OH_Huks_AnonAttestKeyItem(&genAlias, anonAttestParamSet, &certChain);
127 FreeCertChain(&certChain, CERT_COUNT);