OEMCrypto v18.3

Updates to OEMCrypto API, OPK, ODK, and unit tests.

See the file CHANGELOG.md for details.
This commit is contained in:
Fred Gylys-Colwell
2023-07-11 16:57:57 -07:00
parent 562f64f292
commit 3c628c8f27
564 changed files with 18757 additions and 5276 deletions

View File

@@ -176,6 +176,22 @@ bool FileSystem::Exists(const std::string& path) {
return res;
}
bool FileSystem::Exists(const std::string& path, int* errno_value) {
struct stat buf;
int error = 0;
int res = stat(path.c_str(), &buf) == 0;
if (!res) {
error = errno;
if (error == ENOENT) {
LOGI("stat failed: ENOENT");
} else {
LOGE("stat failed: %d, %s", error, strerror(error));
}
}
if (errno_value != nullptr) *errno_value = error;
return res;
}
bool FileSystem::Remove(const std::string& path) {
if (IsDirectory(path)) {
// Handle directory deletion

View File

@@ -25,7 +25,7 @@ void InitLogging() {
// set by jenkins (http://go/wvbuild), so that we have more details when the
// build breaks.
const char* verbose_env = getenv("VERBOSE_LOG");
if (verbose_env && !strncmp(verbose_env, "yes", 3)) {
if (verbose_env && strncmp(verbose_env, "yes", 3) == 0) {
g_cutoff = CDM_LOG_VERBOSE;
}
}