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

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

Issue 9663043: Add a boolean |had_context| argument to the TLS ExportKeyingMaterial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Make suggested changes, add patch file Created 8 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 | Annotate | Revision Log
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 "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 633
634 int SpdySession::WriteCredentialFrame(const std::string& origin, 634 int SpdySession::WriteCredentialFrame(const std::string& origin,
635 SSLClientCertType type, 635 SSLClientCertType type,
636 const std::string& key, 636 const std::string& key,
637 const std::string& cert, 637 const std::string& cert,
638 RequestPriority priority) { 638 RequestPriority priority) {
639 DCHECK(is_secure_); 639 DCHECK(is_secure_);
640 unsigned char secret[32]; // 32 bytes from the spec 640 unsigned char secret[32]; // 32 bytes from the spec
641 GetSSLClientSocket()->ExportKeyingMaterial("SPDY certificate proof", 641 GetSSLClientSocket()->ExportKeyingMaterial("SPDY certificate proof",
642 origin, 642 true, origin,
643 secret, arraysize(secret)); 643 secret, arraysize(secret));
644 644
645 // Convert the key string into a vector<unit8> 645 // Convert the key string into a vector<unit8>
646 std::vector<uint8> key_data; 646 std::vector<uint8> key_data;
647 for (size_t i = 0; i < key.length(); i++) { 647 for (size_t i = 0; i < key.length(); i++) {
648 key_data.push_back(key[i]); 648 key_data.push_back(key[i]);
649 } 649 }
650 650
651 std::vector<uint8> proof; 651 std::vector<uint8> proof;
652 switch (type) { 652 switch (type) {
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 SSLClientSocket* SpdySession::GetSSLClientSocket() const { 1921 SSLClientSocket* SpdySession::GetSSLClientSocket() const {
1922 if (!is_secure_) 1922 if (!is_secure_)
1923 return NULL; 1923 return NULL;
1924 SSLClientSocket* ssl_socket = 1924 SSLClientSocket* ssl_socket =
1925 reinterpret_cast<SSLClientSocket*>(connection_->socket()); 1925 reinterpret_cast<SSLClientSocket*>(connection_->socket());
1926 DCHECK(ssl_socket); 1926 DCHECK(ssl_socket);
1927 return ssl_socket; 1927 return ssl_socket;
1928 } 1928 }
1929 1929
1930 } // namespace net 1930 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698