Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(771)

Unified Diff: components/webcrypto/algorithms/rsa_pss_unittest.cc

Issue 1355923002: [refactor] Misc post-NSS WebCrypto cleanups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@util_split
Patch Set: add an explicit size_t --> unsigned cast Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/algorithms/hmac.cc ('k') | components/webcrypto/status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/rsa_pss_unittest.cc
diff --git a/components/webcrypto/algorithms/rsa_pss_unittest.cc b/components/webcrypto/algorithms/rsa_pss_unittest.cc
index 3297c89f4b10550be05d5c726e89520e41bb42c7..00ef290503e60d273d837b64374ab2c531e6507f 100644
--- a/components/webcrypto/algorithms/rsa_pss_unittest.cc
+++ b/components/webcrypto/algorithms/rsa_pss_unittest.cc
@@ -19,14 +19,6 @@ namespace webcrypto {
namespace {
-bool SupportsRsaPss() {
-#if defined(USE_OPENSSL)
- return true;
-#else
- return false;
-#endif
-}
-
blink::WebCryptoAlgorithm CreateRsaPssAlgorithm(
unsigned int salt_length_bytes) {
return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
@@ -39,11 +31,6 @@ class WebCryptoRsaPssTest : public WebCryptoTestBase {};
// Test that no two RSA-PSS signatures are identical, when using a non-zero
// lengthed salt.
TEST_F(WebCryptoRsaPssTest, SignIsRandom) {
- if (!SupportsRsaPss()) {
- LOG(WARNING) << "Skipping test because RSA-PSS is not supported";
- return;
- }
-
// Import public/private key pair.
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull();
@@ -97,11 +84,6 @@ TEST_F(WebCryptoRsaPssTest, SignIsRandom) {
// Try signing and verifying when the salt length is 0. The signature in this
// case is not random.
TEST_F(WebCryptoRsaPssTest, SignVerifyNoSalt) {
- if (!SupportsRsaPss()) {
- LOG(WARNING) << "Skipping test because RSA-PSS is not supported";
- return;
- }
-
// Import public/private key pair.
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull();
@@ -147,11 +129,6 @@ TEST_F(WebCryptoRsaPssTest, SignVerifyNoSalt) {
}
TEST_F(WebCryptoRsaPssTest, SignEmptyMessage) {
- if (!SupportsRsaPss()) {
- LOG(WARNING) << "Skipping test because RSA-PSS is not supported";
- return;
- }
-
// Import public/private key pair.
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull();
@@ -189,11 +166,6 @@ TEST_F(WebCryptoRsaPssTest, SignEmptyMessage) {
// * Verify over corrupted message should fail
// * Verification with corrupted signature should fail
TEST_F(WebCryptoRsaPssTest, VerifyKnownAnswer) {
- if (!SupportsRsaPss()) {
- LOG(WARNING) << "Skipping test because RSA-PSS is not supported";
- return;
- }
-
scoped_ptr<base::DictionaryValue> test_data;
ASSERT_TRUE(ReadJsonTestFileToDictionary("rsa_pss.json", &test_data));
« no previous file with comments | « components/webcrypto/algorithms/hmac.cc ('k') | components/webcrypto/status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698