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

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

Issue 417683003: Remove now unnecessary const_casts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | net/cert/ct_log_verifier_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_ssa_openssl.cc
diff --git a/content/child/webcrypto/openssl/rsa_ssa_openssl.cc b/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
index dbe813edf78248d1ab8fe525bc00e8c1352584f2..2845ca8e1b2b052e734806647cd576d670190d48 100644
--- a/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
+++ b/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
@@ -97,14 +97,12 @@ class RsaSsaImplementation : public RsaHashedAlgorithm {
return Status::OperationError();
}
- // This function takes a non-const pointer to the signature, however does
- // not mutate it, so casting is safe.
- // Also note that the return value can be:
+ // Note that the return value can be:
// 1 --> Success
// 0 --> Verification failed
// <0 --> Operation error
int rv = EVP_DigestVerifyFinal(ctx.get(),
- const_cast<uint8_t*>(signature.bytes()),
+ signature.bytes(),
signature.byte_length());
*signature_match = rv == 1;
return rv >= 0 ? Status::Success() : Status::OperationError();
« no previous file with comments | « no previous file | net/cert/ct_log_verifier_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698