Add curly braces in oemcrypto_test.cpp
On the gcc 9.3 compiler, oemcrypto/test/oemcrypto_test.cpp will not compile without curly braces in some places so we must add them to these 4 tests. Test: OEMCryptoLoadsCertificateAlternates tests and CheckUsageTableSizeAPI16 Bug: 200057124 Change-Id: Ia097ba992a024adfd3311b82b812de60985a0de1
This commit is contained in:
@@ -466,7 +466,9 @@ TEST_F(OEMCryptoClientTest, CheckUsageTableSizeAPI16) {
|
||||
const size_t maximum = OEMCrypto_MaximumUsageTableHeaderSize();
|
||||
printf(" Max Usage Table Size: %zu.\n", maximum);
|
||||
// A maximum of 0 means the table is constrained by dynamic memory allocation.
|
||||
if (maximum > 0) ASSERT_GE(maximum, RequiredUsageSize());
|
||||
if (maximum > 0) {
|
||||
ASSERT_GE(maximum, RequiredUsageSize());
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -5468,7 +5470,9 @@ TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
OEMCryptoResult sts;
|
||||
LoadWithAllowedSchemes(kSign_PKCS1_Block1, false);
|
||||
// If the device is a cast receiver, then this scheme is required.
|
||||
if (global_features.cast_receiver) ASSERT_TRUE(key_loaded_);
|
||||
if (global_features.cast_receiver) {
|
||||
ASSERT_TRUE(key_loaded_);
|
||||
}
|
||||
if (key_loaded_) {
|
||||
Session s;
|
||||
ASSERT_NO_FATAL_FAILURE(s.open());
|
||||
@@ -5502,7 +5506,9 @@ TEST_F(OEMCryptoLoadsCertificateAlternates,
|
||||
OEMCryptoResult sts;
|
||||
LoadWithAllowedSchemes(kSign_PKCS1_Block1, false);
|
||||
// If the device is a cast receiver, then this scheme is required.
|
||||
if (global_features.cast_receiver) ASSERT_TRUE(key_loaded_);
|
||||
if (global_features.cast_receiver) {
|
||||
ASSERT_TRUE(key_loaded_);
|
||||
}
|
||||
if (key_loaded_) {
|
||||
Session s;
|
||||
ASSERT_NO_FATAL_FAILURE(s.open());
|
||||
@@ -5539,7 +5545,9 @@ TEST_F(OEMCryptoLoadsCertificateAlternates, TestSignaturePKCS1) {
|
||||
// scheme is used by cast receivers.
|
||||
LoadWithAllowedSchemes(kSign_PKCS1_Block1, false);
|
||||
// If the device is a cast receiver, then this scheme is required.
|
||||
if (global_features.cast_receiver) ASSERT_TRUE(key_loaded_);
|
||||
if (global_features.cast_receiver) {
|
||||
ASSERT_TRUE(key_loaded_);
|
||||
}
|
||||
// If the key loaded with no error, then we will verify that it is not used
|
||||
// for forbidden padding schemes.
|
||||
if (key_loaded_) {
|
||||
|
||||
Reference in New Issue
Block a user