diff --git a/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h b/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h index b9aa73ad..8cd5ae66 100644 --- a/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h +++ b/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h @@ -321,8 +321,8 @@ typedef struct { typedef struct { size_t num_bytes_clear; // Number of bytes in the unprotected region. size_t num_bytes_encrypted; // Number of bytes in the protected region. - uint8_t subsample_flags; // is this the first/last subsample in a sample? - size_t block_offset; // used for CTR "cenc" mode only. + uint8_t subsample_flags; // is this the first/last subsample in a sample? + size_t block_offset; // used for CTR "cenc" mode only. } OEMCrypto_SubSampleDescription; #define OEMCrypto_FirstSubsample 1 @@ -3175,7 +3175,7 @@ OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* key_data, * This is an "Initialization and Termination Function" and will not be * called simultaneously with any other function, as if the CDM holds a write * lock on the OEMCrypto system. It is called after OEMCrypto_Initialize() and - * after OEMCrypto_GetProvisioningMethod() and only if the provisoining method + * after OEMCrypto_GetProvisioningMethod() and only if the provisioning method * is OEMCrypto_Keybox, * * @version @@ -5043,16 +5043,20 @@ OEMCryptoResult OEMCrypto_GenerateCertificateKeyPair( OEMCrypto_PrivateKeyType* key_type); /** - * Get the serialized device information in CBOR map format. This is for devices - * that use Provisioning 4.0, with the device key uploading option in the - * factory. + * Get the serialized device information in CBOR map format. The CBOR map must + * be canonicalized before serialization according to the specification in RFC + * 7049: + * 1) If two keys have different lengths, the shorter one sorts earlier. + * 2) If two keys have the same length, the one with the lower value in + * (byte-wise) lexical order sorts earlier. + * This is for devices that use Provisioning 4.0, with the device key uploading + * option in the factory. * - * The device - * information may contain, for example, device make and model, "fused" status, - * and other properties, which is intended to be 1) uploaded during device - * manufacture in the factory, 2) checked by the server to verify that the - * provisioning request is coming from the expected device in the fields, based - * on the values previously uploaded and registered. + * The device information may contain, for example, device make and model, + * "fused" status, and other properties, which is intended to be 1) uploaded + * during device manufacture in the factory, 2) checked by the server to verify + * that the provisioning request is coming from the expected device in the + * fields, based on the values previously uploaded and registered. * * Devices that do not support Provisioning 4.0, or do not support * Provisioning 4.0 Uploading Option should return @@ -5110,7 +5114,8 @@ OEMCryptoResult OEMCrypto_GetDeviceInformation(uint8_t* device_info, * the input |encoded_device_info|. DeviceInfo must be canonicalized according * to the specification in RFC 7049. The required fields from DeviceInfo.aidl * are: brand, manufacturer, product, model, device, vb_state, bootloader_state, - * vbmeta_digest, security_level. + * vbmeta_digest, system_patch_level, boot_patch_level, vendor_patch_level, + * security_level, fused. * * Once CsrPayload is prepared, together with |challenge| it is signed by the * leaf cert of BCC, in the format of: @@ -5489,16 +5494,16 @@ OEMCryptoResult OEMCrypto_FreeSecureBuffer( * same. Differences in only the |minor| fields indicates that the protocols * are different but are still compatible. * - * @param[in,out] ree_major: pointer to memory to recieve the REE's |major| + * @param[in,out] ree_major: pointer to memory to receive the REE's |major| * version. On input, *ree_major may be zero to request the serialization * version of the REE. If *ree_major is non-zero, this function will test the * TEE's compatibility using the specified REE major version. - * @param[in,out] ree_minor: pointer to memory to recieve the REE's |minor| + * @param[in,out] ree_minor: pointer to memory to receive the REE's |minor| * version. On input, *ree_minor may be zero to request the serialization * version of the REE. If *ree_minor is non-zero, this function will test the * TEE's compatibility using the specified REE minor version. - * @param[out] tee_major: pointer to memory to recieve the TEE's |major| version - * @param[out] tee_minor: pointer to memory to recieve the TEE's |minor| version + * @param[out] tee_major: pointer to memory to receive the TEE's |major| version + * @param[out] tee_minor: pointer to memory to receive the TEE's |minor| version * * @retval OEMCrypto_SUCCESS success * @retval OPK_ERROR_INCOMPATIBLE_VERSION