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

Unified Diff: net/quic/crypto/proof_source_chromium_openssl.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/proof_source_chromium_nss.cc ('k') | net/quic/crypto/proof_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/proof_source_chromium_openssl.cc
diff --git a/net/quic/crypto/proof_source_chromium_openssl.cc b/net/quic/crypto/proof_source_chromium_openssl.cc
index c89f2d9d89bb5eda72a1f4f40a51850aec967ff4..72017d25239ebff2145db460bfdcfa9efbe2840f 100644
--- a/net/quic/crypto/proof_source_chromium_openssl.cc
+++ b/net/quic/crypto/proof_source_chromium_openssl.cc
@@ -24,7 +24,8 @@ ProofSourceChromium::ProofSourceChromium() {}
ProofSourceChromium::~ProofSourceChromium() {}
bool ProofSourceChromium::Initialize(const base::FilePath& cert_path,
- const base::FilePath& key_path) {
+ const base::FilePath& key_path,
+ const base::FilePath& sct_path) {
crypto::EnsureOpenSSLInit();
std::string cert_data;
@@ -64,6 +65,16 @@ bool ProofSourceChromium::Initialize(const base::FilePath& cert_path,
DLOG(FATAL) << "Unable to create private key.";
return false;
}
+
+ // Loading of the signed certificate timestamp is optional.
+ if (sct_path.empty())
+ return true;
+
+ if (!base::ReadFileToString(sct_path, &signed_certificate_timestamp_)) {
+ DLOG(FATAL) << "Unable to read signed certificate timestamp.";
+ return false;
+ }
+
return true;
}
@@ -72,7 +83,8 @@ bool ProofSourceChromium::GetProof(const IPAddressNumber& server_ip,
const string& server_config,
bool ecdsa_ok,
const vector<string>** out_certs,
- string* out_signature) {
+ string* out_signature,
+ string* out_leaf_cert_sct) {
DCHECK(private_key_.get()) << " this: " << this;
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
@@ -108,6 +120,7 @@ bool ProofSourceChromium::GetProof(const IPAddressNumber& server_ip,
*out_certs = &certificates_;
VLOG(1) << "signature: "
<< base::HexEncode(out_signature->data(), out_signature->size());
+ *out_leaf_cert_sct = signed_certificate_timestamp_;
return true;
}
« no previous file with comments | « net/quic/crypto/proof_source_chromium_nss.cc ('k') | net/quic/crypto/proof_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698