| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 requested_str.append(" "); | 347 requested_str.append(" "); |
| 348 } | 348 } |
| 349 LOG(LS_WARNING) << "Ignoring new set of SRTP ciphers, as DTLS " | 349 LOG(LS_WARNING) << "Ignoring new set of SRTP ciphers, as DTLS " |
| 350 << "renegotiation is not supported currently " | 350 << "renegotiation is not supported currently " |
| 351 << "current cipher = " << current_srtp_cipher << " and " | 351 << "current cipher = " << current_srtp_cipher << " and " |
| 352 << "requested = " << "[" << requested_str << "]"; | 352 << "requested = " << "[" << requested_str << "]"; |
| 353 } | 353 } |
| 354 return true; | 354 return true; |
| 355 } | 355 } |
| 356 | 356 |
| 357 if (!VERIFY(dtls_state() == DTLS_TRANSPORT_NEW)) { | 357 if (dtls_state() != DTLS_TRANSPORT_NEW) { |
| 358 LOG(LS_ERROR) << "Can't set SRTP ciphers for a closed session"; |
| 358 return false; | 359 return false; |
| 359 } | 360 } |
| 360 | 361 |
| 361 srtp_ciphers_ = ciphers; | 362 srtp_ciphers_ = ciphers; |
| 362 return true; | 363 return true; |
| 363 } | 364 } |
| 364 | 365 |
| 365 bool DtlsTransport::GetSrtpCryptoSuite(int* cipher) { | 366 bool DtlsTransport::GetSrtpCryptoSuite(int* cipher) { |
| 366 if (dtls_state() != DTLS_TRANSPORT_CONNECTED) { | 367 if (dtls_state() != DTLS_TRANSPORT_CONNECTED) { |
| 367 return false; | 368 return false; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 | 715 |
| 715 dtls_->SetInitialRetransmissionTimeout(initial_timeout); | 716 dtls_->SetInitialRetransmissionTimeout(initial_timeout); |
| 716 } else { | 717 } else { |
| 717 LOG_J(LS_INFO, this) | 718 LOG_J(LS_INFO, this) |
| 718 << "no RTT estimate - using default DTLS handshake timeout"; | 719 << "no RTT estimate - using default DTLS handshake timeout"; |
| 719 } | 720 } |
| 720 } | 721 } |
| 721 | 722 |
| 722 | 723 |
| 723 } // namespace cricket | 724 } // namespace cricket |
| OLD | NEW |