aboutsummaryrefslogtreecommitdiff
path: root/cc/experimental
diff options
context:
space:
mode:
authorlizatretyakova <lizatretyakova@google.com>2021-09-22 08:17:14 -0700
committerCopybara-Service <copybara-worker@google.com>2021-09-22 08:18:15 -0700
commit220adc26f8c9e0869f0b836089361a7e15db86b9 (patch)
tree26ee03abdebaa20f446612c7b7ec648905416cb5 /cc/experimental
parent9ec6a6749f9e3dde02cfab24834202573e31cd54 (diff)
downloadtink-220adc26f8c9e0869f0b836089361a7e15db86b9.tar.gz
Replace the deprecated crypto::tink::util::Status::OK object with a call to an absl-friendly getter crypto::tink::util::OkStatus().
PiperOrigin-RevId: 398242794
Diffstat (limited to 'cc/experimental')
-rw-r--r--cc/experimental/pqcrypto/cecpq2/hybrid/cecpq2_aead_hkdf_public_key_manager.cc2
-rw-r--r--cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt.cc2
-rw-r--r--cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt.cc2
-rw-r--r--cc/experimental/pqcrypto/signature/dilithium_sign_key_manager.cc2
-rw-r--r--cc/experimental/pqcrypto/signature/dilithium_verify_key_manager.cc4
-rw-r--r--cc/experimental/pqcrypto/signature/sphincs_verify_key_manager.cc4
-rw-r--r--cc/experimental/pqcrypto/signature/subtle/dilithium_avx2_verify.cc2
-rw-r--r--cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.cc4
-rw-r--r--cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc2
9 files changed, 12 insertions, 12 deletions
diff --git a/cc/experimental/pqcrypto/cecpq2/hybrid/cecpq2_aead_hkdf_public_key_manager.cc b/cc/experimental/pqcrypto/cecpq2/hybrid/cecpq2_aead_hkdf_public_key_manager.cc
index 0b1774163..33a669a63 100644
--- a/cc/experimental/pqcrypto/cecpq2/hybrid/cecpq2_aead_hkdf_public_key_manager.cc
+++ b/cc/experimental/pqcrypto/cecpq2/hybrid/cecpq2_aead_hkdf_public_key_manager.cc
@@ -62,7 +62,7 @@ Status Cecpq2AeadHkdfPublicKeyManager::ValidateParams(
if (params.kem_params().ec_point_format() == EcPointFormat::UNKNOWN_FORMAT) {
return Status(util::error::INVALID_ARGUMENT, "Unknown EC point format.");
}
- return Status::OK;
+ return util::OkStatus();
}
Status Cecpq2AeadHkdfPublicKeyManager::ValidateKey(
diff --git a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt.cc b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt.cc
index 240d60739..21d37141b 100644
--- a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt.cc
+++ b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_decrypt.cc
@@ -59,7 +59,7 @@ util::Status Validate(
}
}
- return util::Status::OK;
+ return util::OkStatus();
}
} // namespace
diff --git a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt.cc b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt.cc
index 774bb1626..754700924 100644
--- a/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt.cc
+++ b/cc/experimental/pqcrypto/cecpq2/hybrid/internal/cecpq2_aead_hkdf_hybrid_encrypt.cc
@@ -44,7 +44,7 @@ util::Status Validate(
"Invalid Cecpq2AeadHkdfPublicKeyInternal: has KEM unexpected field.");
}
- return util::Status::OK;
+ return util::OkStatus();
}
} // namespace
diff --git a/cc/experimental/pqcrypto/signature/dilithium_sign_key_manager.cc b/cc/experimental/pqcrypto/signature/dilithium_sign_key_manager.cc
index 2a2326929..c0c3829ef 100644
--- a/cc/experimental/pqcrypto/signature/dilithium_sign_key_manager.cc
+++ b/cc/experimental/pqcrypto/signature/dilithium_sign_key_manager.cc
@@ -105,7 +105,7 @@ Status DilithiumSignKeyManager::ValidateKey(
"Invalid dilithium private key size.");
}
- return Status::OK;
+ return util::OkStatus();
}
Status DilithiumSignKeyManager::ValidateKeyFormat(
diff --git a/cc/experimental/pqcrypto/signature/dilithium_verify_key_manager.cc b/cc/experimental/pqcrypto/signature/dilithium_verify_key_manager.cc
index 847d0821f..dbfcf2805 100644
--- a/cc/experimental/pqcrypto/signature/dilithium_verify_key_manager.cc
+++ b/cc/experimental/pqcrypto/signature/dilithium_verify_key_manager.cc
@@ -75,7 +75,7 @@ Status DilithiumVerifyKeyManager::ValidateKey(
return Status(util::error::INVALID_ARGUMENT,
"Invalid dilithium public key size.");
}
- return Status::OK;
+ return util::OkStatus();
}
Status DilithiumVerifyKeyManager::ValidateParams(
@@ -101,7 +101,7 @@ Status DilithiumVerifyKeyManager::ValidateParams(
}
}
- return Status::OK;
+ return util::OkStatus();
}
} // namespace tink
diff --git a/cc/experimental/pqcrypto/signature/sphincs_verify_key_manager.cc b/cc/experimental/pqcrypto/signature/sphincs_verify_key_manager.cc
index 266a8f302..438ccf342 100644
--- a/cc/experimental/pqcrypto/signature/sphincs_verify_key_manager.cc
+++ b/cc/experimental/pqcrypto/signature/sphincs_verify_key_manager.cc
@@ -70,7 +70,7 @@ Status SphincsVerifyKeyManager::ValidateKey(const SphincsPublicKey& key) const {
return status;
}
- return Status::OK;
+ return util::OkStatus();
}
Status SphincsVerifyKeyManager::ValidateParams(
@@ -86,7 +86,7 @@ Status SphincsVerifyKeyManager::ValidateParams(
return status;
}
- return Status::OK;
+ return util::OkStatus();
}
} // namespace tink
diff --git a/cc/experimental/pqcrypto/signature/subtle/dilithium_avx2_verify.cc b/cc/experimental/pqcrypto/signature/subtle/dilithium_avx2_verify.cc
index 25d4c86eb..493052b30 100644
--- a/cc/experimental/pqcrypto/signature/subtle/dilithium_avx2_verify.cc
+++ b/cc/experimental/pqcrypto/signature/subtle/dilithium_avx2_verify.cc
@@ -159,7 +159,7 @@ util::Status DilithiumAvx2Verify::Verify(absl::string_view signature,
"Signature is not valid.");
}
- return util::Status::OK;
+ return util::OkStatus();
}
} // namespace subtle
diff --git a/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.cc b/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.cc
index 90efdf7f0..ca6ab6b73 100644
--- a/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.cc
+++ b/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.cc
@@ -73,7 +73,7 @@ crypto::tink::util::Status ValidatePrivateKeySize(int32 key_size) {
case kSphincsPrivateKeySize64:
case kSphincsPrivateKeySize96:
case kSphincsPrivateKeySize128:
- return util::Status::OK;
+ return util::OkStatus();
default:
return util::Status(
util::error::INVALID_ARGUMENT,
@@ -89,7 +89,7 @@ crypto::tink::util::Status ValidatePublicKeySize(int32 key_size) {
case kSphincsPublicKeySize32:
case kSphincsPublicKeySize48:
case kSphincsPublicKeySize64:
- return util::Status::OK;
+ return util::OkStatus();
default:
return util::Status(
util::error::INVALID_ARGUMENT,
diff --git a/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc b/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc
index 77c55f006..528c93728 100644
--- a/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc
+++ b/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc
@@ -71,7 +71,7 @@ util::Status SphincsVerify::Verify(absl::string_view signature,
"Signature is not valid.");
}
- return util::Status::OK;
+ return util::OkStatus();
}
} // namespace subtle