/system/vold/ |
H A D | KeyStorage.h | 28 // If "token" is nonempty, it is passed in as a required Gatekeeper auth token. 29 // If "token" and "secret" are nonempty, "secret" is appended to the application-specific 34 KeyAuthentication(std::string t, std::string s) : token{t}, secret{s} {}; 36 bool usesKeymaster() const { return !token.empty() || secret.empty(); }; 38 const std::string token; member in class:android::vold::KeyAuthentication
|
H A D | ScryptParameters.cpp | 24 char *token; local 29 * The token we're looking for should be three integers separated by 32 for (i = 0, token = strtok_r(const_cast<char *>(paramstr), ":", &saveptr); 33 token != nullptr && i < 3; 34 i++, token = strtok_r(nullptr, ":", &saveptr)) { 36 params[i] = strtol(token, &endptr, 10); 41 if ((*token == '\0') || (*endptr != '\0') || params[i] < 0 || params[i] > 255) { 45 if (token != nullptr) {
|
/system/bt/types/ |
H A D | raw_address.cc | 52 const auto& token = byte_tokens[i]; local 54 if (token.length() != 2) return false; 57 new_addr.address[i] = strtol(token.c_str(), &temp, 16);
|
/system/hwservicemanager/ |
H A D | TokenManager.h | 4 #include <android/hidl/token/1.0/ITokenManager.h> 13 namespace token { namespace in namespace:android::hidl 18 using ::android::hidl::token::V1_0::ITokenManager; 29 // Methods from ::android::hidl::token::V1_0::ITokenManager follow. 31 Return<bool> unregister(const hidl_vec<uint8_t> &token) override; 32 Return<sp<IBase>> get(const hidl_vec<uint8_t> &token) override; 43 static uint64_t getTokenId(const hidl_vec<uint8_t> &token); 49 hidl_vec<uint8_t> token; // First eight bytes are tokenId. Remaining bytes are hmac. member in struct:android::hidl::token::V1_0::implementation::TokenManager::TokenInterface 54 // verifies token, returns iterator into mMap 56 lookupToken(const hidl_vec<uint8_t> &token); [all...] |
H A D | TokenManager.cpp | 13 namespace token { namespace in namespace:android::hidl 39 // Methods from ::android::hidl::token::V1_0::ITokenManager follow. 48 uint64_t id = getTokenId(interface.token); 57 hidl_cb(interface.token); 62 TokenManager::lookupToken(const hidl_vec<uint8_t> &token) { argument 63 uint64_t tokenId = getTokenId(token); 77 if (!constantTimeCompare(token, interface.token)) { 78 ALOGE("Fetch of token with invalid hash."); 85 Return<bool> TokenManager::unregister(const hidl_vec<uint8_t> &token) { argument 96 get(const hidl_vec<uint8_t> &token) argument 125 const hidl_vec<uint8_t> &token = TokenManager::getToken(id, hmac.data(), hmacSize); local 144 getTokenId(const hidl_vec<uint8_t> &token) argument 158 hidl_vec<uint8_t> token; local [all...] |
/system/libhidl/transport/token/1.0/utils/ |
H A D | HybridInterface.cpp | 22 #include <android/hidl/token/1.0/ITokenManager.h> 26 using ::android::hidl::token::V1_0::ITokenManager; 76 sp<HInterface> retrieveHalInterface(const HalToken& token) { argument 83 transaction = gTokenManager->get(token); 91 bool createHalToken(const sp<HInterface>& interface, HalToken* token) { argument 99 *token = newToken; 105 bool deleteHalToken(const HalToken& token) { argument 112 transaction = gTokenManager->unregister(token);
|
/system/security/keystore/include/keystore/ |
H A D | OperationResult.h | 35 sp<IBinder> token; member in struct:android::security::keymaster::OperationResult
|
H A D | keystore_hidl_support.h | 85 inline static hidl_vec<uint8_t> authToken2HidlVec(const Km3HardwareAuthToken& token) { argument 86 static_assert(std::is_same<decltype(token.hmac), 88 "This function assumes token HMAC is 32 bytes, but it might not be."); 89 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + 90 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + 91 sizeof(token.timestamp) + kHmacSize == 99 pos = copy_bytes_to_iterator(token.challenge, pos); 100 pos = copy_bytes_to_iterator(token 117 Km3HardwareAuthToken token; local [all...] |
/system/core/adb/ |
H A D | console.cpp | 39 // read the token 40 std::string token; local 41 if (!android::base::ReadFileToString(auth_token_path, &token) 42 || token.empty()) { 48 // now construct and return the actual command: "auth <token>\n" 50 command += token;
|
H A D | adbd_auth.cpp | 49 bool adbd_auth_verify(const char* token, size_t token_size, const std::string& sig) { argument 82 (RSA_verify(NID_sha1, reinterpret_cast<const uint8_t*>(token), token_size, 93 static bool adbd_auth_generate_token(void* token, size_t token_size) { argument 96 bool okay = (fread(token, token_size, 1, fp) == 1); 208 if (!adbd_auth_generate_token(t->token, sizeof(t->token))) { 209 PLOG(ERROR) << "Error generating token"; 216 p->msg.data_length = sizeof(t->token); 217 p->payload.assign(t->token, t->token [all...] |
H A D | transport.h | 152 char token[TOKEN_SIZE] = {}; member in class:atransport
|
/system/core/libpackagelistparser/ |
H A D | packagelistparser.c | 61 char* token; local 65 while ((token = strsep(&gids, ",\r\n"))) { 71 gid = strtoul(token, &endptr, 10); 125 errmsg = "Could not get next token for \"package name\""; 136 errmsg = "Could not get next token for field \"uid\""; 159 errmsg = "Could not get next token for field \"debuggable\""; 179 errmsg = "Could not get next token for field \"data dir\""; 190 errmsg = "Could not get next token for field \"seinfo\""; 201 errmsg = "Could not get next token for field \"gid(s)\"";
|
/system/keymaster/ng/include/ |
H A D | keystore_hidl_support.h | 103 inline static hidl_vec<uint8_t> authToken2HidlVec(const HardwareAuthToken& token) { argument 105 std::is_same<decltype(token.hmac), ::android::hardware::hidl_array<uint8_t, 32>>::value, 106 "This function assumes token HMAC is 32 bytes, but it might not be."); 107 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + 108 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + 109 sizeof(token.timestamp) + 32 /* HMAC size */ 117 pos = copy_bytes_to_iterator(token.challenge, pos); 118 pos = copy_bytes_to_iterator(token [all...] |
/system/libhidl/libhidlcache/ |
H A D | libhidlcache_test.cpp | 21 #include <android/hidl/memory/token/1.0/IMemoryToken.h> 45 using ::android::hidl::memory::token::V1_0::IMemoryToken; 60 sp<IMemoryToken> token = new HidlMemoryToken(mem); local 62 MemoryBlock blk = {token, 0x200 /* size */, 0x100 /* offset */}; 63 sp<IMemoryToken> mtoken = blk.token; 67 EXPECT_FALSE(cache->cached(token)); 69 MemoryBlock blk2 = {token, 0x200 /* size */, 0x300 /* offset */}; 71 EXPECT_FALSE(cache->cached(token)); 74 sp<IMemory> mem1 = cache->fetch(token); 75 EXPECT_TRUE(cache->cached(token)); [all...] |
H A D | HidlMemoryCache.cpp | 20 #include <android/hidl/memory/token/1.0/IMemoryToken.h> 28 using IMemoryToken = ::android::hidl::memory::token::V1_0::IMemoryToken; 115 sp<IMemoryToken> token = memblk.token; local 116 sp<IMemory> heap = fetch(token);
|
/system/security/keystore/tests/ |
H A D | auth_token_table_test.cpp | 67 HardwareAuthToken token; local 68 token.userId = rsid; 69 token.authenticatorId = ssid; 70 token.authenticatorType = HardwareAuthenticatorType::PASSWORD; 71 token.challenge = challenge; 72 token.timestamp = timestamp; 73 return token; 294 // expired. An additional check of the secure timestamp (in the token) will be made by 295 // keymaster when the found token is passed to it. 330 // Add a third token, thi [all...] |
/system/core/libcutils/ |
H A D | canned_fs_config.cpp | 57 char* token; local 75 token = strtok(NULL, " "); 76 if (token && strncmp(token, "capabilities=", 13) == 0) { 77 p->capabilities = strtoll(token+13, NULL, 0); 80 } while (token);
|
/system/core/libpixelflinger/codeflinger/ |
H A D | Arm64Disassembler.cpp | 95 static void get_token(const char *instr, uint32_t index, char *token) argument 102 token[j++] = instr[i]; 111 token[j++] = instr[i]; 114 token[j] = '\0'; 134 static void decode_token(uint32_t code, char *token, char *instr_part) argument 136 if(strcmp(token, "<imm1>") == 0) 138 else if(strcmp(token, "<imm2>") == 0) 140 else if(strcmp(token, "<shift1>") == 0) 142 else if(strcmp(token, "<shift2>") == 0) 147 else if(strcmp(token, "<shift 273 char token[256]; local [all...] |
/system/security/keystore/ |
H A D | auth_token_table.h | 37 * token for authorizing a key operation. 52 AUTH_TOKEN_EXPIRED = -2, // Found a matching token, but it's too old. 53 AUTH_TOKEN_WRONG_SID = -3, // Found a token with the right challenge, but wrong SID. This 61 * Add an authorization token to the table. 66 * Find an authorization token that authorizes the operation specified by \p operation_handle on 99 Entry(HardwareAuthToken&& token, time_t current_time); 129 const HardwareAuthToken& token() const & { return token_; } function in class:keystore::AuthTokenTable::Entry
|
H A D | operation.cpp | 31 sp<IBinder> token = new ::android::BBinder(); local 32 mMap.emplace(token, Operation(handle, keyid, purpose, dev, std::move(characteristics), appToken, 34 if (pruneable) mLru.push_back(token); 36 mAppTokenMap[appToken].push_back(token); 37 return token; 40 NullOr<const Operation&> OperationMap::getOperation(const sp<IBinder>& token) { argument 41 auto entry = mMap.find(token); 44 updateLru(token); 48 void OperationMap::updateLru(const sp<IBinder>& token) { argument 49 auto lruEntry = std::find(mLru.begin(), mLru.end(), token); 56 removeOperation(const sp<IBinder>& token, bool wasSuccessful) argument 70 removeOperationTracking(const sp<IBinder>& token, const sp<IBinder>& appToken) argument 98 setOperationAuthToken(const sp<IBinder>& token, HardwareAuthToken authToken) argument 105 setOperationVerificationToken(const sp<IBinder>& token, VerificationToken verificationToken) argument [all...] |
H A D | auth_token_table.cpp | 84 static_cast<unsigned long long>(new_entry.token().timestamp), 89 ALOGW("Auth token table filled up; replacing oldest entry"); 137 entries_, [&](Entry& e) { return e.token().challenge == op_handle && !e.completed(); }); 143 *found = &matching_op->token(); 172 *found = &newest_match->token(); 202 auto found = find_if(entries_, [&](Entry& e) { return e.token().challenge == op_handle; }); 211 AuthTokenTable::Entry::Entry(HardwareAuthToken&& token, time_t current_time) argument 212 : token_(std::move(token)), time_received_(current_time), last_use_(current_time),
|
/system/tools/aidl/tests/ |
H A D | aidl_test_service.cpp | 110 void LogRepeatedStringToken(const String16& token) { argument 111 ALOGI("Repeating '%s' of length=%zu", android::String8(token).string(), 112 token.size()); 116 void LogRepeatedToken(const T& token) { argument 118 token_str << token; local 119 ALOGI("Repeating token %s", token_str.str().c_str()); 122 void LogRepeatedMapToken(const Map& token) { argument 123 ALOGI("Repeating Map with %d elements", (int)token.size()); 126 Status RepeatBoolean(bool token, bool* _aidl_return) override { 127 LogRepeatedToken(token 132 LogRepeatedToken(token); variable 142 LogRepeatedToken(token); variable 147 LogRepeatedToken(token); variable 152 LogRepeatedToken(token); variable 157 LogRepeatedToken(token); variable 162 LogRepeatedStringToken(token); variable 167 LogRepeatedMapToken(token); variable [all...] |
/system/core/storaged/ |
H A D | storaged_info.cpp | 346 char token[32]; local 351 token, &val)) < 2) { 355 if (string(token) == "bPreEOLInfo") { 357 } else if (string(token) == "bDeviceLifeTimeEstA") { 359 } else if (string(token) == "bDeviceLifeTimeEstB") {
|
/system/keymaster/tests/ |
H A D | keymaster_enforcement_test.cpp | 54 bool auth_token_timed_out(const hw_auth_token_t& token, uint32_t timeout) const override { 55 return current_time_ > ntoh(token.timestamp) + timeout; 574 hw_auth_token_t token; local 575 memset(&token, 0, sizeof(token)); 576 token.version = HW_AUTH_TOKEN_VERSION; 577 token.challenge = 99; 578 token.user_id = 9; 579 token.authenticator_id = 0; 580 token 597 hw_auth_token_t token; local 626 hw_auth_token_t token; local 650 hw_auth_token_t token; local 677 hw_auth_token_t token; local 706 hw_auth_token_t token; local 735 hw_auth_token_t token; local 758 hw_auth_token_t token; local 811 hw_auth_token_t token; local 836 hw_auth_token_t token; local 886 hw_auth_token_t token; local [all...] |
/system/libhidl/transport/token/1.0/utils/include/hidl/ |
H A D | HybridInterface.h | 39 * - `HalToken`: The type for a "token" of a hidl interface. This is defined to 105 sp<HInterface> retrieveHalInterface(const HalToken& token); 106 bool createHalToken(const sp<HInterface>& interface, HalToken* token); 107 bool deleteHalToken(const HalToken& token); 243 HalToken token; local 245 result = createHalToken(mBase, &token); 247 ALOGE("H2BConverter: Failed to create HAL token."); 250 reply->writeByteArray(token.size(), token.data()); 319 HalToken token local [all...] |