зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1251822 - Disable ChaCha20Poly1305 for unit tests that check cipher suite, r=ekr
MozReview-Commit-ID: H7IW0iOTAzx --HG-- extra : rebase_source : 7d637e24ea89c0d070fbe0511dd445f8d11e51f6
This commit is contained in:
Родитель
b9e0dc0161
Коммит
7d88785757
|
@ -962,8 +962,19 @@ TEST_F(TransportTest, TestNoDtlsVerificationSettings) {
|
|||
ConnectSocketExpectFail();
|
||||
}
|
||||
|
||||
static void DisableChaCha(TransportTestPeer* peer) {
|
||||
// On ARM, ChaCha20Poly1305 might be preferred; disable it for the tests that
|
||||
// want to check the cipher suite. It doesn't matter which peer disables the
|
||||
// suite, disabling on either side has the same effect.
|
||||
std::vector<uint16_t> chachaSuites;
|
||||
chachaSuites.push_back(TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256);
|
||||
chachaSuites.push_back(TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256);
|
||||
peer->SetCipherSuiteChanges(std::vector<uint16_t>(), chachaSuites);
|
||||
}
|
||||
|
||||
TEST_F(TransportTest, TestConnect) {
|
||||
SetDtlsPeer();
|
||||
DisableChaCha(p1_);
|
||||
ConnectSocket();
|
||||
|
||||
// check that we got the right suite
|
||||
|
@ -976,6 +987,7 @@ TEST_F(TransportTest, TestConnect) {
|
|||
TEST_F(TransportTest, TestConnectSrtp) {
|
||||
SetupSrtp();
|
||||
SetDtlsPeer();
|
||||
DisableChaCha(p2_);
|
||||
ConnectSocket();
|
||||
|
||||
ASSERT_EQ(TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, p1_->cipherSuite());
|
||||
|
|
Загрузка…
Ссылка в новой задаче