Commit 576e6d26 authored by Fan Yang's avatar Fan Yang Committed by Commit Bot

Call OnNewEncryptionKey available with TLS versions in mock_crypto_client_stream.

R=dschinazi@chromium.org

Bug: 1116812
Change-Id: Ib1b9f7f1c6c03fa790a1bd3f9b01f0261586f2b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359551Reviewed-by: default avatarDavid Schinazi <dschinazi@chromium.org>
Commit-Queue: Fan Yang <fayang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798798}
parent d4bbe5c9
...@@ -187,17 +187,17 @@ bool MockCryptoClientStream::CryptoConnect() { ...@@ -187,17 +187,17 @@ bool MockCryptoClientStream::CryptoConnect() {
std::make_unique<NullDecrypter>(Perspective::IS_CLIENT)); std::make_unique<NullDecrypter>(Perspective::IS_CLIENT));
} }
session()->connection()->SetEncrypter(ENCRYPTION_INITIAL, nullptr); session()->connection()->SetEncrypter(ENCRYPTION_INITIAL, nullptr);
session()->OnNewEncryptionKeyAvailable(
ENCRYPTION_FORWARD_SECURE,
std::make_unique<NullEncrypter>(Perspective::IS_CLIENT));
} }
session()->OnNewEncryptionKeyAvailable(
ENCRYPTION_FORWARD_SECURE,
std::make_unique<NullEncrypter>(Perspective::IS_CLIENT));
if (session()->version().UsesTls()) { if (session()->version().UsesTls()) {
session()->OnOneRttKeysAvailable(); session()->OnOneRttKeysAvailable();
} else { } else {
session()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE); session()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
} }
session()->DiscardOldEncryptionKey(ENCRYPTION_INITIAL); session()->DiscardOldEncryptionKey(ENCRYPTION_INITIAL);
session()->NeuterHandshakeData(); session()->NeuterHandshakeData();
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment