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 |