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

Side by Side Diff: webrtc/base/opensslstreamadapter.cc

Issue 1566023002: Fix bug 574524: DtlsTransportChannel crashes after SSL closes remotely (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: improve comments. Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/bufferqueue.cc ('k') | webrtc/p2p/base/dtlstransportchannel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 return SR_SUCCESS; 611 return SR_SUCCESS;
612 case SSL_ERROR_WANT_READ: 612 case SSL_ERROR_WANT_READ:
613 LOG(LS_VERBOSE) << " -- error want read"; 613 LOG(LS_VERBOSE) << " -- error want read";
614 return SR_BLOCK; 614 return SR_BLOCK;
615 case SSL_ERROR_WANT_WRITE: 615 case SSL_ERROR_WANT_WRITE:
616 LOG(LS_VERBOSE) << " -- error want write"; 616 LOG(LS_VERBOSE) << " -- error want write";
617 ssl_read_needs_write_ = true; 617 ssl_read_needs_write_ = true;
618 return SR_BLOCK; 618 return SR_BLOCK;
619 case SSL_ERROR_ZERO_RETURN: 619 case SSL_ERROR_ZERO_RETURN:
620 LOG(LS_VERBOSE) << " -- remote side closed"; 620 LOG(LS_VERBOSE) << " -- remote side closed";
621 // When we're closed at SSL layer, also close the stream level which
622 // performs necessary clean up. Otherwise, a new incoming packet after
623 // this could overflow the stream buffer.
624 this->stream()->Close();
621 return SR_EOS; 625 return SR_EOS;
622 break; 626 break;
623 default: 627 default:
624 LOG(LS_VERBOSE) << " -- error " << code; 628 LOG(LS_VERBOSE) << " -- error " << code;
625 Error("SSL_read", (ssl_error ? ssl_error : -1), false); 629 Error("SSL_read", (ssl_error ? ssl_error : -1), false);
626 if (error) 630 if (error)
627 *error = ssl_error_code_; 631 *error = ssl_error_code_;
628 return SR_ERROR; 632 return SR_ERROR;
629 } 633 }
630 // not reached 634 // not reached
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 } 1167 }
1164 } else { 1168 } else {
1165 RTC_NOTREACHED(); 1169 RTC_NOTREACHED();
1166 return kDefaultSslEcCipher12; 1170 return kDefaultSslEcCipher12;
1167 } 1171 }
1168 } 1172 }
1169 1173
1170 } // namespace rtc 1174 } // namespace rtc
1171 1175
1172 #endif // HAVE_OPENSSL_SSL_H 1176 #endif // HAVE_OPENSSL_SSL_H
OLDNEW
« no previous file with comments | « webrtc/base/bufferqueue.cc ('k') | webrtc/p2p/base/dtlstransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698