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

Unified Diff: content/child/webcrypto/openssl/rsa_key_openssl.cc

Issue 444793003: [style] Replace various "X() != 1" checks with "!X()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | content/child/webcrypto/openssl/rsa_oaep_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/openssl/rsa_key_openssl.cc
diff --git a/content/child/webcrypto/openssl/rsa_key_openssl.cc b/content/child/webcrypto/openssl/rsa_key_openssl.cc
index 096c9ba3ee71c546fbdeea58e892e1eb6d3dff2d..fb352b929e77be8a2d8eb5f82ec18e70f5b99029 100644
--- a/content/child/webcrypto/openssl/rsa_key_openssl.cc
+++ b/content/child/webcrypto/openssl/rsa_key_openssl.cc
@@ -183,7 +183,7 @@ Status ImportRsaPrivateKey(const blink::WebCryptoAlgorithm& algorithm,
// TODO(eroman): This should really be a DataError, however for compatibility
// with NSS it is an OperationError.
- if (1 != RSA_check_key(rsa.get()))
+ if (!RSA_check_key(rsa.get()))
return Status::OperationError();
// Create a corresponding EVP_PKEY.
@@ -359,7 +359,7 @@ Status RsaHashedAlgorithm::ImportKeyPkcs8(
crypto::ScopedRSA rsa(EVP_PKEY_get1_RSA(private_key.get()));
if (!rsa.get())
return Status::ErrorUnexpected();
- if (1 != RSA_check_key(rsa.get()))
+ if (!RSA_check_key(rsa.get()))
return Status::DataError();
// TODO(eroman): Validate the algorithm OID against the webcrypto provided
« no previous file with comments | « no previous file | content/child/webcrypto/openssl/rsa_oaep_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698