Lines Matching refs:cbor
180 eicCborInit(&ctx->cbor, NULL, 0); in eicProvisioningStartPersonalization()
193 eicCborAppendArray(&ctx->cbor, 4); in eicProvisioningStartPersonalization()
194 eicCborAppendStringZ(&ctx->cbor, "Signature1"); in eicProvisioningStartPersonalization()
200 eicCborAppendByteString(&ctx->cbor, coseEncodedProtectedHeaders, in eicProvisioningStartPersonalization()
206 eicCborAppendByteString(&ctx->cbor, externalAad, sizeof(externalAad)); in eicProvisioningStartPersonalization()
211 eicCborBegin(&ctx->cbor, EIC_CBOR_MAJOR_TYPE_BYTE_STRING, expectedProofOfProvisioningSize); in eicProvisioningStartPersonalization()
212 ctx->expectedCborSizeAtEnd = expectedProofOfProvisioningSize + ctx->cbor.size; in eicProvisioningStartPersonalization()
215 eicCborEnableSecondaryDigesterSha256(&ctx->cbor, &ctx->proofOfProvisioningDigester); in eicProvisioningStartPersonalization()
217 eicCborAppendArray(&ctx->cbor, 5); in eicProvisioningStartPersonalization()
218 eicCborAppendStringZ(&ctx->cbor, "ProofOfProvisioning"); in eicProvisioningStartPersonalization()
219 eicCborAppendString(&ctx->cbor, docType, docTypeLength); in eicProvisioningStartPersonalization()
221 eicCborAppendArray(&ctx->cbor, accessControlProfileCount); in eicProvisioningStartPersonalization()
261 eicCborAppend(&ctx->cbor, cborBuilder.buffer, cborBuilder.size); in eicProvisioningAddAccessControlProfile()
288 eicCborAppendMap(&ctx->cbor, ctx->numEntryCounts); in eicProvisioningBeginAddEntry()
289 eicCborAppendString(&ctx->cbor, nameSpace, nameSpaceLength); in eicProvisioningBeginAddEntry()
291 eicCborAppendArray(&ctx->cbor, ctx->entryCounts[ctx->curNamespace]); in eicProvisioningBeginAddEntry()
297 eicCborAppendString(&ctx->cbor, nameSpace, nameSpaceLength); in eicProvisioningBeginAddEntry()
299 eicCborAppendArray(&ctx->cbor, ctx->entryCounts[ctx->curNamespace]); in eicProvisioningBeginAddEntry()
302 eicCborAppendMap(&ctx->cbor, 3); in eicProvisioningBeginAddEntry()
303 eicCborAppendStringZ(&ctx->cbor, "name"); in eicProvisioningBeginAddEntry()
304 eicCborAppendString(&ctx->cbor, name, nameLength); in eicProvisioningBeginAddEntry()
309 eicCborAppendStringZ(&ctx->cbor, "value"); in eicProvisioningBeginAddEntry()
338 eicCborAppend(&ctx->cbor, content, contentSize); in eicProvisioningAddEntryValue()
352 eicCborAppendStringZ(&ctx->cbor, "accessControlProfiles"); in eicProvisioningAddEntryValue()
353 eicCborAppendArray(&ctx->cbor, numAccessControlProfileIds); in eicProvisioningAddEntryValue()
355 eicCborAppendNumber(&ctx->cbor, accessControlProfileIds[n]); in eicProvisioningAddEntryValue()
365 eicCborAppendBool(&ctx->cbor, ctx->testCredential); in eicProvisioningFinishAddingEntries()
366 eicCborFinal(&ctx->cbor, cborSha256); in eicProvisioningFinishAddingEntries()
370 if (ctx->cbor.size != ctx->expectedCborSizeAtEnd) { in eicProvisioningFinishAddingEntries()
371 eicDebug("CBOR size is %zd, was expecting %zd", ctx->cbor.size, ctx->expectedCborSizeAtEnd); in eicProvisioningFinishAddingEntries()
387 EicCbor cbor; in eicProvisioningFinishGetCredentialData() local
395 eicCborInit(&cbor, cborBuf, sizeof(cborBuf)); in eicProvisioningFinishGetCredentialData()
396 eicCborAppendArray(&cbor, 3); in eicProvisioningFinishGetCredentialData()
397 eicCborAppendByteString(&cbor, ctx->storageKey, EIC_AES_128_KEY_SIZE); in eicProvisioningFinishGetCredentialData()
398 eicCborAppendByteString(&cbor, ctx->credentialPrivateKey, EIC_P256_PRIV_KEY_SIZE); in eicProvisioningFinishGetCredentialData()
401 eicCborAppendByteString(&cbor, popSha256, EIC_SHA256_DIGEST_SIZE); in eicProvisioningFinishGetCredentialData()
402 if (cbor.size > sizeof(cborBuf)) { in eicProvisioningFinishGetCredentialData()
413 eicOpsGetHardwareBoundKey(ctx->testCredential), nonce, cborBuf, cbor.size, in eicProvisioningFinishGetCredentialData()
419 *encryptedCredentialKeysSize = cbor.size + 28; in eicProvisioningFinishGetCredentialData()