Merge from Widevine repo of http://go/wvgerrit/101130 https://cr/314253512 ODK Library: roll version number to 16.3 https://cr/314253425 ODK Library: Accept release request as renewal request To support forward compatibility, the v16 server should parse a release request as a renewal request. https://cr/314213725 ODK: Accept larger message sizes The ODK should accept a message size that is larger than the current API requires. This allows for future API versions to append fields to a message that current the current license SDK will ignore. https://cr/313962712 ODK: accept messages with future API version numbers This CL updates the ODK parse functions to accept future versions of the message. This will allow a v16 server to talk to a v17 device. https://cr/313814938 ODK Version String Add an automatically generated version string to odk_structs.h Bug: 157030231 Bug: 157512150 Bug: 157822248 Bug: 157512322 Test: unit tests on taimen Change-Id: I346f73c41bc984fe17856d3b61cd08cf92b39919
30 lines
859 B
C
30 lines
859 B
C
/* Copyright 2019 Google LLC. All rights reserved. This file and proprietary */
|
|
/* source code may only be used and distributed under the Widevine Master */
|
|
/* License Agreement. */
|
|
|
|
#ifndef WIDEVINE_ODK_SRC_ODK_ENDIAN_H_
|
|
#define WIDEVINE_ODK_SRC_ODK_ENDIAN_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if defined(__linux__) || defined(__ANDROID__)
|
|
#include <endian.h>
|
|
#define oemcrypto_htobe32 htobe32
|
|
#define oemcrypto_be32toh be32toh
|
|
#define oemcrypto_htobe64 htobe64
|
|
#define oemcrypto_be64toh be64toh
|
|
#else /* defined(__linux__) || defined(__ANDROID__) */
|
|
uint32_t oemcrypto_htobe32(uint32_t u32);
|
|
uint32_t oemcrypto_be32toh(uint32_t u32);
|
|
uint64_t oemcrypto_htobe64(uint64_t u64);
|
|
uint64_t oemcrypto_be64toh(uint64_t u64);
|
|
#endif /* defined(__linux__) || defined(__ANDROID__) */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* WIDEVINE_ODK_SRC_ODK_ENDIAN_H_ */
|