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

Side by Side Diff: net/cert/ct_log_verifier_openssl.cc

Issue 417683003: Remove now unnecessary const_casts. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/openssl/rsa_ssa_openssl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/ct_log_verifier.h" 5 #include "net/cert/ct_log_verifier.h"
6 6
7 #include <openssl/evp.h> 7 #include <openssl/evp.h>
8 #include <openssl/x509.h> 8 #include <openssl/x509.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 EVP_MD_CTX ctx; 106 EVP_MD_CTX ctx;
107 EVP_MD_CTX_init(&ctx); 107 EVP_MD_CTX_init(&ctx);
108 108
109 bool ok = ( 109 bool ok = (
110 1 == EVP_DigestVerifyInit(&ctx, NULL, hash_alg, NULL, public_key_) && 110 1 == EVP_DigestVerifyInit(&ctx, NULL, hash_alg, NULL, public_key_) &&
111 1 == EVP_DigestVerifyUpdate( 111 1 == EVP_DigestVerifyUpdate(
112 &ctx, data_to_sign.data(), data_to_sign.size()) && 112 &ctx, data_to_sign.data(), data_to_sign.size()) &&
113 1 == EVP_DigestVerifyFinal( 113 1 == EVP_DigestVerifyFinal(
114 &ctx, 114 &ctx,
115 reinterpret_cast<unsigned char*>(const_cast<char*>(signature.data())), 115 reinterpret_cast<const uint8_t*>(signature.data()),
116 signature.size())); 116 signature.size()));
117 117
118 EVP_MD_CTX_cleanup(&ctx); 118 EVP_MD_CTX_cleanup(&ctx);
119 return ok; 119 return ok;
120 } 120 }
121 121
122 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/rsa_ssa_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698