This CL updates the level 3 library to v14. It includes the following CLs: http://go/wvgerrit/52941 Change initialization of TimeInfo object in L3 http://go/wvgerrit/50820 Use memmove instead of relocs memcpy http://go/wvgerrit/49845 Use memmove or the relocs memcpy in entry_points http://go/wvgerrit/48884 Merge back rollback changes from pi-dev http://go/wvgerrit/47985 Deprecate all_obfuscated_symbols.h http://go/wvgerrit/47720 Invalidate current key index when loading keys http://go/wvgerrit/46206 Split mock into two -- step 3 http://go/wvgerrit/46205 Move some OEMCrypto types to common header - split the mock, step 2 http://go/wvgerrit/46204 Refactor utility code - split the mock, step 1 http://go/wvgerrit/44981 Fix pointer addresses of generation number http://go/wvgerrit/47460 Address offline playback with rollbacked time http://go/wvgerrit/46442 Convert union type-punning to memcpy in Level 3 http://go/wvgerrit/46441 Remove usage of strlen from Level 3 http://go/wvgerrit/41900 Increase size of RSA key for Level3 http://go/wvgerrit/41832 Remove LoadTestKeybox and test keybox code http://go/wvgerrit/41826 Add prov 3.0 and remove prov 2.0 code http://go/wvgerrit/44262 Fixed loading mac keys in mock and Level3 http://go/wvgerrit/43402 Add AES256 to Level 3 http://go/wvgerrit/43045 Add entitlement keys and V14 for Level3 http://go/wvgerrit/38800 Update LoadTestKeybox to take test keybox parameter http://go/wvgerrit/42064 Test Carmicahel RSA Keys http://go/wvgerrit/41701 Update print-version-strings New version numbers: level3/x86/libl3oemcrypto.cpp Level3 Library 8162 May 21 2018 13:50:29 level3/arm/libl3oemcrypto.cpp Level3 Library 8158 May 21 2018 13:52:17 level3/mips64/libl3oemcrypto.cpp Level3 Library 8161 May 21 2018 13:51:47 level3/arm64/libl3oemcrypto.cpp Level3 Library 8159 May 21 2018 13:50:47 level3/mips/libl3oemcrypto.cpp Level3 Library 8160 May 21 2018 13:51:51 level3/x86_64/libl3oemcrypto.cpp Level3 Library 8163 May 21 2018 13:51:19 Test: tested as part of http://go/ag/4674759 Change-Id: Ib2c09e4549e58ad57213168dac27b35543bd64c3
33 lines
851 B
C++
33 lines
851 B
C++
#include "level3.h"
|
|
|
|
#include <string.h>
|
|
|
|
// The function property_get is defined differently if it comes from the IN_APP
|
|
// version or from the Android OS.
|
|
#if defined(IN_APP_FASTBALL)
|
|
#include "properties_fastball.h"
|
|
#else
|
|
#include <cutils/properties.h>
|
|
#endif
|
|
|
|
namespace wvoec3 {
|
|
|
|
const char *getUniqueID(size_t *len) {
|
|
static char temp_value[PROPERTY_VALUE_MAX * 2];
|
|
int actual_len = property_get("ro.serialno", temp_value, NULL);
|
|
if (actual_len <= 0) {
|
|
actual_len = property_get("net.hostname", temp_value, NULL);
|
|
}
|
|
if (actual_len <= 0) {
|
|
strncpy(temp_value, "0123456789abc", PROPERTY_VALUE_MAX);
|
|
}
|
|
#if defined(IN_APP_FASTBALL) || defined(IN_APP_MOVIES)
|
|
actual_len +=
|
|
property_get("package.name", temp_value + actual_len, "com.google.inapp");
|
|
#endif
|
|
*len = actual_len;
|
|
return temp_value;
|
|
}
|
|
|
|
} // namespace wvoec3
|