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

Side by Side Diff: extensions/browser/verified_contents.cc

Issue 2768033002: Use size_t in crypto::SignatureVerifier. (Closed)
Patch Set: . Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/verified_contents.h" 5 #include "extensions/browser/verified_contents.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/base64url.h" 9 #include "base/base64url.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return dictionary; 55 return dictionary;
56 } 56 }
57 return NULL; 57 return NULL;
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 namespace extensions { 62 namespace extensions {
63 63
64 VerifiedContents::VerifiedContents(const uint8_t* public_key, 64 VerifiedContents::VerifiedContents(const uint8_t* public_key,
65 int public_key_size) 65 size_t public_key_size)
66 : public_key_(public_key), 66 : public_key_(public_key),
67 public_key_size_(public_key_size), 67 public_key_size_(public_key_size),
68 valid_signature_(false), // Guilty until proven innocent. 68 valid_signature_(false), // Guilty until proven innocent.
69 block_size_(0) {} 69 block_size_(0) {}
70 70
71 VerifiedContents::~VerifiedContents() { 71 VerifiedContents::~VerifiedContents() {
72 } 72 }
73 73
74 // The format of the payload json is: 74 // The format of the payload json is:
75 // { 75 // {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 reinterpret_cast<const uint8_t*>(payload.data()), payload.size()); 317 reinterpret_cast<const uint8_t*>(payload.data()), payload.size());
318 318
319 if (!signature_verifier.VerifyFinal()) { 319 if (!signature_verifier.VerifyFinal()) {
320 VLOG(1) << "Could not verify signature - VerifyFinal failure"; 320 VLOG(1) << "Could not verify signature - VerifyFinal failure";
321 return false; 321 return false;
322 } 322 }
323 return true; 323 return true;
324 } 324 }
325 325
326 } // namespace extensions 326 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698