OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2014 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 |
11 #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) | 11 #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) |
12 | 12 |
13 #include "webrtc/pc/externalhmac.h" | 13 #include "webrtc/pc/externalhmac.h" |
14 | 14 |
15 #include <stdlib.h> // For malloc/free. | 15 #include <stdlib.h> // For malloc/free. |
16 | 16 |
17 extern "C" { | 17 extern "C" { |
18 #ifdef SRTP_RELATIVE_PATH | |
19 #include "crypto_kernel.h" // NOLINT | |
20 #include "srtp.h" // NOLINT | |
21 #else | |
22 #include "third_party/libsrtp/srtp/crypto/include/crypto_kernel.h" | 18 #include "third_party/libsrtp/srtp/crypto/include/crypto_kernel.h" |
23 #include "third_party/libsrtp/srtp/include/srtp.h" | 19 #include "third_party/libsrtp/srtp/include/srtp.h" |
24 #endif // SRTP_RELATIVE_PATH | |
25 } | 20 } |
26 | 21 |
27 #include "webrtc/base/logging.h" | 22 #include "webrtc/base/logging.h" |
28 | 23 |
29 // Begin test case 0 */ | 24 // Begin test case 0 */ |
30 static const uint8_t kExternalHmacTestCase0Key[20] = { | 25 static const uint8_t kExternalHmacTestCase0Key[20] = { |
31 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, | 26 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
32 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, | 27 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, |
33 0x0b, 0x0b, 0x0b, 0x0b | 28 0x0b, 0x0b, 0x0b, 0x0b |
34 }; | 29 }; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 const_cast<auth_type_t*>(&external_hmac), EXTERNAL_HMAC_SHA1); | 146 const_cast<auth_type_t*>(&external_hmac), EXTERNAL_HMAC_SHA1); |
152 if (status) { | 147 if (status) { |
153 LOG(LS_ERROR) << "Error in replacing default auth module, error: " | 148 LOG(LS_ERROR) << "Error in replacing default auth module, error: " |
154 << status; | 149 << status; |
155 return err_status_fail; | 150 return err_status_fail; |
156 } | 151 } |
157 return err_status_ok; | 152 return err_status_ok; |
158 } | 153 } |
159 | 154 |
160 #endif // defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) | 155 #endif // defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) |
OLD | NEW |