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

Side by Side Diff: crypto/signature_creator_unittest.cc

Issue 2677583002: Fix non-noise cpplint errors in //crypto. (Closed)
Patch Set: fix p224_unittest.cc Created 3 years, 10 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 | « crypto/scoped_test_system_nss_key_slot.h ('k') | crypto/wincrypt_shim.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_creator.h" 5 #include "crypto/signature_creator.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/sha1.h" 13 #include "base/sha1.h"
13 #include "crypto/rsa_private_key.h" 14 #include "crypto/rsa_private_key.h"
14 #include "crypto/sha2.h" 15 #include "crypto/sha2.h"
15 #include "crypto/signature_verifier.h" 16 #include "crypto/signature_verifier.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 TEST(SignatureCreatorTest, BasicTest) { 19 TEST(SignatureCreatorTest, BasicTest) {
19 // Do a verify round trip. 20 // Do a verify round trip.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Verify the input data. 114 // Verify the input data.
114 crypto::SignatureVerifier verifier; 115 crypto::SignatureVerifier verifier;
115 ASSERT_TRUE(verifier.VerifyInit( 116 ASSERT_TRUE(verifier.VerifyInit(
116 crypto::SignatureVerifier::RSA_PKCS1_SHA256, &signature.front(), 117 crypto::SignatureVerifier::RSA_PKCS1_SHA256, &signature.front(),
117 signature.size(), &public_key_info.front(), public_key_info.size())); 118 signature.size(), &public_key_info.front(), public_key_info.size()));
118 119
119 verifier.VerifyUpdate(reinterpret_cast<const uint8_t*>(data.c_str()), 120 verifier.VerifyUpdate(reinterpret_cast<const uint8_t*>(data.c_str()),
120 data.size()); 121 data.size());
121 ASSERT_TRUE(verifier.VerifyFinal()); 122 ASSERT_TRUE(verifier.VerifyFinal());
122 } 123 }
OLDNEW
« no previous file with comments | « crypto/scoped_test_system_nss_key_slot.h ('k') | crypto/wincrypt_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698