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

Unified Diff: net/quic/chromium/crypto/proof_source_chromium.cc

Issue 2401363004: relnote: Deprecate flag quic_disable_pre_32 (Closed)
Patch Set: remove unused LoadTestCert method Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/chromium/crypto/proof_source_chromium.cc
diff --git a/net/quic/chromium/crypto/proof_source_chromium.cc b/net/quic/chromium/crypto/proof_source_chromium.cc
index 44b5e825213d06514a59aecdfc9bd1d5aeca1433..5e7906546d3b18296c0998009f2cbd1ec8717380 100644
--- a/net/quic/chromium/crypto/proof_source_chromium.cc
+++ b/net/quic/chromium/crypto/proof_source_chromium.cc
@@ -93,43 +93,27 @@ bool ProofSourceChromium::GetProof(const IPAddress& server_ip,
crypto::ScopedEVP_MD_CTX sign_context(EVP_MD_CTX_create());
EVP_PKEY_CTX* pkey_ctx;
- if (quic_version > QUIC_VERSION_30) {
- uint32_t len = chlo_hash.length();
- if (!EVP_DigestSignInit(sign_context.get(), &pkey_ctx, EVP_sha256(),
- nullptr, private_key_->key()) ||
- !EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING) ||
- !EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, -1) ||
- !EVP_DigestSignUpdate(
- sign_context.get(),
- reinterpret_cast<const uint8_t*>(kProofSignatureLabel),
- sizeof(kProofSignatureLabel)) ||
- !EVP_DigestSignUpdate(sign_context.get(),
- reinterpret_cast<const uint8_t*>(&len),
- sizeof(len)) ||
- !EVP_DigestSignUpdate(
- sign_context.get(),
- reinterpret_cast<const uint8_t*>(chlo_hash.data()), len) ||
- !EVP_DigestSignUpdate(
- sign_context.get(),
- reinterpret_cast<const uint8_t*>(server_config.data()),
- server_config.size())) {
- return false;
- }
- } else if (!EVP_DigestSignInit(sign_context.get(), &pkey_ctx, EVP_sha256(),
- nullptr, private_key_->key()) ||
- !EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING) ||
- !EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, -1) ||
- !EVP_DigestSignUpdate(
- sign_context.get(),
- reinterpret_cast<const uint8_t*>(kProofSignatureLabelOld),
- sizeof(kProofSignatureLabelOld)) ||
- !EVP_DigestSignUpdate(
- sign_context.get(),
- reinterpret_cast<const uint8_t*>(server_config.data()),
- server_config.size())) {
+ uint32_t len_tmp = chlo_hash.length();
+ if (!EVP_DigestSignInit(sign_context.get(), &pkey_ctx, EVP_sha256(),
+ nullptr, private_key_->key()) ||
+ !EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING) ||
+ !EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, -1) ||
+ !EVP_DigestSignUpdate(
+ sign_context.get(),
+ reinterpret_cast<const uint8_t*>(kProofSignatureLabel),
+ sizeof(kProofSignatureLabel)) ||
+ !EVP_DigestSignUpdate(sign_context.get(),
+ reinterpret_cast<const uint8_t*>(&len_tmp),
+ sizeof(len_tmp)) ||
+ !EVP_DigestSignUpdate(
+ sign_context.get(),
+ reinterpret_cast<const uint8_t*>(chlo_hash.data()), len_tmp) ||
+ !EVP_DigestSignUpdate(
+ sign_context.get(),
+ reinterpret_cast<const uint8_t*>(server_config.data()),
+ server_config.size())) {
return false;
}
-
// Determine the maximum length of the signature.
size_t len = 0;
if (!EVP_DigestSignFinal(sign_context.get(), nullptr, &len)) {
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | net/quic/chromium/crypto/proof_test_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698