diff options
author | lizatretyakova <lizatretyakova@google.com> | 2021-11-17 07:18:47 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-11-17 07:19:55 -0800 |
commit | cc35b6b97ad4b2763f84fb866628c2ab121f9bc4 (patch) | |
tree | 5eef4aba4a1f9851512ab0cee3390b54a4da1eb7 /cc/experimental | |
parent | d3915e371c336eb258f4e196c0c5266e1c719e08 (diff) | |
download | tink-cc35b6b97ad4b2763f84fb866628c2ab121f9bc4.tar.gz |
Remove util::Status::OK object usages from falcon-related experimental code.
This CL is a part of Tink migration to using absl::Status{,Or} and absl::StatusCode.
PiperOrigin-RevId: 410519317
Diffstat (limited to 'cc/experimental')
3 files changed, 4 insertions, 4 deletions
diff --git a/cc/experimental/pqcrypto/signature/falcon_verify_key_manager.cc b/cc/experimental/pqcrypto/signature/falcon_verify_key_manager.cc index 6ad55f3f9..26dab4b2e 100644 --- a/cc/experimental/pqcrypto/signature/falcon_verify_key_manager.cc +++ b/cc/experimental/pqcrypto/signature/falcon_verify_key_manager.cc @@ -62,7 +62,7 @@ Status FalconVerifyKeyManager::ValidateKey(const FalconPublicKey& key) const { return status; } - return Status::OK; + return util::OkStatus(); } } // namespace tink diff --git a/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.cc b/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.cc index 13e2a4df7..b05d061c2 100644 --- a/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.cc +++ b/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.cc @@ -114,7 +114,7 @@ crypto::tink::util::Status ValidateFalconPrivateKeySize(int32_t key_size) { switch (key_size) { case kFalcon512PrivateKeySize: case kFalcon1024PrivateKeySize: - return util::Status::OK; + return util::OkStatus(); default: return util::Status(absl::StatusCode::kInvalidArgument, absl::StrFormat("Invalid private key size (%d). " @@ -128,7 +128,7 @@ crypto::tink::util::Status ValidateFalconPublicKeySize(int32_t key_size) { switch (key_size) { case kFalcon512PublicKeySize: case kFalcon1024PublicKeySize: - return util::Status::OK; + return util::OkStatus(); default: return util::Status(absl::StatusCode::kInvalidArgument, absl::StrFormat("Invalid public key size (%d). " diff --git a/cc/experimental/pqcrypto/signature/subtle/falcon_verify.cc b/cc/experimental/pqcrypto/signature/subtle/falcon_verify.cc index 4c45fec3f..4aefd41df 100644 --- a/cc/experimental/pqcrypto/signature/subtle/falcon_verify.cc +++ b/cc/experimental/pqcrypto/signature/subtle/falcon_verify.cc @@ -74,7 +74,7 @@ util::Status FalconVerify::Verify(absl::string_view signature, return util::Status(absl::StatusCode::kInternal, "Signature is not valid."); } - return util::Status::OK; + return util::OkStatus(); } } // namespace subtle |