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

Side by Side Diff: crypto/signature_verifier_unittest.cc

Issue 2523663002: Remove remaining base dependencies from base/numerics (Closed)
Patch Set: fix gcc compile Created 4 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "crypto/signature_verifier.h" 5 #include "crypto/signature_verifier.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/numerics/safe_conversions.h" 12 #include "base/numerics/safe_conversions.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 14
14 TEST(SignatureVerifierTest, BasicTest) { 15 TEST(SignatureVerifierTest, BasicTest) {
15 // The input data in this test comes from real certificates. 16 // The input data in this test comes from real certificates.
16 // 17 //
17 // tbs_certificate ("to-be-signed certificate", the part of a certificate that 18 // tbs_certificate ("to-be-signed certificate", the part of a certificate that
18 // is signed), signature, and algorithm come from the certificate of 19 // is signed), signature, and algorithm come from the certificate of
19 // bugs.webkit.org. 20 // bugs.webkit.org.
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 &public_key_info[0], 1136 &public_key_info[0],
1136 public_key_info.size()); 1137 public_key_info.size());
1137 signature[0] -= 1; 1138 signature[0] -= 1;
1138 ASSERT_TRUE(ok); 1139 ASSERT_TRUE(ok);
1139 verifier.VerifyUpdate(&message[0], message.size()); 1140 verifier.VerifyUpdate(&message[0], message.size());
1140 ok = verifier.VerifyFinal(); 1141 ok = verifier.VerifyFinal();
1141 EXPECT_FALSE(ok); 1142 EXPECT_FALSE(ok);
1142 } 1143 }
1143 } 1144 }
1144 } 1145 }
OLDNEW
« no previous file with comments | « components/subresource_filter/core/common/unindexed_ruleset.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698