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

Side by Side Diff: net/spdy/spdy_test_util_common.cc

Issue 1739403002: Cut down on usage of deprecated APIs in //crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grumble grumble string vector char uint8_t grumble Created 4 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
« no previous file with comments | « net/socket/ssl_client_socket_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/spdy/spdy_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <cstddef> 8 #include <cstddef>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 MockECSignatureCreator::MockECSignatureCreator(crypto::ECPrivateKey* key) 287 MockECSignatureCreator::MockECSignatureCreator(crypto::ECPrivateKey* key)
288 : key_(key) { 288 : key_(key) {
289 } 289 }
290 290
291 bool MockECSignatureCreator::Sign(const uint8_t* data, 291 bool MockECSignatureCreator::Sign(const uint8_t* data,
292 int data_len, 292 int data_len,
293 std::vector<uint8_t>* signature) { 293 std::vector<uint8_t>* signature) {
294 std::vector<uint8_t> private_key_value; 294 std::vector<uint8_t> private_key_value;
295 key_->ExportValue(&private_key_value); 295 if (!key_->ExportValueForTesting(&private_key_value))
296 return false;
296 std::string head = "fakesignature"; 297 std::string head = "fakesignature";
297 std::string tail = "/fakesignature"; 298 std::string tail = "/fakesignature";
298 299
299 signature->clear(); 300 signature->clear();
300 signature->insert(signature->end(), head.begin(), head.end()); 301 signature->insert(signature->end(), head.begin(), head.end());
301 signature->insert(signature->end(), private_key_value.begin(), 302 signature->insert(signature->end(), private_key_value.begin(),
302 private_key_value.end()); 303 private_key_value.end());
303 signature->insert(signature->end(), '-'); 304 signature->insert(signature->end(), '-');
304 signature->insert(signature->end(), data, data + data_len); 305 signature->insert(signature->end(), data, data + data_len);
305 signature->insert(signature->end(), tail.begin(), tail.end()); 306 signature->insert(signature->end(), tail.begin(), tail.end());
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 } 1269 }
1269 } 1270 }
1270 1271
1271 void SpdyTestUtil::SetPriority(RequestPriority priority, 1272 void SpdyTestUtil::SetPriority(RequestPriority priority,
1272 SpdySynStreamIR* ir) const { 1273 SpdySynStreamIR* ir) const {
1273 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1274 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1274 priority, spdy_version())); 1275 priority, spdy_version()));
1275 } 1276 }
1276 1277
1277 } // namespace net 1278 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698