diff options
author | lizatretyakova <lizatretyakova@google.com> | 2021-10-19 12:41:52 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-10-19 12:42:31 -0700 |
commit | 92fbd25c4e2ad536d4637a2bfe7ac750475396f3 (patch) | |
tree | 24594b495fe204bb38f543de5756a2235248370e /cc/experimental | |
parent | 8caf82f1c55eb5e4fc2cff7e4c562620cc01d8df (diff) | |
download | tink-92fbd25c4e2ad536d4637a2bfe7ac750475396f3.tar.gz |
Replace the deprecated crypto::tink::util::error::UNIMPLEMENTEDD usages with its absl version absl::StatusCode::kUnimplemented.
This CL is a part of Tink migration to using absl::Status{,Or} and absl::StatusCode.
PiperOrigin-RevId: 404339304
Diffstat (limited to 'cc/experimental')
4 files changed, 4 insertions, 4 deletions
diff --git a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt_test.cc b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt_test.cc index 4120f5fc9..110a11022 100644 --- a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt_test.cc +++ b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt_test.cc @@ -279,7 +279,7 @@ TEST_F(Cecpq2AeadHkdfHybridDecryptTest, InvalidKeyWrongEcType) { ->set_curve_type(google::crypto::tink::EllipticCurveType::NIST_P256); auto result(Cecpq2AeadHkdfHybridDecrypt::New(recipient_key)); EXPECT_THAT(result.status(), - StatusIs(util::error::UNIMPLEMENTED, + StatusIs(absl::StatusCode::kUnimplemented, HasSubstr("Unsupported elliptic curve"))); } diff --git a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt_test.cc b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt_test.cc index ecfcb751d..a3441e793 100644 --- a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt_test.cc +++ b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt_test.cc @@ -88,7 +88,7 @@ TEST(Cecpq2AeadHkdfHybridEncryptTest, InvalidKeyUnsupportedEcType) { google::crypto::tink::EllipticCurveType::NIST_P256); auto result = Cecpq2AeadHkdfHybridEncrypt::New(sender_key); EXPECT_THAT(result.status(), - StatusIs(util::error::UNIMPLEMENTED, + StatusIs(absl::StatusCode::kUnimplemented, HasSubstr("Unsupported elliptic curve"))); } diff --git a/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_recipient_kem_boringssl.cc b/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_recipient_kem_boringssl.cc index d0e5cbf95..177c9f5a7 100644 --- a/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_recipient_kem_boringssl.cc +++ b/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_recipient_kem_boringssl.cc @@ -45,7 +45,7 @@ Cecpq2HkdfRecipientKemBoringSsl::New(EllipticCurveType curve, return Cecpq2HkdfX25519RecipientKemBoringSsl::New( curve, std::move(ec_private_key), std::move(hrss_private_key_seed)); default: - return util::Status(util::error::UNIMPLEMENTED, + return util::Status(absl::StatusCode::kUnimplemented, "Unsupported elliptic curve"); } } diff --git a/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_sender_kem_boringssl.cc b/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_sender_kem_boringssl.cc index 2490bb915..f9c55518c 100644 --- a/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_sender_kem_boringssl.cc +++ b/cc/experimental/pqcrypto/cecpq2/subtle/cecpq2_hkdf_sender_kem_boringssl.cc @@ -45,7 +45,7 @@ Cecpq2HkdfSenderKemBoringSsl::New(subtle::EllipticCurveType curve, return Cecpq2HkdfX25519SenderKemBoringSsl::New(curve, ec_pubx, ec_puby, marshalled_hrss_pub); default: - return util::Status(util::error::UNIMPLEMENTED, + return util::Status(absl::StatusCode::kUnimplemented, "Unsupported elliptic curve"); } } |