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

Side by Side Diff: net/quic/crypto/proof_source_chromium_openssl.cc

Issue 1753933002: Add QUIC 31 in which the server's proof covers both the static server config as well as a hash of t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115244730
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/quic/crypto/proof_source_chromium.h" 5 #include "net/quic/crypto/proof_source_chromium.h"
6 6
7 #include <openssl/digest.h> 7 #include <openssl/digest.h>
8 #include <openssl/evp.h> 8 #include <openssl/evp.h>
9 #include <openssl/rsa.h> 9 #include <openssl/rsa.h>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 DLOG(FATAL) << "Unable to read signed certificate timestamp."; 75 DLOG(FATAL) << "Unable to read signed certificate timestamp.";
76 return false; 76 return false;
77 } 77 }
78 78
79 return true; 79 return true;
80 } 80 }
81 81
82 bool ProofSourceChromium::GetProof(const IPAddress& server_ip, 82 bool ProofSourceChromium::GetProof(const IPAddress& server_ip,
83 const string& hostname, 83 const string& hostname,
84 const string& server_config, 84 const string& server_config,
85 QuicVersion quic_version,
86 base::StringPiece chlo_hash,
85 bool ecdsa_ok, 87 bool ecdsa_ok,
86 scoped_refptr<ProofSource::Chain>* out_chain, 88 scoped_refptr<ProofSource::Chain>* out_chain,
87 string* out_signature, 89 string* out_signature,
88 string* out_leaf_cert_sct) { 90 string* out_leaf_cert_sct) {
89 DCHECK(private_key_.get()) << " this: " << this; 91 DCHECK(private_key_.get()) << " this: " << this;
90 92
91 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); 93 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
92 crypto::ScopedEVP_MD_CTX sign_context(EVP_MD_CTX_create()); 94 crypto::ScopedEVP_MD_CTX sign_context(EVP_MD_CTX_create());
93 EVP_PKEY_CTX* pkey_ctx; 95 EVP_PKEY_CTX* pkey_ctx;
94 if (!EVP_DigestSignInit(sign_context.get(), &pkey_ctx, EVP_sha256(), nullptr, 96 if (!EVP_DigestSignInit(sign_context.get(), &pkey_ctx, EVP_sha256(), nullptr,
(...skipping 25 matching lines...) Expand all
120 out_signature->assign(reinterpret_cast<const char*>(signature.data()), 122 out_signature->assign(reinterpret_cast<const char*>(signature.data()),
121 signature.size()); 123 signature.size());
122 *out_chain = chain_; 124 *out_chain = chain_;
123 VLOG(1) << "signature: " 125 VLOG(1) << "signature: "
124 << base::HexEncode(out_signature->data(), out_signature->size()); 126 << base::HexEncode(out_signature->data(), out_signature->size());
125 *out_leaf_cert_sct = signed_certificate_timestamp_; 127 *out_leaf_cert_sct = signed_certificate_timestamp_;
126 return true; 128 return true;
127 } 129 }
128 130
129 } // namespace net 131 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698