Roll src/third_party/libsrtp 6446144:9c53f85 (svn 292694:295151)

This updates libsrtp to 1.5.2 and uses the OpenSSL/BoringSSL crypto code.
See https://codereview.chromium.org/889083003/ and https://codereview.chromium.org/1098043003/

Summary of changes available at:
6446144..9c53f85

BUG=328475

Review URL: https://codereview.chromium.org/981593002

Cr-Original-Commit-Position: refs/heads/master@{#328972}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 94c5e80d3a385e223279b8ddb3ed8aa19d69a0e9
This commit is contained in:
mail 2015-05-08 10:25:54 -07:00 коммит произвёл Commit bot
Родитель 2c7160733a
Коммит b110830498
1 изменённых файлов: 93 добавлений и 2 удалений

95
secondary/third_party/libsrtp/BUILD.gn поставляемый
Просмотреть файл

@ -4,12 +4,15 @@
declare_args() {
use_system_libsrtp = false
use_srtp_boringssl = true
}
config("libsrtp_config") {
defines = [
"HAVE_CONFIG_H",
"HAVE_STDLIB_H",
"HAVE_STRING_H",
"TESTAPP_SOURCE",
]
include_dirs = [
@ -18,6 +21,10 @@ config("libsrtp_config") {
"srtp/crypto/include",
]
if (use_srtp_boringssl) {
defines += [ "OPENSSL" ]
}
if (is_posix) {
defines += [
"HAVE_INT16_T",
@ -30,13 +37,14 @@ config("libsrtp_config") {
"HAVE_STDINT_H",
"HAVE_INTTYPES_H",
"HAVE_NETINET_IN_H",
"INLINE=inline",
"HAVE_ARPA_INET_H",
"HAVE_UNISTD_H",
]
cflags = [ "-Wno-unused-variable" ]
}
if (is_win) {
defines += [
"INLINE=__inline",
"HAVE_BYTESWAP_METHODS_H",
# All Windows architectures are this way.
@ -149,6 +157,27 @@ if (use_system_libsrtp) {
if (is_clang) {
cflags = [ "-Wno-implicit-function-declaration" ]
}
if (use_srtp_boringssl) {
deps = [
"//third_party/boringssl:boringssl",
]
sources -= [
"srtp/crypto/cipher/aes_cbc.c",
"srtp/crypto/cipher/aes_icm.c",
"srtp/crypto/hash/hmac.c",
"srtp/crypto/hash/sha1.c",
"srtp/crypto/rng/ctr_prng.c",
"srtp/crypto/rng/prng.c",
]
sources += [
"srtp/crypto/cipher/aes_gcm_ossl.c",
"srtp/crypto/cipher/aes_icm_ossl.c",
"srtp/crypto/hash/hmac_ossl.c",
"srtp/crypto/include/aes_gcm_ossl.h",
"srtp/crypto/include/aes_icm_ossl.h",
]
}
}
# TODO(GYP): A bunch of these tests don't compile (in gyp either). They're
@ -160,6 +189,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/include/getopt_s.h",
"srtp/test/getopt_s.c",
@ -173,6 +205,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/include/getopt_s.h",
"srtp/include/srtp_priv.h",
@ -187,6 +222,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/include/rdbx.h",
"srtp/include/ut_sim.h",
@ -200,6 +238,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/include/rdbx.h",
"srtp/include/ut_sim.h",
@ -213,6 +254,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/include/datatypes.h",
"srtp/include/getopt_s.h",
@ -236,8 +280,13 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/cipher_driver.c",
"srtp/include/getopt_s.h",
"srtp/test/getopt_s.c",
]
}
@ -247,6 +296,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/datatypes_driver.c",
]
@ -258,6 +310,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/stat_driver.c",
]
@ -269,6 +324,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/sha1_driver.c",
]
@ -280,8 +338,13 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/kernel_driver.c",
"srtp/include/getopt_s.h",
"srtp/test/getopt_s.c",
]
}
@ -291,6 +354,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/aes_calc.c",
]
@ -302,8 +368,29 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/rand_gen.c",
"srtp/include/getopt_s.h",
"srtp/test/getopt_s.c",
]
}
executable("srtp_test_rand_gen_soak") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/rand_gen_soak.c",
"srtp/include/getopt_s.h",
"srtp/test/getopt_s.c",
]
}
@ -313,6 +400,9 @@ if (use_system_libsrtp) {
deps = [
":libsrtp",
]
if (use_srtp_boringssl) {
deps += [ "//third_party/boringssl:boringssl" ]
}
sources = [
"srtp/crypto/test/env.c",
]
@ -332,6 +422,7 @@ if (use_system_libsrtp) {
":srtp_test_kernel_driver",
":srtp_test_aes_calc",
":srtp_test_rand_gen",
":srtp_test_rand_gen_soak",
":srtp_test_env",
]
}