Merge "Fix errors being hidden by Protobuf warning-disabling"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2e738c2989
@@ -30,7 +30,7 @@ const int kTimeout = 3000;
|
|||||||
class HttpSocketTest : public testing::Test {
|
class HttpSocketTest : public testing::Test {
|
||||||
public:
|
public:
|
||||||
HttpSocketTest() {}
|
HttpSocketTest() {}
|
||||||
~HttpSocketTest() {}
|
~HttpSocketTest() override {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool Connect(const std::string& server_url) {
|
bool Connect(const std::string& server_url) {
|
||||||
@@ -164,7 +164,7 @@ ParseUrlTests parse_url_tests[] = {
|
|||||||
"8888", // port
|
"8888", // port
|
||||||
"/", // path
|
"/", // path
|
||||||
},
|
},
|
||||||
{nullptr, nullptr, false, nullptr, 0, nullptr} // list terminator
|
{} // list terminator
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(HttpSocketTest, ParseUrlTest) {
|
TEST_F(HttpSocketTest, ParseUrlTest) {
|
||||||
|
|||||||
@@ -535,9 +535,12 @@ TEST_F(CdmLicenseTest, PrepareKeyRequestValidationV15) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct EntitledKeyVariant {
|
struct EntitledKeyVariant {
|
||||||
EntitledKeyVariant(const char* name, const std::string& key,
|
EntitledKeyVariant(const char* name_param, const std::string& key_param,
|
||||||
bool should_succeed)
|
bool should_succeed_param)
|
||||||
: name(name), key(key), should_succeed(should_succeed) {}
|
: name(name_param),
|
||||||
|
key(key_param),
|
||||||
|
should_succeed(should_succeed_param) {}
|
||||||
|
|
||||||
const std::string name;
|
const std::string name;
|
||||||
const std::string key;
|
const std::string key;
|
||||||
const bool should_succeed;
|
const bool should_succeed;
|
||||||
|
|||||||
@@ -764,7 +764,7 @@ bool TestLicenseHolder::DeriveKey(const std::vector<uint8_t>& key,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CMAC_Init(cmac_ctx, &key[0], key.size(), cipher, 0)) {
|
if (!CMAC_Init(cmac_ctx, &key[0], key.size(), cipher, nullptr)) {
|
||||||
LOGE("DeriveKey(): CMAC_Init");
|
LOGE("DeriveKey(): CMAC_Init");
|
||||||
CMAC_CTX_free(cmac_ctx);
|
CMAC_CTX_free(cmac_ctx);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ void KeyDeriver::DeriveKey(const uint8_t* key, const vector<uint8_t>& context,
|
|||||||
CMAC_CTX* cmac_ctx = CMAC_CTX_new();
|
CMAC_CTX* cmac_ctx = CMAC_CTX_new();
|
||||||
ASSERT_NE(nullptr, cmac_ctx);
|
ASSERT_NE(nullptr, cmac_ctx);
|
||||||
|
|
||||||
ASSERT_TRUE(CMAC_Init(cmac_ctx, key, KEY_SIZE, cipher, 0));
|
ASSERT_TRUE(CMAC_Init(cmac_ctx, key, KEY_SIZE, cipher, nullptr));
|
||||||
|
|
||||||
std::vector<uint8_t> message;
|
std::vector<uint8_t> message;
|
||||||
message.push_back(static_cast<uint8_t>(counter));
|
message.push_back(static_cast<uint8_t>(counter));
|
||||||
|
|||||||
@@ -1273,7 +1273,7 @@ Session::Session()
|
|||||||
forced_session_id_(false),
|
forced_session_id_(false),
|
||||||
session_id_(0),
|
session_id_(0),
|
||||||
nonce_(0),
|
nonce_(0),
|
||||||
public_rsa_(0) {}
|
public_rsa_(nullptr) {}
|
||||||
|
|
||||||
Session::~Session() {
|
Session::~Session() {
|
||||||
if (!forced_session_id_ && open_) close();
|
if (!forced_session_id_ && open_) close();
|
||||||
@@ -1470,7 +1470,7 @@ void Session::LoadOEMCert(bool verify_cert) {
|
|||||||
reinterpret_cast<const unsigned char*>(public_cert.data());
|
reinterpret_cast<const unsigned char*>(public_cert.data());
|
||||||
long cert_size = static_cast<long>(public_cert.size());
|
long cert_size = static_cast<long>(public_cert.size());
|
||||||
boringssl_ptr<PKCS7, PKCS7_free> pkcs7(
|
boringssl_ptr<PKCS7, PKCS7_free> pkcs7(
|
||||||
d2i_PKCS7(NULL, &cert_data, cert_size));
|
d2i_PKCS7(nullptr, &cert_data, cert_size));
|
||||||
ASSERT_TRUE(pkcs7.NotNull()) << "Error parsing PKCS7 message";
|
ASSERT_TRUE(pkcs7.NotNull()) << "Error parsing PKCS7 message";
|
||||||
ASSERT_TRUE(PKCS7_type_is_signed(pkcs7.get()))
|
ASSERT_TRUE(PKCS7_type_is_signed(pkcs7.get()))
|
||||||
<< "Unexpected PKCS7 message type";
|
<< "Unexpected PKCS7 message type";
|
||||||
|
|||||||
Reference in New Issue
Block a user