| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
| 6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
| 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
| 8 | 8 |
| 9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
| 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 const char* buf2; | 1404 const char* buf2; |
| 1405 unsigned int len1, len2; | 1405 unsigned int len1, len2; |
| 1406 memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2); | 1406 memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2); |
| 1407 const unsigned int len = len1 + len2; | 1407 const unsigned int len = len1 + len2; |
| 1408 | 1408 |
| 1409 if (corked_ && len < kRecvBufferSize / 2) | 1409 if (corked_ && len < kRecvBufferSize / 2) |
| 1410 return 0; | 1410 return 0; |
| 1411 | 1411 |
| 1412 int rv = 0; | 1412 int rv = 0; |
| 1413 if (len) { | 1413 if (len) { |
| 1414 scoped_refptr<IOBuffer> send_buffer = new IOBuffer(len); | 1414 scoped_refptr<IOBuffer> send_buffer(new IOBuffer(len)); |
| 1415 memcpy(send_buffer->data(), buf1, len1); | 1415 memcpy(send_buffer->data(), buf1, len1); |
| 1416 memcpy(send_buffer->data() + len1, buf2, len2); | 1416 memcpy(send_buffer->data() + len1, buf2, len2); |
| 1417 rv = transport_->socket()->Write(send_buffer, len, | 1417 rv = transport_->socket()->Write(send_buffer, len, |
| 1418 &buffer_send_callback_); | 1418 &buffer_send_callback_); |
| 1419 if (rv == ERR_IO_PENDING) { | 1419 if (rv == ERR_IO_PENDING) { |
| 1420 transport_send_busy_ = true; | 1420 transport_send_busy_ = true; |
| 1421 } else { | 1421 } else { |
| 1422 memio_PutWriteResult(nss_bufs_, MapErrorToNSS(rv)); | 1422 memio_PutWriteResult(nss_bufs_, MapErrorToNSS(rv)); |
| 1423 } | 1423 } |
| 1424 } | 1424 } |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2353 case SSL_CONNECTION_VERSION_TLS1_1: | 2353 case SSL_CONNECTION_VERSION_TLS1_1: |
| 2354 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_1); | 2354 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_1); |
| 2355 break; | 2355 break; |
| 2356 case SSL_CONNECTION_VERSION_TLS1_2: | 2356 case SSL_CONNECTION_VERSION_TLS1_2: |
| 2357 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_2); | 2357 UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_2); |
| 2358 break; | 2358 break; |
| 2359 }; | 2359 }; |
| 2360 } | 2360 } |
| 2361 | 2361 |
| 2362 } // namespace net | 2362 } // namespace net |
| OLD | NEW |