Update ODK and test version to 18.3

PiperOrigin-RevId: 546349606

Merged from
https://widevine-internal-review.googlesource.com/178000
and
https://widevine-internal-review.googlesource.com/178061

Bug: 290252863
Change-Id: I0d6d9a0214d556ae39efe8a720df8ac60c1e67fb
This commit is contained in:
Fred Gylys-Colwell
2023-07-07 12:20:58 -07:00
committed by Robert Shih
parent 2e7c68440b
commit 06ad24bce0
5 changed files with 10 additions and 9 deletions

View File

@@ -26,9 +26,9 @@ struct CoreMessageFeatures {
// This is the published version of the ODK Core Message library. The default // This is the published version of the ODK Core Message library. The default
// behavior is for the server to restrict messages to at most this version // behavior is for the server to restrict messages to at most this version
// number. The default is 18.2. // number. The default is 18.3.
uint32_t maximum_major_version = 18; uint32_t maximum_major_version = 18;
uint32_t maximum_minor_version = 2; uint32_t maximum_minor_version = 3;
bool operator==(const CoreMessageFeatures &other) const; bool operator==(const CoreMessageFeatures &other) const;
bool operator!=(const CoreMessageFeatures &other) const { bool operator!=(const CoreMessageFeatures &other) const {

View File

@@ -16,10 +16,10 @@ extern "C" {
/* The version of this library. */ /* The version of this library. */
#define ODK_MAJOR_VERSION 18 #define ODK_MAJOR_VERSION 18
#define ODK_MINOR_VERSION 2 #define ODK_MINOR_VERSION 3
/* ODK Version string. Date changed automatically on each release. */ /* ODK Version string. Date changed automatically on each release. */
#define ODK_RELEASE_DATE "ODK v18.2 2023-07-07" #define ODK_RELEASE_DATE "ODK v18.3 2023-07-07"
/* The lowest version number for an ODK message. */ /* The lowest version number for an ODK message. */
#define ODK_FIRST_VERSION 16 #define ODK_FIRST_VERSION 16

View File

@@ -28,7 +28,7 @@ CoreMessageFeatures CoreMessageFeatures::DefaultFeatures(
features.maximum_minor_version = 2; // 17.2 features.maximum_minor_version = 2; // 17.2
break; break;
case 18: case 18:
features.maximum_minor_version = 2; // 18.2 features.maximum_minor_version = 3; // 18.3
break; break;
default: default:
features.maximum_minor_version = 0; features.maximum_minor_version = 0;

View File

@@ -1216,7 +1216,7 @@ std::vector<VersionParameters> TestCases() {
// number. // number.
{16, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 16, 5}, {16, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 16, 5},
{17, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 17, 2}, {17, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 17, 2},
{18, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 18, 2}, {18, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 18, 3},
// Here are some known good versions. Make extra sure they work. // Here are some known good versions. Make extra sure they work.
{ODK_MAJOR_VERSION, 16, 3, 16, 3}, {ODK_MAJOR_VERSION, 16, 3, 16, 3},
{ODK_MAJOR_VERSION, 16, 4, 16, 4}, {ODK_MAJOR_VERSION, 16, 4, 16, 4},
@@ -1225,12 +1225,13 @@ std::vector<VersionParameters> TestCases() {
{ODK_MAJOR_VERSION, 17, 2, 17, 2}, {ODK_MAJOR_VERSION, 17, 2, 17, 2},
{ODK_MAJOR_VERSION, 18, 1, 18, 1}, {ODK_MAJOR_VERSION, 18, 1, 18, 1},
{ODK_MAJOR_VERSION, 18, 2, 18, 2}, {ODK_MAJOR_VERSION, 18, 2, 18, 2},
{ODK_MAJOR_VERSION, 18, 3, 18, 3},
{0, 16, 3, 16, 3}, {0, 16, 3, 16, 3},
{0, 16, 4, 16, 4}, {0, 16, 4, 16, 4},
{0, 16, 5, 16, 5}, {0, 16, 5, 16, 5},
{0, 17, 1, 17, 1}, {0, 17, 1, 17, 1},
{0, 17, 2, 17, 2}, {0, 17, 2, 17, 2},
{0, 18, 2, 18, 2}, // Change to 19 when the default version is updated. {0, 18, 3, 18, 3}, // Change to 19 when the default version is updated.
}; };
return test_cases; return test_cases;
} }

View File

@@ -156,7 +156,7 @@ TEST_F(OEMCryptoClientTest, FreeUnallocatedSecureBufferNoFailure) {
*/ */
TEST_F(OEMCryptoClientTest, VersionNumber) { TEST_F(OEMCryptoClientTest, VersionNumber) {
const std::string log_message = const std::string log_message =
"OEMCrypto unit tests for API 18.2. Tests last updated 2023-04-12"; "OEMCrypto unit tests for API 18.3. Tests last updated 2023-07-07";
cout << " " << log_message << "\n"; cout << " " << log_message << "\n";
cout << " " cout << " "
<< "These tests are part of Android U." << "These tests are part of Android U."
@@ -165,7 +165,7 @@ TEST_F(OEMCryptoClientTest, VersionNumber) {
// If any of the following fail, then it is time to update the log message // If any of the following fail, then it is time to update the log message
// above. // above.
EXPECT_EQ(ODK_MAJOR_VERSION, 18); EXPECT_EQ(ODK_MAJOR_VERSION, 18);
EXPECT_EQ(ODK_MINOR_VERSION, 2); EXPECT_EQ(ODK_MINOR_VERSION, 3);
EXPECT_EQ(kCurrentAPI, static_cast<unsigned>(ODK_MAJOR_VERSION)); EXPECT_EQ(kCurrentAPI, static_cast<unsigned>(ODK_MAJOR_VERSION));
OEMCrypto_Security_Level level = OEMCrypto_SecurityLevel(); OEMCrypto_Security_Level level = OEMCrypto_SecurityLevel();
EXPECT_GT(level, OEMCrypto_Level_Unknown); EXPECT_GT(level, OEMCrypto_Level_Unknown);