/system/security/keystore/tests/ |
D | verification_token_seralization_test.cpp | 32 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/ |
D | aidl_language_l.ll | 53 /* This happens at every call to yylex (every time we receive one token) */ 69 \"([^\"]|\\.)*\" { yylval->token = new AidlToken(yytext, comments); 70 return yy::parser::token::C_STR; } 102 "<<" { return(yy::parser::token::LSHIFT); } 103 ">>" { return(yy::parser::token::RSHIFT); } 104 "&&" { return(yy::parser::token::LOGICAL_AND); } 105 "||" { return(yy::parser::token::LOGICAL_OR); } 108 "<=" { return(yy::parser::token::LEQ); } 109 ">=" { return(yy::parser::token::GEQ); } 110 "==" { return(yy::parser::token::EQUALITY); } [all …]
|
D | aidl_language_y.yy | 71 AidlToken* token; 101 %token<token> PACKAGE "package" 102 %token<token> IMPORT "import" 103 %token<token> ANNOTATION "annotation" 104 %token<token> C_STR "string literal" 105 %token<token> IDENTIFIER "identifier" 106 %token<token> INTERFACE "interface" 107 %token<token> PARCELABLE "parcelable" 108 %token<token> ONEWAY "oneway" 109 %token<token> ENUM "enum" [all …]
|
/system/keymaster/tests/ |
D | keymaster_enforcement_test.cpp | 54 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/ |
D | keystore_hidl_support.h | 88 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/tools/hidl/ |
D | hidl-gen_l.ll | 57 using token = yy::parser::token; 62 return token::TYPE; \ 103 return isDoc ? token::DOC_COMMENT : token::MULTILINE_COMMENT; 113 "enum" { return token::ENUM; } 114 "extends" { return token::EXTENDS; } 115 "generates" { return token::GENERATES; } 116 "import" { return token::IMPORT; } 117 "interface" { return token::INTERFACE; } 118 "package" { return token::PACKAGE; } 119 "safe_union" { return token::SAFE_UNION; } [all …]
|
/system/hwservicemanager/ |
D | TokenManager.cpp | 31 namespace token { namespace 73 uint64_t id = getTokenId(interface.token); in createToken() 89 hidl_cb(interface.token); in createToken() 94 TokenManager::lookupToken(const hidl_vec<uint8_t> &token) { in lookupToken() argument 95 uint64_t tokenId = getTokenId(token); in lookupToken() 109 if (!constantTimeCompare(token, interface.token)) { in lookupToken() 117 Return<bool> TokenManager::unregister(const hidl_vec<uint8_t> &token) { in unregister() argument 118 auto it = lookupToken(token); in unregister() 130 Return<sp<IBase>> TokenManager::get(const hidl_vec<uint8_t> &token) { in get() argument 131 auto it = lookupToken(token); in get() [all …]
|
D | TokenManager.h | 28 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/core/trusty/test/binder/aidl/com/android/trusty/binder/test/ |
D | ITestService.aidl | 46 boolean RepeatBoolean(boolean token); in RepeatBoolean() argument 47 byte RepeatByte(byte token); in RepeatByte() argument 48 char RepeatChar(char token); in RepeatChar() argument 49 int RepeatInt(int token); in RepeatInt() argument 50 long RepeatLong(long token); in RepeatLong() argument 51 float RepeatFloat(float token); in RepeatFloat() argument 52 double RepeatDouble(double token); in RepeatDouble() argument 53 String RepeatString(String token); in RepeatString() argument 54 ByteEnum RepeatByteEnum(ByteEnum token); in RepeatByteEnum() argument 55 IntEnum RepeatIntEnum(IntEnum token); in RepeatIntEnum() argument [all …]
|
/system/libhidl/transport/token/1.0/ |
D | ITokenManager.hal | 17 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/core/trusty/keymaster/keymint/ |
D | TrustySecureClock.cpp | 29 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/keymaster/ng/include/ |
D | keystore_hidl_support.h | 101 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/keymaster/ng/ |
D | AndroidSecureClock.cpp | 41 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()
|
D | KeyMintUtils.cpp | 116 vector<uint8_t> authToken2AidlVec(const std::optional<HardwareAuthToken>& token) { in authToken2AidlVec() argument 117 static_assert(1 /* version size */ + sizeof(token->challenge) + sizeof(token->userId) + in authToken2AidlVec() 118 sizeof(token->authenticatorId) + sizeof(token->authenticatorType) + in authToken2AidlVec() 119 sizeof(token->timestamp) + 32 /* HMAC size */ in authToken2AidlVec() 125 if (!token.has_value()) return result; in authToken2AidlVec() 126 if (token->mac.size() != 32) return result; in authToken2AidlVec() 131 pos = copy_bytes_to_iterator(token->challenge, pos); in authToken2AidlVec() 132 pos = copy_bytes_to_iterator(token->userId, pos); in authToken2AidlVec() 133 pos = copy_bytes_to_iterator(token->authenticatorId, pos); in authToken2AidlVec() 134 pos = copy_bytes_to_iterator(hton(static_cast<uint32_t>(token->authenticatorType)), pos); in authToken2AidlVec() [all …]
|
/system/tools/aidl/tests/java/src/android/aidl/sdkversion/service/ |
D | AidlJavaVersionTestService.java | 28 public boolean RepeatBoolean(boolean token) { in RepeatBoolean() argument 29 return token; in RepeatBoolean() 33 public TypedObject RepeatTypedObject(TypedObject token) { in RepeatTypedObject() argument 34 return token; in RepeatTypedObject() 38 public List<TypedObject> RepeatTypedList(List<TypedObject> token) { in RepeatTypedList() argument 39 return token; in RepeatTypedList()
|
/system/keymaster/km_openssl/ |
D | soft_keymaster_enforcement.cpp | 193 response.token.challenge = request.challenge; in VerifyAuthorization() 194 response.token.timestamp = get_current_time_ms(); in VerifyAuthorization() 195 response.token.security_level = SecurityLevel(); in VerifyAuthorization() 198 toBlob(response.token.challenge), in VerifyAuthorization() 199 toBlob(response.token.timestamp), in VerifyAuthorization() 200 toBlob(response.token.security_level), in VerifyAuthorization() 203 response.error = hmacSha256(hmac_key_, data_chunks, 5, &response.token.mac); in VerifyAuthorization() 208 keymaster_error_t SoftKeymasterEnforcement::GenerateTimestampToken(TimestampToken* token) { in GenerateTimestampToken() argument 209 token->timestamp = get_current_time_ms(); in GenerateTimestampToken() 210 token->security_level = SecurityLevel(); in GenerateTimestampToken() [all …]
|
/system/gatekeeper/ |
D | gatekeeper.cpp | 258 hw_auth_token_t token; in MintAuthToken() local 260 token.version = HW_AUTH_TOKEN_VERSION; in MintAuthToken() 261 token.challenge = challenge; in MintAuthToken() 262 token.user_id = user_id; in MintAuthToken() 263 token.authenticator_id = authenticator_id; in MintAuthToken() 264 token.authenticator_type = htobe32(HW_AUTH_PASSWORD); in MintAuthToken() 265 token.timestamp = htobe64(timestamp); in MintAuthToken() 267 constexpr uint32_t hashable_length = sizeof(token.version) + in MintAuthToken() 268 sizeof(token.challenge) + in MintAuthToken() 269 sizeof(token.user_id) + in MintAuthToken() [all …]
|
/system/tools/hidl/c2hal/ |
D | c2hal_y.yy | 85 %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/libhidl/transport/token/1.0/utils/ |
D | HybridInterface.cpp | 26 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/ |
D | enumMaxAndAll.cpp | 49 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/tools/aidl/tests/ |
D | aidl_test_service.cpp | 300 void LogRepeatedStringToken(const String16& token) { in LogRepeatedStringToken() argument 301 ALOGI("Repeating '%s' of length=%zu", android::String8(token).string(), in LogRepeatedStringToken() 302 token.size()); in LogRepeatedStringToken() 306 void LogRepeatedToken(const T& token) { in LogRepeatedToken() argument 308 token_str << token; in LogRepeatedToken() 316 Status RepeatBoolean(bool token, bool* _aidl_return) override { in RepeatBoolean() argument 317 LogRepeatedToken(token ? 1 : 0); in RepeatBoolean() 318 *_aidl_return = token; in RepeatBoolean() 321 Status RepeatByte(int8_t token, int8_t* _aidl_return) override { in RepeatByte() argument 322 LogRepeatedToken(token); in RepeatByte() [all …]
|
/system/tools/aidl/tests/android/aidl/tests/ |
D | ITestService.aidl | 114 boolean RepeatBoolean(boolean token); in RepeatBoolean() argument 115 byte RepeatByte(byte token); in RepeatByte() argument 116 char RepeatChar(char token); in RepeatChar() argument 117 int RepeatInt(int token); in RepeatInt() argument 118 long RepeatLong(long token); in RepeatLong() argument 119 float RepeatFloat(float token); in RepeatFloat() argument 120 double RepeatDouble(double token); in RepeatDouble() argument 121 String RepeatString(String token); in RepeatString() argument 122 ByteEnum RepeatByteEnum(ByteEnum token); in RepeatByteEnum() argument 123 IntEnum RepeatIntEnum(IntEnum token); in RepeatIntEnum() argument [all …]
|
/system/extras/libfec/ |
D | fec_verity.cpp | 373 for (const auto& token : tokens) { in parse_table() local 376 if (token != stringify(VERITY_TABLE_VERSION)) { in parse_table() 377 error("unsupported verity table version: %s", token.c_str()); in parse_table() 384 if (token != stringify(FEC_BLOCKSIZE)) { in parse_table() 385 error("unsupported verity block size: %s", token.c_str()); in parse_table() 390 if (parse_uint64(token.c_str(), f->data_size / FEC_BLOCKSIZE, in parse_table() 393 token.c_str()); in parse_table() 398 if (parse_uint64(token.c_str(), f->data_size / FEC_BLOCKSIZE, in parse_table() 400 error("invalid verity hash start block: %s", token.c_str()); in parse_table() 407 if (token != "sha256") { in parse_table() [all …]
|
/system/tools/aidl/tests/java/src/android/aidl/service/ |
D | TestServiceServer.java | 154 public boolean RepeatBoolean(boolean token) throws RemoteException { in RepeatBoolean() argument 155 return token; in RepeatBoolean() 158 public byte RepeatByte(byte token) throws RemoteException { in RepeatByte() argument 159 return token; in RepeatByte() 162 public char RepeatChar(char token) throws RemoteException { in RepeatChar() argument 163 return token; in RepeatChar() 166 public int RepeatInt(int token) throws RemoteException { in RepeatInt() argument 167 return token; in RepeatInt() 170 public long RepeatLong(long token) throws RemoteException { in RepeatLong() argument 171 return token; in RepeatLong() [all …]
|
/system/tools/aidl/tests/java/src/android/aidl/sdkversion/tests/ |
D | AidlJavaVersionTests.java | 67 TypedObject token = new TypedObject(); in testTypedObject() local 68 assertEquals(mService.RepeatTypedObject(token), token); in testTypedObject() local 71 list.add(token); in testTypedObject()
|