Home
last modified time | relevance | path

Searched refs:token (Results 1 – 25 of 116) sorted by relevance

12345

/system/security/keystore/tests/
Dverification_token_seralization_test.cpp32 VerificationToken token; in TEST() local
33 token.challenge = 12345; in TEST()
34 token.timestamp = 67890; in TEST()
35 token.securityLevel = SecurityLevel::TRUSTED_ENVIRONMENT; in TEST()
36 token.mac.resize(32); in TEST()
38 token.mac[n] = n; in TEST()
40 optional<vector<uint8_t>> serialized = serializeVerificationToken(token); in TEST()
44 ASSERT_EQ(token.challenge, deserialized.value().challenge); in TEST()
45 ASSERT_EQ(token.timestamp, deserialized.value().timestamp); in TEST()
46 ASSERT_EQ(token.securityLevel, deserialized.value().securityLevel); in TEST()
[all …]
/system/tools/aidl/
Daidl_language_l.ll45 /* This happens at every call to yylex (every time we receive one token) */
61 \"[^\"]*\" { yylval->token = new AidlToken(yytext, comments);
62 return yy::parser::token::C_STR; }
94 "<<" { return(yy::parser::token::LSHIFT); }
95 ">>" { return(yy::parser::token::RSHIFT); }
96 "&&" { return(yy::parser::token::LOGICAL_AND); }
97 "||" { return(yy::parser::token::LOGICAL_OR); }
100 "<=" { return(yy::parser::token::LEQ); }
101 ">=" { return(yy::parser::token::GEQ); }
102 "==" { return(yy::parser::token::EQUALITY); }
[all …]
/system/keymaster/tests/
Dkeymaster_enforcement_test.cpp54 bool auth_token_timed_out(const hw_auth_token_t& token, uint32_t timeout) const override { in auth_token_timed_out() argument
55 return current_time_ > ntoh(token.timestamp) + timeout; in auth_token_timed_out()
583 hw_auth_token_t token; in TEST_F() local
584 memset(&token, 0, sizeof(token)); in TEST_F()
585 token.version = HW_AUTH_TOKEN_VERSION; in TEST_F()
586 token.challenge = 99; in TEST_F()
587 token.user_id = 9; in TEST_F()
588 token.authenticator_id = 0; in TEST_F()
589 token.authenticator_type = hton(static_cast<uint32_t>(HW_AUTH_PASSWORD)); in TEST_F()
590 token.timestamp = 0; in TEST_F()
[all …]
/system/security/keystore/include/keystore/
Dkeystore_hidl_support.h88 inline static hidl_vec<uint8_t> authToken2HidlVec(const Km3HardwareAuthToken& token) { in authToken2HidlVec() argument
89 static_assert(std::is_same<decltype(token.hmac), in authToken2HidlVec()
92 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2HidlVec()
93 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + in authToken2HidlVec()
94 sizeof(token.timestamp) + kHmacSize == in authToken2HidlVec()
102 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2HidlVec()
103 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
104 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2HidlVec()
105 pos = copy_bytes_to_iterator(token.authenticatorType, pos); in authToken2HidlVec()
106 pos = copy_bytes_to_iterator(token.timestamp, pos); in authToken2HidlVec()
[all …]
/system/bt/gd/packet/parser/
Dlanguage_l.ll18 using token = yy::parser::token;
61 "_body_" { return(token::BODY); }
62 "_payload_" { return(token::PAYLOAD); }
63 "_size_" { return(token::SIZE); }
64 "_count_" { return(token::COUNT); }
65 "_fixed_" { return(token::FIXED); }
66 "_reserved_" { return(token::RESERVED); }
67 "_checksum_start_" { return(token::CHECKSUM_START); }
68 "_padding_" { return(token::PADDING); }
70 "checksum" { return(token::CHECKSUM); }
[all …]
/system/tools/hidl/
Dhidl-gen_l.ll57 using token = yy::parser::token;
62 return token::TYPE; \
95 return isDoc ? token::DOC_COMMENT : token::MULTILINE_COMMENT;
105 "enum" { return token::ENUM; }
106 "extends" { return token::EXTENDS; }
107 "generates" { return token::GENERATES; }
108 "import" { return token::IMPORT; }
109 "interface" { return token::INTERFACE; }
110 "package" { return token::PACKAGE; }
111 "safe_union" { return token::SAFE_UNION; }
[all …]
/system/hwservicemanager/
DTokenManager.cpp30 namespace token { namespace
65 uint64_t id = getTokenId(interface.token); in createToken()
80 hidl_cb(interface.token); in createToken()
85 TokenManager::lookupToken(const hidl_vec<uint8_t> &token) { in lookupToken() argument
86 uint64_t tokenId = getTokenId(token); in lookupToken()
100 if (!constantTimeCompare(token, interface.token)) { in lookupToken()
108 Return<bool> TokenManager::unregister(const hidl_vec<uint8_t> &token) { in unregister() argument
109 auto it = lookupToken(token); in unregister()
119 Return<sp<IBase>> TokenManager::get(const hidl_vec<uint8_t> &token) { in get() argument
120 auto it = lookupToken(token); in get()
[all …]
DTokenManager.h28 namespace token {
33 using ::android::hidl::token::V1_0::ITokenManager;
46 Return<bool> unregister(const hidl_vec<uint8_t> &token) override;
47 Return<sp<IBase>> get(const hidl_vec<uint8_t> &token) override;
57 static uint64_t getTokenId(const hidl_vec<uint8_t> &token);
64 hidl_vec<uint8_t> token; // First eight bytes are tokenId. Remaining bytes are hmac. member
71 lookupToken(const hidl_vec<uint8_t> &token);
/system/vold/
DScryptParameters.cpp24 char* token; in parse_scrypt_parameters() local
32 for (i = 0, token = strtok_r(const_cast<char*>(paramstr), ":", &saveptr); in parse_scrypt_parameters()
33 token != nullptr && i < 3; i++, token = strtok_r(nullptr, ":", &saveptr)) { in parse_scrypt_parameters()
35 params[i] = strtol(token, &endptr, 10); in parse_scrypt_parameters()
40 if ((*token == '\0') || (*endptr != '\0') || params[i] < 0 || params[i] > 255) { in parse_scrypt_parameters()
44 if (token != nullptr) { in parse_scrypt_parameters()
/system/core/trusty/keymaster/keymint/
DTrustySecureClock.cpp29 TimeStampToken* token) { in generateTimeStamp() argument
36 token->challenge = response.token.challenge; in generateTimeStamp()
37 token->timestamp.milliSeconds = static_cast<int64_t>(response.token.timestamp); in generateTimeStamp()
38 token->mac = kmBlob2vector(response.token.mac); in generateTimeStamp()
/system/libhidl/transport/token/1.0/
DITokenManager.hal17 package android.hidl.token@1.0;
27 * to the interface until the token is destroyed by calling unregister.
29 * Must return empty token on failure.
31 * @param store Interface which can later be fetched with the returned token.
32 * @return token Opaque value which may be used as inputs to other functions.
34 createToken(interface store) generates (vec<uint8_t>token);
37 * Destory a token and the strong reference to the associated interface.
39 * @param token Token received from createToken
40 * @return success Whether or not the token was successfully unregistered.
42 unregister(vec<uint8_t> token) generates (bool success);
[all …]
/system/keymaster/ng/
DKeyMintAidlUtils.cpp27 vector<uint8_t> authToken2AidlVec(const HardwareAuthToken& token) { in authToken2AidlVec() argument
28 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2AidlVec()
29 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + in authToken2AidlVec()
30 sizeof(token.timestamp) + 32 /* HMAC size */ in authToken2AidlVec()
36 if (token.mac.size() <= 32) return result; in authToken2AidlVec()
41 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2AidlVec()
42 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2AidlVec()
43 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2AidlVec()
44 pos = copy_bytes_to_iterator(token.authenticatorType, pos); in authToken2AidlVec()
45 pos = copy_bytes_to_iterator(token.timestamp, pos); in authToken2AidlVec()
[all …]
DAndroidSecureClock.cpp41 ScopedAStatus AndroidSecureClock::generateTimeStamp(int64_t challenge, TimeStampToken* token) { in generateTimeStamp() argument
49 token->challenge = response.token.challenge; in generateTimeStamp()
50 token->timestamp.milliSeconds = static_cast<int64_t>(response.token.timestamp); in generateTimeStamp()
51 token->mac = kmBlob2vector(response.token.mac); in generateTimeStamp()
DKeyMintUtils.cpp101 vector<uint8_t> authToken2AidlVec(const std::optional<HardwareAuthToken>& token) { in authToken2AidlVec() argument
102 static_assert(1 /* version size */ + sizeof(token->challenge) + sizeof(token->userId) + in authToken2AidlVec()
103 sizeof(token->authenticatorId) + sizeof(token->authenticatorType) + in authToken2AidlVec()
104 sizeof(token->timestamp) + 32 /* HMAC size */ in authToken2AidlVec()
110 if (!token.has_value()) return result; in authToken2AidlVec()
111 if (token->mac.size() < 32) return result; in authToken2AidlVec()
116 pos = copy_bytes_to_iterator(token->challenge, pos); in authToken2AidlVec()
117 pos = copy_bytes_to_iterator(token->userId, pos); in authToken2AidlVec()
118 pos = copy_bytes_to_iterator(token->authenticatorId, pos); in authToken2AidlVec()
119 pos = copy_bytes_to_iterator(hton(static_cast<uint32_t>(token->authenticatorType)), pos); in authToken2AidlVec()
[all …]
/system/keymaster/ng/include/
Dkeystore_hidl_support.h101 inline static hidl_vec<uint8_t> authToken2HidlVec(const HardwareAuthToken& token) { in authToken2HidlVec() argument
103 std::is_same<decltype(token.hmac), ::android::hardware::hidl_array<uint8_t, 32>>::value, in authToken2HidlVec()
105 static_assert(1 /* version size */ + sizeof(token.challenge) + sizeof(token.userId) + in authToken2HidlVec()
106 sizeof(token.authenticatorId) + sizeof(token.authenticatorType) + in authToken2HidlVec()
107 sizeof(token.timestamp) + 32 /* HMAC size */ in authToken2HidlVec()
115 pos = copy_bytes_to_iterator(token.challenge, pos); in authToken2HidlVec()
116 pos = copy_bytes_to_iterator(token.userId, pos); in authToken2HidlVec()
117 pos = copy_bytes_to_iterator(token.authenticatorId, pos); in authToken2HidlVec()
118 pos = copy_bytes_to_iterator(token.authenticatorType, pos); in authToken2HidlVec()
119 pos = copy_bytes_to_iterator(token.timestamp, pos); in authToken2HidlVec()
[all …]
/system/bt/main/shim/
Ddumpsys.cc33 void bluetooth::shim::RegisterDumpsysFunction(const void* token, in RegisterDumpsysFunction() argument
35 CHECK(dumpsys_functions_.find(token) == dumpsys_functions_.end()); in RegisterDumpsysFunction()
36 dumpsys_functions_.insert({token, func}); in RegisterDumpsysFunction()
39 void bluetooth::shim::UnregisterDumpsysFunction(const void* token) { in UnregisterDumpsysFunction() argument
40 CHECK(dumpsys_functions_.find(token) != dumpsys_functions_.end()); in UnregisterDumpsysFunction()
41 dumpsys_functions_.erase(token); in UnregisterDumpsysFunction()
/system/keymaster/km_openssl/
Dsoft_keymaster_enforcement.cpp185 response.token.challenge = request.challenge; in VerifyAuthorization()
186 response.token.timestamp = get_current_time_ms(); in VerifyAuthorization()
187 response.token.security_level = SecurityLevel(); in VerifyAuthorization()
190 toBlob(response.token.challenge), in VerifyAuthorization()
191 toBlob(response.token.timestamp), in VerifyAuthorization()
192 toBlob(response.token.security_level), in VerifyAuthorization()
195 response.error = hmacSha256(hmac_key_, data_chunks, 5, &response.token.mac); in VerifyAuthorization()
200 keymaster_error_t SoftKeymasterEnforcement::GenerateTimestampToken(TimestampToken* token) { in GenerateTimestampToken() argument
201 token->timestamp = get_current_time_ms(); in GenerateTimestampToken()
202 token->security_level = SecurityLevel(); in GenerateTimestampToken()
[all …]
/system/tools/aidl/tests/
Daidl_test_service.cpp287 void LogRepeatedStringToken(const String16& token) { in LogRepeatedStringToken() argument
288 ALOGI("Repeating '%s' of length=%zu", android::String8(token).string(), in LogRepeatedStringToken()
289 token.size()); in LogRepeatedStringToken()
293 void LogRepeatedToken(const T& token) { in LogRepeatedToken() argument
295 token_str << token; in LogRepeatedToken()
303 Status RepeatBoolean(bool token, bool* _aidl_return) override { in RepeatBoolean() argument
304 LogRepeatedToken(token ? 1 : 0); in RepeatBoolean()
305 *_aidl_return = token; in RepeatBoolean()
308 Status RepeatByte(int8_t token, int8_t* _aidl_return) override { in RepeatByte() argument
309 LogRepeatedToken(token); in RepeatByte()
[all …]
/system/libhidl/transport/token/1.0/utils/
DHybridInterface.cpp26 using ::android::hidl::token::V1_0::ITokenManager;
76 sp<HInterface> retrieveHalInterface(const HalToken& token) { in retrieveHalInterface() argument
83 transaction = gTokenManager->get(token); in retrieveHalInterface()
91 bool createHalToken(const sp<HInterface>& interface, HalToken* token) { in createHalToken() argument
99 *token = newToken; in createHalToken()
105 bool deleteHalToken(const HalToken& token) { in deleteHalToken() argument
112 transaction = gTokenManager->unregister(token); in deleteHalToken()
/system/tools/hidl/lint/lints/
DenumMaxAndAll.cpp49 for (const std::string& token : tokens) { in enumValueNames() local
50 if (token == "ALL" || token == "COUNT" || token == "MAX") { in enumValueNames()
51 errorString = "\"" + token + "\"" + in enumValueNames()
/system/gatekeeper/
Dgatekeeper.cpp245 hw_auth_token_t token; in MintAuthToken() local
247 token.version = HW_AUTH_TOKEN_VERSION; in MintAuthToken()
248 token.challenge = challenge; in MintAuthToken()
249 token.user_id = user_id; in MintAuthToken()
250 token.authenticator_id = authenticator_id; in MintAuthToken()
251 token.authenticator_type = htobe32(HW_AUTH_PASSWORD); in MintAuthToken()
252 token.timestamp = htobe64(timestamp); in MintAuthToken()
254 constexpr uint32_t hashable_length = sizeof(token.version) + in MintAuthToken()
255 sizeof(token.challenge) + in MintAuthToken()
256 sizeof(token.user_id) + in MintAuthToken()
[all …]
/system/tools/aidl/tests/android/aidl/tests/
DITestService.aidl75 boolean RepeatBoolean(boolean token); in RepeatBoolean() argument
76 byte RepeatByte(byte token); in RepeatByte() argument
77 char RepeatChar(char token); in RepeatChar() argument
78 int RepeatInt(int token); in RepeatInt() argument
79 long RepeatLong(long token); in RepeatLong() argument
80 float RepeatFloat(float token); in RepeatFloat() argument
81 double RepeatDouble(double token); in RepeatDouble() argument
82 String RepeatString(String token); in RepeatString() argument
83 ByteEnum RepeatByteEnum(ByteEnum token); in RepeatByteEnum() argument
84 IntEnum RepeatIntEnum(IntEnum token); in RepeatIntEnum() argument
[all …]
/system/tools/hidl/c2hal/
Dc2hal_y.yy85 %token START_HEADER
86 %token START_EXPR
88 %token STRUCT
89 %token UNION
90 %token ENUM
91 %token CLASS
92 %token CONST
93 %token VOID
94 %token INCLUDE
95 %token DEFINE
[all …]
/system/bt/gd/cert/
Dpy_le_acl_manager.py94 token = self.initiate_connection(remote_addr)
95 return self.complete_outgoing_connection(token)
101 def cancel_connection(self, token): argument
102 assertThat(token in self.outgoing_connection_event_streams).isTrue()
103 pair = self.outgoing_connection_event_streams.pop(token)
111 token = self.next_token
113 return token
135 def complete_outgoing_connection(self, token): argument
136 assertThat(self.outgoing_connection_event_streams[token]).isNotNone()
137 event_stream = self.outgoing_connection_event_streams.pop(token)[0]
/system/bt/gd/hci/
Daddress.cc71 std::string token; in FromString() local
73 while (getline(stream, token, ':')) { in FromString()
78 if (token.length() != 2) { in FromString()
83 addr.address.at(5 - index) = std::strtol(token.c_str(), &temp, 16); in FromString()
84 if (temp == token.c_str()) { in FromString()
88 if (temp != (token.c_str() + token.size())) { in FromString()

12345