| OLD | NEW |
| 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 DTLS1_2_VERSION : TLS1_2_VERSION); | 987 DTLS1_2_VERSION : TLS1_2_VERSION); |
| 988 break; | 988 break; |
| 989 } | 989 } |
| 990 #endif | 990 #endif |
| 991 | 991 |
| 992 if (identity_ && !identity_->ConfigureIdentity(ctx)) { | 992 if (identity_ && !identity_->ConfigureIdentity(ctx)) { |
| 993 SSL_CTX_free(ctx); | 993 SSL_CTX_free(ctx); |
| 994 return NULL; | 994 return NULL; |
| 995 } | 995 } |
| 996 | 996 |
| 997 #ifdef _DEBUG | 997 #if !defined(NDEBUG) |
| 998 SSL_CTX_set_info_callback(ctx, OpenSSLAdapter::SSLInfoCallback); | 998 SSL_CTX_set_info_callback(ctx, OpenSSLAdapter::SSLInfoCallback); |
| 999 #endif | 999 #endif |
| 1000 | 1000 |
| 1001 int mode = SSL_VERIFY_PEER; | 1001 int mode = SSL_VERIFY_PEER; |
| 1002 if (client_auth_enabled()) { | 1002 if (client_auth_enabled()) { |
| 1003 // Require a certificate from the client. | 1003 // Require a certificate from the client. |
| 1004 // Note: Normally this is always true in production, but it may be disabled | 1004 // Note: Normally this is always true in production, but it may be disabled |
| 1005 // for testing purposes (e.g. SSLAdapter unit tests). | 1005 // for testing purposes (e.g. SSLAdapter unit tests). |
| 1006 mode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT; | 1006 mode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT; |
| 1007 } | 1007 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 } | 1167 } |
| 1168 } else { | 1168 } else { |
| 1169 RTC_NOTREACHED(); | 1169 RTC_NOTREACHED(); |
| 1170 return kDefaultSslEcCipher12; | 1170 return kDefaultSslEcCipher12; |
| 1171 } | 1171 } |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 } // namespace rtc | 1174 } // namespace rtc |
| 1175 | 1175 |
| 1176 #endif // HAVE_OPENSSL_SSL_H | 1176 #endif // HAVE_OPENSSL_SSL_H |
| OLD | NEW |