Lines Matching refs:ErrorCode

190 ErrorCode KeyMintAidlTestBase::GetReturnErrorCode(const Status& result) {  in GetReturnErrorCode()
191 if (result.isOk()) return ErrorCode::OK; in GetReturnErrorCode()
194 return static_cast<ErrorCode>(result.getServiceSpecificError()); in GetReturnErrorCode()
197 return ErrorCode::UNKNOWN_ERROR; in GetReturnErrorCode()
226 ErrorCode KeyMintAidlTestBase::GenerateKey(const AuthorizationSet& key_desc, in GenerateKey()
266 ErrorCode KeyMintAidlTestBase::GenerateKey(const AuthorizationSet& key_desc, in GenerateKey()
271 ErrorCode KeyMintAidlTestBase::ImportKey(const AuthorizationSet& key_desc, KeyFormat format, in ImportKey()
309 ErrorCode KeyMintAidlTestBase::ImportKey(const AuthorizationSet& key_desc, KeyFormat format, in ImportKey()
314 ErrorCode KeyMintAidlTestBase::ImportWrappedKey(string wrapped_key, string wrapping_key, in ImportWrappedKey()
319 EXPECT_EQ(ErrorCode::OK, ImportKey(wrapping_key_desc, KeyFormat::PKCS8, wrapping_key)); in ImportWrappedKey()
356 ErrorCode KeyMintAidlTestBase::GetCharacteristics(const vector<uint8_t>& key_blob, in GetCharacteristics()
365 ErrorCode KeyMintAidlTestBase::GetCharacteristics(const vector<uint8_t>& key_blob, in GetCharacteristics()
381 ASSERT_EQ(ErrorCode::OK, GetCharacteristics(key_blob, &retrieved)); in CheckCharacteristics()
396 ASSERT_EQ(ErrorCode::OK, GetCharacteristics(key_blob, app_id, app_data, &retrieved)); in CheckAppIdCharacteristics()
402 EXPECT_EQ(ErrorCode::INVALID_KEY_BLOB, in CheckAppIdCharacteristics()
406 EXPECT_EQ(ErrorCode::INVALID_KEY_BLOB, in CheckAppIdCharacteristics()
410 EXPECT_EQ(ErrorCode::INVALID_KEY_BLOB, in CheckAppIdCharacteristics()
415 ErrorCode KeyMintAidlTestBase::DeleteKey(vector<uint8_t>* key_blob, bool keep_key_blob) { in DeleteKey()
425 ErrorCode KeyMintAidlTestBase::DeleteKey(bool keep_key_blob) { in DeleteKey()
429 ErrorCode KeyMintAidlTestBase::DeleteAllKeys() { in DeleteAllKeys()
435 ErrorCode KeyMintAidlTestBase::DestroyAttestationIds() { in DestroyAttestationIds()
441 ErrorCode result = DeleteKey(key_blob, keep_key_blob); in CheckedDeleteKey()
442 EXPECT_TRUE(result == ErrorCode::OK || result == ErrorCode::UNIMPLEMENTED) << result << endl; in CheckedDeleteKey()
449 ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob, in Begin()
467 ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const vector<uint8_t>& key_blob, in Begin()
485 ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const AuthorizationSet& in_params, in Begin()
492 ErrorCode KeyMintAidlTestBase::Begin(KeyPurpose purpose, const AuthorizationSet& in_params) { in Begin()
495 ErrorCode result = Begin(purpose, in_params, &out_params); in Begin()
500 ErrorCode KeyMintAidlTestBase::UpdateAad(const string& input) { in UpdateAad()
506 ErrorCode KeyMintAidlTestBase::Update(const string& input, string* output) { in Update()
510 if (!output) return ErrorCode::UNEXPECTED_NULL_POINTER; in Update()
520 ErrorCode KeyMintAidlTestBase::Finish(const string& input, const string& signature, in Finish()
526 if (!op_) return ErrorCode::UNEXPECTED_NULL_POINTER; in Finish()
539 ErrorCode KeyMintAidlTestBase::Abort(const std::shared_ptr<IKeyMintOperation>& op) { in Abort()
543 if (!op) return ErrorCode::UNEXPECTED_NULL_POINTER; in Abort()
547 return static_cast<ErrorCode>(retval.getServiceSpecificError()); in Abort()
550 ErrorCode KeyMintAidlTestBase::Abort() { in Abort()
554 if (!op_) return ErrorCode::UNEXPECTED_NULL_POINTER; in Abort()
557 return static_cast<ErrorCode>(retval.getServiceSpecificError()); in Abort()
563 EXPECT_EQ(ErrorCode::OK, Abort()); in AbortIfNeeded()
570 -> std::tuple<ErrorCode, string> { in ProcessMessage()
572 ErrorCode result = Begin(operation, key_blob, in_params, &begin_out_params); in ProcessMessage()
573 if (result != ErrorCode::OK) return {result, {}}; in ProcessMessage()
584 ErrorCode result = Begin(operation, key_blob, in_params, out_params); in ProcessMessage()
585 EXPECT_EQ(ErrorCode::OK, result); in ProcessMessage()
586 if (result != ErrorCode::OK) { in ProcessMessage()
591 EXPECT_EQ(ErrorCode::OK, Finish(message, &output)); in ProcessMessage()
619 ASSERT_EQ(ErrorCode::OK, in CheckHmacTestVector()
637 ASSERT_EQ(ErrorCode::OK, ImportKey(AuthorizationSetBuilder() in CheckAesCtrTestVector()
664 ASSERT_EQ(ErrorCode::OK, ImportKey(authset, KeyFormat::RAW, key)); in CheckTripleDesTestVector()
678 ASSERT_EQ(ErrorCode::OK, Begin(KeyPurpose::VERIFY, key_blob, params, &begin_out_params)); in VerifyMessage()
681 EXPECT_EQ(ErrorCode::OK, Finish(message, signature, &output)); in VerifyMessage()
1000 std::pair<ErrorCode, vector<uint8_t>> KeyMintAidlTestBase::UpgradeKey( in UpgradeKey()
1002 std::pair<ErrorCode, vector<uint8_t>> retval; in UpgradeKey()
1005 ErrorCode errorcode = GetReturnErrorCode(result); in UpgradeKey()
1200 ErrorCode KeyMintAidlTestBase::UseAesKey(const vector<uint8_t>& aesKeyBlob) { in UseAesKey()
1207 ErrorCode KeyMintAidlTestBase::UseHmacKey(const vector<uint8_t>& hmacKeyBlob) { in UseHmacKey()
1214 ErrorCode KeyMintAidlTestBase::UseRsaKey(const vector<uint8_t>& rsaKeyBlob) { in UseRsaKey()
1222 ErrorCode KeyMintAidlTestBase::UseEcdsaKey(const vector<uint8_t>& ecdsaKeyBlob) { in UseEcdsaKey()
1331 EXPECT_EQ(ErrorCode::OK, error); in verify_attestation_record()
1332 if (error != ErrorCode::OK) return false; in verify_attestation_record()
1404 EXPECT_EQ(ErrorCode::OK, error); in verify_attestation_record()