Lines Matching refs:key_blob
67 ErrorCode KeymasterHidlTest::GenerateKey(const AuthorizationSet& key_desc, HidlBuf* key_blob, in GenerateKey() argument
69 EXPECT_NE(key_blob, nullptr) << "Key blob pointer must not be null. Test bug"; in GenerateKey()
70 EXPECT_EQ(0U, key_blob->size()) << "Key blob not empty before generating key. Test bug."; in GenerateKey()
80 *key_blob = hidl_key_blob; in GenerateKey()
86 EXPECT_EQ(0U, key_blob->size()); in GenerateKey()
98 const string& key_material, HidlBuf* key_blob, in ImportKey() argument
106 *key_blob = hidl_key_blob; in ImportKey()
112 EXPECT_EQ(0U, key_blob->size()); in ImportKey()
144 ErrorCode KeymasterHidlTest::ExportKey(KeyFormat format, const HidlBuf& key_blob, in ExportKey() argument
149 ->exportKey(format, key_blob, client_id, app_data, in ExportKey()
167 ErrorCode KeymasterHidlTest::DeleteKey(HidlBuf* key_blob, bool keep_key_blob) { in DeleteKey() argument
168 auto rc = keymaster_->deleteKey(*key_blob); in DeleteKey()
169 if (!keep_key_blob) *key_blob = HidlBuf(); in DeleteKey()
183 void KeymasterHidlTest::CheckedDeleteKey(HidlBuf* key_blob, bool keep_key_blob) { in CheckedDeleteKey() argument
184 auto rc = DeleteKey(key_blob, keep_key_blob); in CheckedDeleteKey()
192 void KeymasterHidlTest::CheckGetCharacteristics(const HidlBuf& key_blob, const HidlBuf& client_id, in CheckGetCharacteristics() argument
197 GetCharacteristics(key_blob, client_id, app_data, key_characteristics)); in CheckGetCharacteristics()
204 GetCharacteristics(key_blob, empty_buf, app_data, key_characteristics)); in CheckGetCharacteristics()
209 GetCharacteristics(key_blob, client_id, empty_buf, key_characteristics)); in CheckGetCharacteristics()
214 GetCharacteristics(key_blob, empty_buf, empty_buf, key_characteristics)); in CheckGetCharacteristics()
219 ErrorCode KeymasterHidlTest::GetCharacteristics(const HidlBuf& key_blob, const HidlBuf& client_id, in GetCharacteristics() argument
226 key_blob, client_id, app_data, in GetCharacteristics()
234 ErrorCode KeymasterHidlTest::GetCharacteristics(const HidlBuf& key_blob, in GetCharacteristics() argument
237 return GetCharacteristics(key_blob, client_id, app_data, key_characteristics); in GetCharacteristics()
247 ErrorCode KeymasterHidlTest::Begin(KeyPurpose purpose, const HidlBuf& key_blob, in Begin() argument
254 ->begin(purpose, key_blob, in_params.hidl_data(), HardwareAuthToken(), in Begin()
375 ErrorCode KeymasterHidlTest::AttestKey(const HidlBuf& key_blob, in AttestKey() argument
381 key_blob, attest_params.hidl_data(), in AttestKey()
399 string KeymasterHidlTest::ProcessMessage(const HidlBuf& key_blob, KeyPurpose operation, in ProcessMessage() argument
404 EXPECT_EQ(ErrorCode::OK, Begin(operation, key_blob, in_params, &begin_out_params, &op_handle_)); in ProcessMessage()
425 string KeymasterHidlTest::SignMessage(const HidlBuf& key_blob, const string& message, in SignMessage() argument
429 string signature = ProcessMessage(key_blob, KeyPurpose::SIGN, message, params, &out_params); in SignMessage()
597 void KeymasterHidlTest::VerifyMessage(const HidlBuf& key_blob, const string& message, in VerifyMessage() argument
602 Begin(KeyPurpose::VERIFY, key_blob, params, &begin_out_params, &op_handle_)); in VerifyMessage()
628 string KeymasterHidlTest::EncryptMessage(const HidlBuf& key_blob, const string& message, in EncryptMessage() argument
632 return ProcessMessage(key_blob, KeyPurpose::ENCRYPT, message, in_params, out_params); in EncryptMessage()
698 string KeymasterHidlTest::DecryptMessage(const HidlBuf& key_blob, const string& ciphertext, in DecryptMessage() argument
703 ProcessMessage(key_blob, KeyPurpose::DECRYPT, ciphertext, params, &out_params); in DecryptMessage()
723 std::pair<ErrorCode, HidlBuf> KeymasterHidlTest::UpgradeKey(const HidlBuf& key_blob) { in UpgradeKey() argument
725 keymaster_->upgradeKey(key_blob, hidl_vec<KeyParameter>(), in UpgradeKey()