Pack structure OEMCrypto_PST_Report
Because the OEMCrypto_PST_Report is sent as a signed block to the server, it needs to be a fixed, platform independent, size. This CL adds the packed attribute to the structure, which reduces its size from 56 bytes to 48 bytes. Copy of widevine change: https://widevine-internal-review.googlesource.com/#/c/10321/ Library Versions: libwvdrmengine/level3/x86/libwvlevel3.a Level3 Library May 30 2014 15:40:50 libwvdrmengine/level3/arm/libwvlevel3.a Level3 Library May 30 2014 15:39:04 bug: 15184821 Change-Id: I54db2c3bbc4e20ee0c19c33d6fd56f86f432e110
This commit is contained in:
@@ -208,12 +208,13 @@ typedef enum OEMCrypto_Usage_Entry_Status {
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t signature[20]; // -- HMAC SHA1 of the rest of the report.
|
||||
int64_t seconds_since_license_received; // now - time_of_license_received
|
||||
int64_t seconds_since_first_decrypt; // now - time_of_first_decrypt
|
||||
int64_t seconds_since_last_decrypt; // now - time_of_last_decrypt
|
||||
uint8_t status; // current status of entry. (OEMCrypto_Usage_Entry_Status)
|
||||
uint8_t clock_security_level;
|
||||
uint8_t pst_length;
|
||||
uint8_t padding; // make int64's word aligned.
|
||||
int64_t seconds_since_license_received; // now - time_of_license_received
|
||||
int64_t seconds_since_first_decrypt; // now - time_of_first_decrypt
|
||||
int64_t seconds_since_last_decrypt; // now - time_of_last_decrypt
|
||||
uint8_t pst[];
|
||||
} __attribute__((packed)) OEMCrypto_PST_Report;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user