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

Side by Side Diff: net/ssl/token_binding.cc

Issue 2332473002: Use new BoringSSL scopers in //crypto (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « net/ssl/token_binding.h ('k') | net/test/embedded_test_server/embedded_test_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ssl/token_binding.h" 5 #include "net/ssl/token_binding.h"
6 6
7 #include <openssl/bytestring.h> 7 #include <openssl/bytestring.h>
8 #include <openssl/ec.h> 8 #include <openssl/ec.h>
9 #include <openssl/ec_key.h> 9 #include <openssl/ec_key.h>
10 #include <openssl/evp.h> 10 #include <openssl/evp.h>
11 #include <openssl/mem.h> 11 #include <openssl/mem.h>
12 12
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "crypto/ec_private_key.h"
14 #include "crypto/scoped_openssl_types.h" 15 #include "crypto/scoped_openssl_types.h"
15 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
16 #include "net/ssl/ssl_config.h" 17 #include "net/ssl/ssl_config.h"
17 18
18 namespace net { 19 namespace net {
19 20
20 namespace { 21 namespace {
21 22
22 const size_t kUncompressedPointLen = 65; 23 const size_t kUncompressedPointLen = 65;
23 24
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return false; 214 return false;
214 } 215 }
215 216
216 crypto::ScopedECDSA_SIG sig(RawToECDSA_SIG(keyp, signature)); 217 crypto::ScopedECDSA_SIG sig(RawToECDSA_SIG(keyp, signature));
217 if (!sig) 218 if (!sig)
218 return false; 219 return false;
219 return !!ECDSA_do_verify(digest, digest_len, sig.get(), keyp); 220 return !!ECDSA_do_verify(digest, digest_len, sig.get(), keyp);
220 } 221 }
221 222
222 } // namespace net 223 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/token_binding.h ('k') | net/test/embedded_test_server/embedded_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698