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

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: 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 624 }
625 625
626 int SpdySession::WriteCredentialFrame(const std::string& origin, 626 int SpdySession::WriteCredentialFrame(const std::string& origin,
627 SSLClientCertType type, 627 SSLClientCertType type,
628 const std::string& key, 628 const std::string& key,
629 const std::string& cert, 629 const std::string& cert,
630 RequestPriority priority) { 630 RequestPriority priority) {
631 DCHECK(is_secure_); 631 DCHECK(is_secure_);
632 unsigned char secret[32]; // 32 bytes from the spec 632 unsigned char secret[32]; // 32 bytes from the spec
633 GetSSLClientSocket()->ExportKeyingMaterial("SPDY certificate proof", 633 GetSSLClientSocket()->ExportKeyingMaterial("SPDY certificate proof",
634 origin, 634 true, origin,
635 secret, arraysize(secret)); 635 secret, arraysize(secret));
636 636
637 // Convert the key string into a vector<unit8> 637 // Convert the key string into a vector<unit8>
638 std::vector<uint8> key_data; 638 std::vector<uint8> key_data;
639 for (size_t i = 0; i < key.length(); i++) { 639 for (size_t i = 0; i < key.length(); i++) {
640 key_data.push_back(key[i]); 640 key_data.push_back(key[i]);
641 } 641 }
642 642
643 std::vector<uint8> proof; 643 std::vector<uint8> proof;
644 switch (type) { 644 switch (type) {
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 SSLClientSocket* SpdySession::GetSSLClientSocket() const { 1891 SSLClientSocket* SpdySession::GetSSLClientSocket() const {
1892 if (!is_secure_) 1892 if (!is_secure_)
1893 return NULL; 1893 return NULL;
1894 SSLClientSocket* ssl_socket = 1894 SSLClientSocket* ssl_socket =
1895 reinterpret_cast<SSLClientSocket*>(connection_->socket()); 1895 reinterpret_cast<SSLClientSocket*>(connection_->socket());
1896 DCHECK(ssl_socket); 1896 DCHECK(ssl_socket);
1897 return ssl_socket; 1897 return ssl_socket;
1898 } 1898 }
1899 1899
1900 } // namespace net 1900 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698