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 #include "net/socket/ssl_client_socket_mac.h" | 5 #include "net/socket/ssl_client_socket_mac.h" |
6 | 6 |
7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
8 #include <netdb.h> | 8 #include <netdb.h> |
9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 int SSLClientSocketMac::InitializeSSLContext() { | 762 int SSLClientSocketMac::InitializeSSLContext() { |
763 VLOG(1) << "----- InitializeSSLContext"; | 763 VLOG(1) << "----- InitializeSSLContext"; |
764 OSStatus status = noErr; | 764 OSStatus status = noErr; |
765 | 765 |
766 status = SSLNewContext(false, &ssl_context_); | 766 status = SSLNewContext(false, &ssl_context_); |
767 if (status) | 767 if (status) |
768 return NetErrorFromOSStatus(status); | 768 return NetErrorFromOSStatus(status); |
769 | 769 |
770 status = SSLSetProtocolVersionEnabled(ssl_context_, | 770 status = SSLSetProtocolVersionEnabled(ssl_context_, |
771 kSSLProtocol2, | 771 kSSLProtocol2, |
772 ssl_config_.ssl2_enabled); | 772 false); |
773 if (status) | 773 if (status) |
774 return NetErrorFromOSStatus(status); | 774 return NetErrorFromOSStatus(status); |
775 | 775 |
776 status = SSLSetProtocolVersionEnabled(ssl_context_, | 776 status = SSLSetProtocolVersionEnabled(ssl_context_, |
777 kSSLProtocol3, | 777 kSSLProtocol3, |
778 ssl_config_.ssl3_enabled); | 778 ssl_config_.ssl3_enabled); |
779 if (status) | 779 if (status) |
780 return NetErrorFromOSStatus(status); | 780 return NetErrorFromOSStatus(status); |
781 | 781 |
782 status = SSLSetProtocolVersionEnabled(ssl_context_, | 782 status = SSLSetProtocolVersionEnabled(ssl_context_, |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 if (rv < 0 && rv != ERR_IO_PENDING) { | 1319 if (rv < 0 && rv != ERR_IO_PENDING) { |
1320 us->write_io_buf_ = NULL; | 1320 us->write_io_buf_ = NULL; |
1321 return OSStatusFromNetError(rv); | 1321 return OSStatusFromNetError(rv); |
1322 } | 1322 } |
1323 | 1323 |
1324 // always lie to our caller | 1324 // always lie to our caller |
1325 return noErr; | 1325 return noErr; |
1326 } | 1326 } |
1327 | 1327 |
1328 } // namespace net | 1328 } // namespace net |
OLD | NEW |