Source release v3.0.1 + third_party
This commit is contained in:
@@ -24,9 +24,9 @@ namespace wvcdm {
|
||||
class BufferReader {
|
||||
public:
|
||||
BufferReader(const uint8_t* buf, size_t size)
|
||||
: buf_(buf), size_(size), pos_(0) {}
|
||||
: buf_(buf), size_(buf != NULL ? size : 0), pos_(0) {}
|
||||
|
||||
bool HasBytes(int count) { return (pos() + count <= size()); }
|
||||
bool HasBytes(size_t count) { return (pos() + count <= size()); }
|
||||
|
||||
// Read a value from the stream, performing endian correction,
|
||||
// and advance the stream pointer.
|
||||
@@ -38,8 +38,8 @@ class BufferReader {
|
||||
bool Read8(uint64_t* v) WARN_UNUSED_RESULT;
|
||||
bool Read8s(int64_t* v) WARN_UNUSED_RESULT;
|
||||
|
||||
bool ReadString(std::string* str, int count) WARN_UNUSED_RESULT;
|
||||
bool ReadVec(std::vector<uint8_t>* t, int count) WARN_UNUSED_RESULT;
|
||||
bool ReadString(std::string* str, size_t count) WARN_UNUSED_RESULT;
|
||||
bool ReadVec(std::vector<uint8_t>* t, size_t count) WARN_UNUSED_RESULT;
|
||||
|
||||
// These variants read a 4-byte integer of the corresponding signedness and
|
||||
// store it in the 8-byte return type.
|
||||
@@ -47,7 +47,7 @@ class BufferReader {
|
||||
bool Read4sInto8s(int64_t* v) WARN_UNUSED_RESULT;
|
||||
|
||||
// Advance the stream by this many bytes.
|
||||
bool SkipBytes(int nbytes) WARN_UNUSED_RESULT;
|
||||
bool SkipBytes(size_t nbytes) WARN_UNUSED_RESULT;
|
||||
|
||||
const uint8_t* data() const { return buf_; }
|
||||
size_t size() const { return size_; }
|
||||
|
||||
@@ -137,6 +137,7 @@ class DeviceFiles {
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, ForceL3Test);
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, UsageInfoRetryTest);
|
||||
FRIEND_TEST(WvCdmUsageInfoTest, UsageInfo);
|
||||
FRIEND_TEST(WvCdmUsageTest, WithClientId);
|
||||
FRIEND_TEST(WvCdmExtendedDurationTest, UsageOverflowTest);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ static const std::string QUERY_KEY_NUMBER_OF_OPEN_SESSIONS =
|
||||
"NumberOfOpenSessions";
|
||||
static const std::string QUERY_KEY_MAX_NUMBER_OF_SESSIONS =
|
||||
"MaxNumberOfSessions";
|
||||
static const std::string QUERY_KEY_OEMCRYPTO_API_VERSION =
|
||||
"OemCryptoApiVersion";
|
||||
|
||||
static const std::string QUERY_VALUE_TRUE = "True";
|
||||
static const std::string QUERY_VALUE_FALSE = "False";
|
||||
|
||||
@@ -83,7 +83,7 @@ enum CdmResponseType {
|
||||
EMPTY_LICENSE_RENEWAL,
|
||||
EMPTY_LICENSE_RESPONSE_1,
|
||||
EMPTY_LICENSE_RESPONSE_2,
|
||||
EMPTY_PROVISIONING_CERTIFICATE,
|
||||
EMPTY_PROVISIONING_CERTIFICATE_1,
|
||||
EMPTY_PROVISIONING_RESPONSE,
|
||||
EMPTY_SESSION_ID,
|
||||
GENERATE_DERIVED_KEYS_ERROR,
|
||||
@@ -186,8 +186,8 @@ enum CdmResponseType {
|
||||
CLIENT_ID_RSA_INIT_ERROR,
|
||||
CLIENT_ID_RSA_ENCRYPT_ERROR,
|
||||
INVALID_QUERY_STATUS,
|
||||
DUPLICATE_SESSION_ID_SPECIFIED,
|
||||
EMPTY_PROVISIONING_CERTIFICATE_2,
|
||||
UNUSED_3, /* previously EMPTY_PROVISIONING_CERTIFICATE_2 on mnc-dev, */
|
||||
/* DUPLICATE_SESSION_ID_SPECIFIED on master */
|
||||
LICENSE_PARSER_NOT_INITIALIZED_4,
|
||||
INVALID_PARAMETERS_LIC_3,
|
||||
INVALID_PARAMETERS_LIC_4,
|
||||
@@ -203,6 +203,8 @@ enum CdmResponseType {
|
||||
LICENSE_REQUEST_NONCE_GENERATION_ERROR,
|
||||
LICENSE_REQUEST_SIGNING_ERROR,
|
||||
EMPTY_LICENSE_REQUEST,
|
||||
EMPTY_PROVISIONING_CERTIFICATE_2,
|
||||
DUPLICATE_SESSION_ID_SPECIFIED,
|
||||
};
|
||||
|
||||
enum CdmKeyStatus {
|
||||
|
||||
Reference in New Issue
Block a user