diff --git a/contrib/src/pjproject/SHA512SUMS b/contrib/src/pjproject/SHA512SUMS index 2454c27e9b7b24300fc2fdffcfd6ac1e91b7d4b4..bf463cbedcd304f73587a4c098dba32660f9b201 100644 --- a/contrib/src/pjproject/SHA512SUMS +++ b/contrib/src/pjproject/SHA512SUMS @@ -1 +1 @@ -7204326ed7d06241f7de02111641de792274fb126bb5c06ba6d7e2fbb6c6475b84fd4e1e63d44863207cbd79e75b654588567125476ce9d66bd1397708827a09 pjproject-2.5.5.tar.bz2 +48be9a80f90b1cb292c6eb0d071d889f6027f56bdd75095c510d9be2d6b5f1df5a6371617009371525ac5797dc61f5814dcc1cc11d14105e5a2576539f89293f pjproject-2.6.tar.bz2 \ No newline at end of file diff --git a/contrib/src/pjproject/android.patch b/contrib/src/pjproject/android.patch index c4974e4aefeb6207d0c2b229f2b0f99ee0ff9aeb..01621b9886f7fb052ab32b806b7eb7f21adea4d1 100644 --- a/contrib/src/pjproject/android.patch +++ b/contrib/src/pjproject/android.patch @@ -1,9 +1,10 @@ --- a/pjlib/include/pj/config.h +++ b/pjlib/include/pj/config.h -@@ -293,6 +293,20 @@ +@@ -293,6 +293,21 @@ */ #include <pj/config_site.h> ++#undef PJ_ANDROID +#define PJ_ANDROID 0 +#define PJ_JNI_HAS_JNI_ONLOAD 0 +#undef PJ_HAS_FLOATING_POINT @@ -39,3 +40,10 @@ - ;; *) if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then +--- a/pjlib/src/pj/os_timestamp_posix.c ++++ b/pjlib/src/pj/os_timestamp_posix.c +@@ -163,3 +163,3 @@ + +-#elif defined(__ANDROID__) ++#elif defined(PJ_ANDROID) && PJ_ANDROID + \ No newline at end of file diff --git a/contrib/src/pjproject/fetch_and_patch.bat b/contrib/src/pjproject/fetch_and_patch.bat index a4ebf1dde2ef3a7cac4038ae14a5b37a55270edf..9bfe3a86d083201f744907cb2769447efab4c7a8 100644 --- a/contrib/src/pjproject/fetch_and_patch.bat +++ b/contrib/src/pjproject/fetch_and_patch.bat @@ -1,20 +1,22 @@ set BUILD=%SRC%..\build +set PJPROJECT_VERSION=2.6 +set PJPROJECT_URL=http://www.pjsip.org/release/%PJPROJECT_VERSION%/pjproject-%PJPROJECT_VERSION%.zip + mkdir %BUILD% if %USE_CACHE%==1 ( - copy %CACHE_DIR%\pjproject-2.5.5.zip %cd% + copy %CACHE_DIR%\pjproject-%PJPROJECT_VERSION%.zip %cd% ) else ( - wget http://www.pjsip.org/release/2.5.5/pjproject-2.5.5.zip + wget %PJPROJECT_URL% ) -unzip -q pjproject-2.5.5.zip -d %BUILD% -del pjproject-2.5.5.zip -rename %BUILD%\pjproject-2.5.5 pjproject +unzip -q pjproject-%PJPROJECT_VERSION%.zip -d %BUILD% +del pjproject-%PJPROJECT_VERSION%.zip +rename %BUILD%\pjproject-%PJPROJECT_VERSION% pjproject cd %BUILD%\pjproject -git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_endianness.patch git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_gnutls.patch git apply --reject --whitespace=fix %SRC%\pjproject\ipv6.patch git apply --reject --whitespace=fix %SRC%\pjproject\ice_config.patch @@ -24,6 +26,5 @@ git apply --reject --whitespace=fix %SRC%\pjproject\add_dtls_transport.patch git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_ice_sess.patch git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_fix_turn_fallback.patch git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp.patch -git apply --reject --whitespace=fix %SRC%\pjproject\pj_uwp_xbox_one.patch cd %SRC% \ No newline at end of file diff --git a/contrib/src/pjproject/gnutls.patch b/contrib/src/pjproject/gnutls.patch index 86ecc0c97f2c72a382a7abb4c7387c78ab203f14..e8b26657ea8a87fc41f6280bec29796a3d0a0b63 100644 --- a/contrib/src/pjproject/gnutls.patch +++ b/contrib/src/pjproject/gnutls.patch @@ -16,32 +16,20 @@ Philippe Proulx <philippe.proulx@savoirfairelinux.com> and Adrien Béraud <adrien.beraud@savoirfairelinux.com> on behalf of Savoir-faire Linux. - .../aconfigure | 184 +- - .../aconfigure.ac | 101 +- - .../pjlib/build/Makefile | 3 +- - .../pjlib/include/pj/compat/os_auto.h.in | 3 + - .../pjlib/include/pj/config.h | 14 +- - .../pjlib/include/pj/ssl_sock.h | 5 + - .../pjlib/src/pj/ssl_sock_common.c | 5 + - .../pjlib/src/pj/ssl_sock_gtls.c | 2887 ++++++++++++++++++++ - .../pjlib/src/pj/ssl_sock_ossl.c | 6 +- - .../pjmedia/src/pjmedia/transport_srtp.c | 6 +- - 10 files changed, 3147 insertions(+), 67 deletions(-) --- -diff --git a/aconfigure b/aconfigure -index 78601ca..3589f5a 100755 ---- a/aconfigure -+++ b/aconfigure -@@ -640,6 +640,8 @@ ac_no_opencore_amrnb +diff -ru a/aconfigure b/aconfigure +--- a/aconfigure 2017-01-25 06:23:08.000000000 -0500 ++++ b/aconfigure 2017-06-08 13:51:11.146810527 -0400 +@@ -644,6 +644,8 @@ libcrypto_present libssl_present openssl_h_present +libgnutls_present +gnutls_h_present + ac_ssl_has_aes_gcm ac_no_ssl - ac_webrtc_ldflags - ac_webrtc_cflags -@@ -1491,8 +1493,8 @@ Optional Features: + ac_openh264_ldflags +@@ -1482,8 +1484,8 @@ package and samples location using IPPROOT and IPPSAMPLES env var or with --with-ipp and --with-ipp-samples options @@ -52,7 +40,7 @@ index 78601ca..3589f5a 100755 --disable-opencore-amr Exclude OpenCORE AMR support from the build (default: autodetect) -@@ -7826,33 +7828,160 @@ fi +@@ -7787,17 +7789,149 @@ # Check whether --enable-ssl was given. if test "${enable_ssl+set}" = set; then : @@ -61,29 +49,27 @@ index 78601ca..3589f5a 100755 - ac_no_ssl=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 + enableval=$enable_ssl; if test "x$enableval" = "xgnutls"; then -+ ssl_backend="gnutls" -+ else -+ ssl_backend="openssl" -+ -+ fi -+ ++ ssl_backend="gnutls" ++ else ++ ssl_backend="openssl" ++ fi +fi + + +if test "x$enable_ssl" = "xno"; then -+ ac_no_ssl=1 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 ++ ac_no_ssl=1 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 $as_echo "Checking if SSL support is disabled... yes" >&6; } - fi +else -+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -+ CFLAGS="$CFLAGS -I$with_ssl/include" -+ LDFLAGS="$LDFLAGS -L$with_ssl/lib" -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 ++ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then ++ CFLAGS="$CFLAGS -I$with_ssl/include" ++ LDFLAGS="$LDFLAGS -L$with_ssl/lib" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 +$as_echo "Using SSL prefix... $with_ssl" >&6; } -+ fi -+ if test "x$ssl_backend" = "xgnutls"; then -+ for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" ++ fi ++ if test "x$ssl_backend" = "xgnutls"; then ++ for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 @@ -120,39 +106,38 @@ index 78601ca..3589f5a 100755 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ++ + + test -n "$PKG_CONFIG" && break +done +test -n "$PKG_CONFIG" || PKG_CONFIG="none" + -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 +$as_echo "checking for GnuTLS installations.." >&6; } + + -+ ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" ++ ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" +if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : + gnutls_h_present=1 +fi + + + -+ -+ if test "$PKG_CONFIG" != "none"; then -+ if $PKG_CONFIG --exists gnutls; then -+ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" -+ libgnutls_present=1 -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 ++ if test "$PKG_CONFIG" != "none"; then ++ if $PKG_CONFIG --exists gnutls; then ++ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" ++ libgnutls_present=1 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 +$as_echo_n "checking for gnutls_certificate_set_x509_system_trust in -lgnutls... " >&6; } +if ${ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust+:} false; then : + $as_echo_n "(cached) " >&6 - else ++else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 ++ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -170,7 +155,7 @@ index 78601ca..3589f5a 100755 +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=yes -+else + else + ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=no +fi +rm -f core conftest.err conftest.$ac_objext \ @@ -181,87 +166,40 @@ index 78601ca..3589f5a 100755 +$as_echo "$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&6; } +if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" = xyes; then : + libgnutls_present=1 && -+ LIBS="$LIBS -lgnutls" ++ LIBS="$LIBS -lgnutls" +fi -+ -+ fi -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 + ++ fi ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 +$as_echo "*** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&6; } -+ fi ++ fi + -+ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 ++ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 +$as_echo "GnuTLS library found, SSL support enabled" >&6; } -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h ++ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK ++ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) ++ $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h + -+ $as_echo "#define PJ_HAS_TLS_SOCK 1" >>confdefs.h ++ $as_echo "#define PJ_HAS_TLS_SOCK 1" >>confdefs.h + -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 +$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; } -+ fi -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 ++ fi ++ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 $as_echo "checking for OpenSSL installations.." >&6; } -- if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -- CFLAGS="$CFLAGS -I$with_ssl/include" -- LDFLAGS="$LDFLAGS -L$with_ssl/lib" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 --$as_echo "Using SSL prefix... $with_ssl" >&6; } -- fi - - - -- ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -+ ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" - if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : - openssl_h_present=1 - fi - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 - $as_echo_n "checking for ERR_load_BIO_strings in -lcrypto... " >&6; } - if ${ac_cv_lib_crypto_ERR_load_BIO_strings+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -7892,7 +8021,7 @@ if test "x$ac_cv_lib_crypto_ERR_load_BIO_strings" = xyes; then : - libcrypto_present=1 && LIBS="-lcrypto $LIBS" - fi - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 - $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } - if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -7932,22 +8061,23 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : - libssl_present=1 && LIBS="-lssl $LIBS" - fi - -- if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 -+ if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 - $as_echo "OpenSSL library found, SSL support enabled" >&6; } -- # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -- #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -- $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h - -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found, disabling SSL support **" >&5 --$as_echo "** OpenSSL libraries not found, disabling SSL support **" >&6; } -- fi -+ $as_echo "#define PJ_HAS_TLS_SOCK 0" >>confdefs.h - -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No OpenSSL libraries found, disabling SSL support **" >&5 -+$as_echo "** No OpenSSL libraries found, disabling SSL support **" >&6; } -+ fi ++ + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then + CFLAGS="$CFLAGS -I$with_ssl/include" + LDFLAGS="$LDFLAGS -L$with_ssl/lib" +@@ -7971,11 +8105,10 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found, disabling SSL support **" >&5 + $as_echo "** OpenSSL libraries not found, disabling SSL support **" >&6; } + fi +- + fi fi @@ -270,14 +208,13 @@ index 78601ca..3589f5a 100755 # Check whether --with-opencore-amrnb was given. if test "${with_opencore_amrnb+set}" = set; then : withval=$with_opencore_amrnb; as_fn_error $? "This option is obsolete and replaced by --with-opencore-amr=DIR" "$LINENO" 5 -diff --git a/aconfigure.ac b/aconfigure.ac -index 3c80efa..808fd07 100644 ---- a/aconfigure.ac -+++ b/aconfigure.ac -@@ -1566,38 +1566,77 @@ fi - +diff -ru a/aconfigure.ac b/aconfigure.ac +--- a/aconfigure.ac 2017-01-25 06:23:08.000000000 -0500 ++++ b/aconfigure.ac 2017-06-08 13:28:17.138135490 -0400 +@@ -1533,18 +1533,59 @@ dnl # Include SSL support AC_SUBST(ac_no_ssl) + AC_SUBST(ac_ssl_has_aes_gcm,0) -AC_ARG_ENABLE(ssl, - AS_HELP_STRING([--disable-ssl], - [Exclude SSL support the build (default: autodetect)]) @@ -289,118 +226,88 @@ index 3c80efa..808fd07 100644 - fi - ], - [ -- AC_MSG_RESULT([checking for OpenSSL installations..]) -- if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -- CFLAGS="$CFLAGS -I$with_ssl/include" -- LDFLAGS="$LDFLAGS -L$with_ssl/lib" -- AC_MSG_RESULT([Using SSL prefix... $with_ssl]) +AC_ARG_ENABLE([ssl], -+ AS_HELP_STRING([--enable-ssl[=backend]], -+ [Select 'gnutls' or 'openssl' (default) to provide SSL support (autodetect)]), -+ [ if test "x$enableval" = "xgnutls"; then -+ [ssl_backend="gnutls"] -+ else -+ [ssl_backend="openssl"] -+ - fi -- AC_SUBST(openssl_h_present) -- AC_SUBST(libssl_present) -- AC_SUBST(libcrypto_present) -- AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) -- AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) -- AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"]) -- if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -- AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) -- # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -- #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -- AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -- else -- AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **]) -- fi -- ]) -+ ]) -+ ++ AS_HELP_STRING([--enable-ssl[=backend]], ++ [Select 'gnutls' or 'openssl' (default) to provide SSL support (autodetect)]), ++ [ if test "x$enableval" = "xgnutls"; then ++ [ssl_backend="gnutls"] ++ else ++ [ssl_backend="openssl"] ++ fi ]) ++ +if test "x$enable_ssl" = "xno"; then -+ [ac_no_ssl=1] -+ AC_MSG_RESULT([Checking if SSL support is disabled... yes]) ++ [ac_no_ssl=1] ++ AC_MSG_RESULT([Checking if SSL support is disabled... yes]) +else -+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -+ CFLAGS="$CFLAGS -I$with_ssl/include" -+ LDFLAGS="$LDFLAGS -L$with_ssl/lib" -+ AC_MSG_RESULT([Using SSL prefix... $with_ssl]) -+ fi -+ if test "x$ssl_backend" = "xgnutls"; then -+ AC_CHECK_PROGS(PKG_CONFIG, -+ $host-pkg-config pkg-config "python pkgconfig.py", -+ none) -+ AC_MSG_RESULT([checking for GnuTLS installations..]) -+ AC_SUBST(gnutls_h_present) -+ AC_SUBST(libgnutls_present) -+ AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) -+ -+ if test "$PKG_CONFIG" != "none"; then -+ if $PKG_CONFIG --exists gnutls; then -+ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" -+ libgnutls_present=1 -+ else -+ AC_CHECK_LIB(gnutls, -+ gnutls_certificate_set_x509_system_trust, -+ [libgnutls_present=1 && -+ LIBS="$LIBS -lgnutls"]) -+ fi -+ else -+ AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) -+ fi -+ -+ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then -+ AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -+ AC_DEFINE(PJ_HAS_TLS_SOCK, 1) -+ else -+ AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) -+ fi -+ else -+ AC_MSG_RESULT([checking for OpenSSL installations..]) -+ AC_SUBST(openssl_h_present) -+ AC_SUBST(libssl_present) -+ AC_SUBST(libcrypto_present) -+ AC_CHECK_HEADER(openssl/ssl.h, [openssl_h_present=1]) -+ AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) -+ AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"]) -+ if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -+ AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -+ AC_DEFINE(PJ_HAS_TLS_SOCK, 0) -+ else -+ AC_MSG_RESULT([** No OpenSSL libraries found, disabling SSL support **]) -+ fi ++ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then ++ CFLAGS="$CFLAGS -I$with_ssl/include" ++ LDFLAGS="$LDFLAGS -L$with_ssl/lib" ++ AC_MSG_RESULT([Using SSL prefix... $with_ssl]) ++ fi ++ if test "x$ssl_backend" = "xgnutls"; then ++ AC_CHECK_PROGS(PKG_CONFIG, ++ $host-pkg-config pkg-config "python pkgconfig.py", ++ none) ++ AC_MSG_RESULT([checking for GnuTLS installations..]) ++ AC_SUBST(gnutls_h_present) ++ AC_SUBST(libgnutls_present) ++ AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) ++ ++ if test "$PKG_CONFIG" != "none"; then ++ if $PKG_CONFIG --exists gnutls; then ++ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" ++ libgnutls_present=1 ++ else ++ AC_CHECK_LIB(gnutls, ++ gnutls_certificate_set_x509_system_trust, ++ [libgnutls_present=1 && ++ LIBS="$LIBS -lgnutls"]) ++ fi ++ else ++ AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) ++ fi ++ ++ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then ++ AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) ++ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK ++ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) ++ AC_DEFINE(PJ_HAS_SSL_SOCK, 1) ++ AC_DEFINE(PJ_HAS_TLS_SOCK, 1) ++ else ++ AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) ++ fi ++ else + AC_MSG_RESULT([checking for OpenSSL installations..]) ++ + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then + CFLAGS="$CFLAGS -I$with_ssl/include" + LDFLAGS="$LDFLAGS -L$with_ssl/lib" +@@ -1578,7 +1619,8 @@ + else + AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **]) + fi +- ]) + fi +fi dnl # Obsolete option --with-opencore-amrnb AC_ARG_WITH(opencore-amrnb, -diff --git a/pjlib/build/Makefile b/pjlib/build/Makefile -index 1e64950..529e0ff 100644 ---- a/pjlib/build/Makefile -+++ b/pjlib/build/Makefile -@@ -35,7 +35,7 @@ export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ +diff -ru a/pjlib/build/Makefile b/pjlib/build/Makefile +--- a/pjlib/build/Makefile 2016-10-05 05:52:39.000000000 -0400 ++++ b/pjlib/build/Makefile 2017-06-08 13:30:20.702138591 -0400 +@@ -35,7 +35,7 @@ guid.o hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \ os_info.o pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \ - rbtree.o sock_common.o sock_qos_common.o sock_qos_bsd.o \ + rbtree.o sock_common.o sock_qos_common.o \ - ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \ + ssl_sock_common.o ssl_sock_ossl.o ssl_sock_gtls.o ssl_sock_dump.o \ string.o timer.o types.o export PJLIB_CFLAGS += $(_CFLAGS) export PJLIB_CXXFLAGS += $(_CXXFLAGS) -diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in -index 849bd09..a6f7767 100644 ---- a/pjlib/include/pj/compat/os_auto.h.in -+++ b/pjlib/include/pj/compat/os_auto.h.in -@@ -209,6 +209,9 @@ +diff -ru a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in +--- a/pjlib/include/pj/compat/os_auto.h.in 2017-01-24 00:36:50.000000000 -0500 ++++ b/pjlib/include/pj/compat/os_auto.h.in 2017-06-08 13:31:04.976064779 -0400 +@@ -219,6 +219,9 @@ #ifndef PJ_HAS_SSL_SOCK #undef PJ_HAS_SSL_SOCK #endif @@ -410,32 +317,33 @@ index 849bd09..a6f7767 100644 #endif /* __PJ_COMPAT_OS_AUTO_H__ */ -diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h -index 9909b33..7d2c689 100644 ---- a/pjlib/include/pj/config.h -+++ b/pjlib/include/pj/config.h -@@ -855,13 +861,15 @@ +diff -ru a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h +--- a/pjlib/include/pj/config.h 2017-01-25 21:29:59.000000000 -0500 ++++ b/pjlib/include/pj/config.h 2017-06-08 13:34:27.642149351 -0400 +@@ -888,7 +888,7 @@ /** * Enable secure socket. For most platforms, this is implemented using - * OpenSSL, so this will require OpenSSL to be installed. For Symbian -+ * OpenSSL, so this will require OpenSSL or GnuTLS to be installed. For Symbian ++ * OpenSSL or GnuTLS, so this will require OpenSSL or GnuTLS to be installed. For Symbian * platform, this is implemented natively using CSecureSocket. * * Default: 0 (for now) - */ +@@ -896,6 +896,10 @@ #ifndef PJ_HAS_SSL_SOCK # define PJ_HAS_SSL_SOCK 0 -+ // When set to 1 secure sockets will use the GnuTLS backend -+# define PJ_HAS_TLS_SOCK 0 #endif ++// When set to 1 secure sockets will use the GnuTLS backend than OpenSSL ++#ifndef PJ_HAS_TLS_SOCK ++# define PJ_HAS_TLS_SOCK 0 ++#endif -diff --git a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h -index b698131..ed39fa6 100644 ---- a/pjlib/include/pj/ssl_sock.h -+++ b/pjlib/include/pj/ssl_sock.h -@@ -184,6 +184,11 @@ typedef struct pj_ssl_cert_info { + /** +diff -ru a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h +--- a/pjlib/include/pj/ssl_sock.h 2016-10-27 03:58:01.000000000 -0400 ++++ b/pjlib/include/pj/ssl_sock.h 2017-06-08 13:36:16.448510381 -0400 +@@ -184,6 +184,10 @@ pj_str_t raw; /**< Raw certificate in PEM format, only available for remote certificate. */ @@ -443,15 +351,13 @@ index b698131..ed39fa6 100644 + unsigned cnt; /**< # of entry */ + pj_str_t* cert_raw; + } raw_chain; -+ } pj_ssl_cert_info; -diff --git a/pjlib/src/pj/ssl_sock_common.c b/pjlib/src/pj/ssl_sock_common.c -index 9cbfef7..9e43ddf 100644 ---- a/pjlib/src/pj/ssl_sock_common.c -+++ b/pjlib/src/pj/ssl_sock_common.c -@@ -35,7 +35,12 @@ PJ_DEF(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param) +diff -ru a/pjlib/src/pj/ssl_sock_common.c b/pjlib/src/pj/ssl_sock_common.c +--- a/pjlib/src/pj/ssl_sock_common.c 2016-10-27 03:58:01.000000000 -0400 ++++ b/pjlib/src/pj/ssl_sock_common.c 2017-06-08 13:37:17.171037628 -0400 +@@ -35,7 +35,12 @@ param->async_cnt = 1; param->concurrency = -1; param->whole_data = PJ_TRUE; @@ -3347,10 +3253,9 @@ index 0000000..37bcaba +} + +#endif /* PJ_HAS_SSL_SOCK */ -diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c -index 1e276ab..1661ac9 100644 ---- a/pjlib/src/pj/ssl_sock_ossl.c -+++ b/pjlib/src/pj/ssl_sock_ossl.c +diff -ru a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c +--- a/pjlib/src/pj/ssl_sock_ossl.c 2017-01-24 00:41:05.000000000 -0500 ++++ b/pjlib/src/pj/ssl_sock_ossl.c 2017-06-08 13:42:15.188809557 -0400 @@ -32,8 +32,10 @@ #include <pj/timer.h> @@ -3364,10 +3269,9 @@ index 1e276ab..1661ac9 100644 #define THIS_FILE "ssl_sock_ossl.c" -diff --git a/pjmedia/src/pjmedia/transport_srtp.c b/pjmedia/src/pjmedia/transport_srtp.c -index 27daff3..d7f044f 100644 ---- a/pjmedia/src/pjmedia/transport_srtp.c -+++ b/pjmedia/src/pjmedia/transport_srtp.c +diff -ru a/pjmedia/src/pjmedia/transport_srtp.c b/pjmedia/src/pjmedia/transport_srtp.c +--- a/pjmedia/src/pjmedia/transport_srtp.c 2017-01-10 23:38:29.000000000 -0500 ++++ b/pjmedia/src/pjmedia/transport_srtp.c 2017-06-08 13:43:29.727001721 -0400 @@ -30,7 +30,8 @@ #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) @@ -3378,7 +3282,7 @@ index 27daff3..d7f044f 100644 # include <openssl/rand.h> /* Suppress compile warning of OpenSSL deprecation (OpenSSL is deprecated -@@ -1113,7 +1114,8 @@ static pj_status_t generate_crypto_attr_value(pj_pool_t *pool, +@@ -1147,7 +1148,8 @@ key_ok = PJ_TRUE; @@ -3388,3 +3292,4 @@ index 27daff3..d7f044f 100644 /* Include OpenSSL libraries for MSVC */ # ifdef _MSC_VER + diff --git a/contrib/src/pjproject/pj_uwp.patch b/contrib/src/pjproject/pj_uwp.patch index 0e47f047f2d26ed3e5b3c7d39d8a1fd66b8d081c..2e7f0382667c4773110f1f4a3e39b9ed2a1f1684 100644 --- a/contrib/src/pjproject/pj_uwp.patch +++ b/contrib/src/pjproject/pj_uwp.patch @@ -1,75 +1,6 @@ ---- a/pjsip/build/pjsip_core.vcxproj -+++ b/pjsip/build/pjsip_core.vcxproj -@@ -211,7 +211,7 @@ - </Midl> - <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;PJ_HAS_SSL_SOCK;_LIB;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeaderOutputFile /> - </ClCompile> - <Lib> ---- a/pjsip/build/pjsip_simple.vcxproj -+++ b/pjsip/build/pjsip_simple.vcxproj -@@ -235,7 +235,7 @@ - </Midl> - <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjlib-util/include;../../pjlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeaderOutputFile /> - </ClCompile> - <Lib> ---- a/pjsip/build/pjsip_ua.vcxproj -+++ b/pjsip/build/pjsip_ua.vcxproj -@@ -211,7 +211,7 @@ - </Midl> - <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;../../pjmedia/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeaderOutputFile /> - </ClCompile> - <Lib> ---- a/pjsip/build/pjsua2_lib.vcxproj -+++ b/pjsip/build/pjsua2_lib.vcxproj -@@ -235,7 +235,7 @@ - </Midl> - <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjmedia/include;../../pjlib-util/include;../../pjlib/include;../../pjnath/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeaderOutputFile /> - </ClCompile> - <Lib> ---- a/pjsip/build/pjsua_lib.vcxproj -+++ b/pjsip/build/pjsua_lib.vcxproj -@@ -235,7 +235,7 @@ - </Midl> - <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjmedia/include;../../pjlib-util/include;../../pjlib/include;../../pjnath/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> -- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> -+ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <PrecompiledHeaderOutputFile /> - </ClCompile> - <Lib> ---- a/pjsip/src/pjsip/sip_dialog.c -+++ b/pjsip/src/pjsip/sip_dialog.c -@@ -888,7 +888,11 @@ PJ_DEF(void) pjsip_dlg_inc_lock(pjsip_dialog *dlg) - PJ_LOG(6,(dlg->obj_name, "Entering pjsip_dlg_inc_lock(), sess_count=%d", - dlg->sess_count)); - -+#if _WIN32 && (_WIN32_WINNT >= 0x0400) -+ pj_mutex_trylock(dlg->mutex_); -+#else - pj_mutex_lock(dlg->mutex_); -+#endif - dlg->sess_count++; - - PJ_LOG(6,(dlg->obj_name, "Leaving pjsip_dlg_inc_lock(), sess_count=%d", --- a/pjlib-util/build/pjlib_util.vcxproj +++ b/pjlib-util/build/pjlib_util.vcxproj -@@ -211,7 +211,7 @@ +@@ -327,7 +327,7 @@ </Midl> <ClCompile> <AdditionalIncludeDirectories>../include;../../pjlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -80,7 +11,7 @@ <Lib> --- a/pjlib/build/pjlib.vcxproj +++ b/pjlib/build/pjlib.vcxproj -@@ -224,8 +224,8 @@ +@@ -327,8 +327,8 @@ <TargetEnvironment>X64</TargetEnvironment> </Midl> <ClCompile> @@ -91,24 +22,19 @@ <PrecompiledHeaderOutputFile /> </ClCompile> </ItemDefinitionGroup> -@@ -424,9 +424,11 @@ - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|Win32'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|x64'">true</ExcludedFromBuild> - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> -+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> -+ </ClCompile> -+ <ClCompile Include="..\src\pj\ip_helper_win32.c"> +@@ -620,6 +620,7 @@ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> </ClCompile> -- <ClCompile Include="..\src\pj\ip_helper_win32.c" /> - <ClCompile Include="..\src\pj\list.c" /> - <ClCompile Include="..\src\pj\lock.c" /> - <ClCompile Include="..\src\pj\log.c" /> -@@ -593,6 +595,7 @@ + <ClCompile Include="..\src\pj\ip_helper_win32.c"> ++ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(API_Family)'!='WinDesktop'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\src\pj\ip_helper_generic.c"> +@@ -851,6 +852,7 @@ <ClCompile Include="..\src\pj\sock_select.c" /> <ClCompile Include="..\src\pj\ssl_sock_common.c" /> <ClCompile Include="..\src\pj\ssl_sock_dump.c" /> -+ <ClCompile Include="..\src\pj\ssl_sock_gtls.c" /> ++ <ClCompile Include="..\src\pj\ssl_sock_gtls.c" /> <ClCompile Include="..\src\pj\ssl_sock_ossl.c" /> <ClCompile Include="..\src\pj\string.c" /> <ClCompile Include="..\src\pj\symbols.c"> @@ -137,66 +63,32 @@ \ No newline at end of file --- a/pjlib/src/pj/file_access_win32.c +++ b/pjlib/src/pj/file_access_win32.c -@@ -44,7 +44,7 @@ PJ_DEF(pj_bool_t) pj_file_exists(const char *filename) - - PJ_ASSERT_RETURN(filename != NULL, 0); - -- hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), -+ hFile = CreateFile2(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), - CONTROL_ACCESS, - FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); -@@ -68,14 +68,14 @@ PJ_DEF(pj_off_t) pj_file_size(const char *filename) - - PJ_ASSERT_RETURN(filename != NULL, -1); - -- hFile = CreateFile(PJ_STRING_TO_NATIVE(filename, wfilename,sizeof(wfilename)), -+ hFile = CreateFile2(PJ_STRING_TO_NATIVE(filename, wfilename,sizeof(wfilename)), - CONTROL_ACCESS, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) - return -1; - -- sizeLo = GetFileSize(hFile, &sizeHi); -+ sizeLo = GetFileSizeEx(hFile, &sizeHi); - if (sizeLo == INVALID_FILE_SIZE) { - DWORD dwStatus = GetLastError(); - if (dwStatus != NO_ERROR) { -@@ -177,14 +177,14 @@ PJ_DEF(pj_status_t) pj_file_getstat(const char *filename, pj_file_stat *stat) - - PJ_ASSERT_RETURN(filename!=NULL && stat!=NULL, PJ_EINVAL); - -- hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), -+ hFile = CreateFile2(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), - CONTROL_ACCESS, - FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) - return PJ_RETURN_OS_ERROR(GetLastError()); - -- sizeLo = GetFileSize(hFile, &sizeHi); -+ sizeLo = GetFileSizeEx(hFile, &sizeHi); - if (sizeLo == INVALID_FILE_SIZE) { - DWORD dwStatus = GetLastError(); - if (dwStatus != NO_ERROR) { +@@ -79,7 +79,7 @@ static HANDLE WINAPI create_file(LPCTSTR filename, DWORD desired_access, + return CreateFile2(filename, desired_access, share_mode, + creation_disposition, NULL); + #else +- return CreateFile(filename, desired_access, share_mode, ++ return CreateFile2(filename, desired_access, share_mode, + security_attributes, creation_disposition, + flags_and_attributes, template_file); + #endif --- a/pjlib/src/pj/file_io_win32.c +++ b/pjlib/src/pj/file_io_win32.c -@@ -88,7 +88,7 @@ PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool, - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL; - -- hFile = CreateFile(PJ_STRING_TO_NATIVE(pathname,wpathname,sizeof(wpathname)), -+ hFile = CreateFile2(PJ_STRING_TO_NATIVE(pathname,wpathname,sizeof(wpathname)), +@@ -129,7 +129,7 @@ PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool, + dwDesiredAccess, dwShareMode, dwCreationDisposition, + NULL); + #else +- hFile = CreateFile(PJ_STRING_TO_NATIVE(pathname, ++ hFile = CreateFile2(PJ_STRING_TO_NATIVE(pathname, + wpathname, sizeof(wpathname)), dwDesiredAccess, dwShareMode, NULL, - dwCreationDisposition, dwFlagsAndAttributes, NULL); - if (hFile == INVALID_HANDLE_VALUE) { + dwCreationDisposition, dwFlagsAndAttributes, NULL); --- a/pjmedia/build/pjmedia.vcxproj +++ b/pjmedia/build/pjmedia.vcxproj -@@ -207,7 +207,7 @@ +@@ -325,7 +325,7 @@ </Midl> <ClCompile> - <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;../../pjnath/include;../../third_party/portaudio/include;../../third_party/speex/include;../../third_party/build/srtp;../../third_party/srtp/include;../../third_party/srtp/crypto/include;../../third_party/yuv/include;../..;$(DXSDK_DIR)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;../../pjnath/include;../../third_party/portaudio/include;../../third_party/speex/include;../../third_party/build/srtp;../../third_party/srtp/include;../../third_party/srtp/crypto/include;../../third_party/yuv/include;../../third_party/webrtc/src;../..;$(DXSDK_DIR)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderOutputFile /> @@ -204,7 +96,7 @@ </ItemDefinitionGroup> --- a/pjnath/build/pjnath.vcxproj +++ b/pjnath/build/pjnath.vcxproj -@@ -267,7 +267,7 @@ +@@ -410,7 +410,7 @@ </Midl> <ClCompile> <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -213,4 +105,99 @@ <PrecompiledHeaderOutputFile /> </ClCompile> </ItemDefinitionGroup> - \ No newline at end of file +--- a/pjsip/build/pjsip_core.vcxproj ++++ b/pjsip/build/pjsip_core.vcxproj +@@ -327,7 +327,7 @@ + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> +- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> ++ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;PJ_HAS_SSL_SOCK;_LIB;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeaderOutputFile /> + </ClCompile> + <Lib> +--- a/pjsip/build/pjsip_simple.vcxproj ++++ b/pjsip/build/pjsip_simple.vcxproj +@@ -362,7 +362,7 @@ + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>../include;../../pjlib-util/include;../../pjlib/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> +- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> ++ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeaderOutputFile /> + </ClCompile> + <Lib> +--- a/pjsip/build/pjsip_ua.vcxproj ++++ b/pjsip/build/pjsip_ua.vcxproj +@@ -327,7 +327,7 @@ + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>../include;../../pjlib/include;../../pjlib-util/include;../../pjmedia/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> +- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> ++ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeaderOutputFile /> + </ClCompile> + <Lib> +--- a/pjsip/build/pjsua2_lib.vcxproj ++++ b/pjsip/build/pjsua2_lib.vcxproj +@@ -364,7 +364,7 @@ + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>../include;../../pjmedia/include;../../pjlib-util/include;../../pjlib/include;../../pjnath/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> +- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> ++ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeaderOutputFile /> + </ClCompile> + <Lib> +--- a/pjsip/build/pjsua_lib.vcxproj ++++ b/pjsip/build/pjsua_lib.vcxproj +@@ -362,7 +362,7 @@ + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>../include;../../pjmedia/include;../../pjlib-util/include;../../pjlib/include;../../pjnath/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> +- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> ++ <PreprocessorDefinitions>PJ_OS_HAS_CHECK_STACK=0;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PrecompiledHeaderOutputFile /> + </ClCompile> + <Lib> +--- a/pjsip/src/pjsip/sip_dialog.c ++++ b/pjsip/src/pjsip/sip_dialog.c +@@ -882,7 +882,7 @@ PJ_DEF(void) pjsip_dlg_inc_lock(pjsip_dialog *dlg) + PJ_LOG(6,(dlg->obj_name, "Entering pjsip_dlg_inc_lock(), sess_count=%d", + dlg->sess_count)); + +- pj_mutex_lock(dlg->mutex_); ++ pj_mutex_trylock(dlg->mutex_); + dlg->sess_count++; + + PJ_LOG(6,(dlg->obj_name, "Leaving pjsip_dlg_inc_lock(), sess_count=%d", +--- a/pjlib/build/pjlib.vcxproj ++++ b/pjlib/build/pjlib.vcxproj +@@ -617,7 +617,7 @@ + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release-Static|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild> +- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> ++ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\src\pj\ip_helper_win32.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> +--- a/pjlib/src/pj/os_core_win32.c ++++ b/pjlib/src/pj/os_core_win32.c +@@ -1424,10 +1424,10 @@ PJ_DEF(pj_status_t) pj_event_pulse(pj_event_t *event) + + PJ_LOG(6, (event->obj_name, "Pulsing event")); + +- if (PulseEvent(event->hEvent)) ++ //if (PulseEvent(event->hEvent)) + return PJ_SUCCESS; +- else +- return PJ_RETURN_OS_ERROR(GetLastError()); ++ //else ++ //return PJ_RETURN_OS_ERROR(GetLastError()); + #endif + } + +-- +2.10.2.windows.1 + diff --git a/contrib/src/pjproject/pj_uwp_endianness.patch b/contrib/src/pjproject/pj_uwp_endianness.patch deleted file mode 100644 index 886cb2d3f09b5c4d885d390055a1908ded2917a8..0000000000000000000000000000000000000000 --- a/contrib/src/pjproject/pj_uwp_endianness.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/pjlib/include/pj/config.h -+++ b/pjlib/include/pj/config.h -@@ -245,7 +245,13 @@ - # define PJ_M_NAME "armv4" - # define PJ_HAS_PENTIUM 0 - # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN --# error Endianness must be declared for this processor -+# if defined(__GNUC__) -+# include <endian.h> -+# define PJ_IS_LITTLE_ENDIAN __BYTE_ORDER__ == __LITTLE_ENDIAN__ -+# define PJ_IS_BIG_ENDIAN __BYTE_ORDER__ == __BIG_ENDIAN__ -+# else -+# error Endianness must be declared for this processor -+# endif - # endif - - #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \ diff --git a/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch b/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch index fe386f024802d6b557153c0bc47f6e27fd331df6..5d7b44b9f5c758f4840a84d3d949b3a58d561a28 100644 --- a/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch +++ b/contrib/src/pjproject/pj_uwp_fix_turn_fallback.patch @@ -1,5 +1,5 @@ ---- a/pjnath/src/pjnath/turn_session.c 2016-09-19 18:21:09.073614574 -0400 -+++ b/pjnath/src/pjnath/turn_session.c 2016-09-19 18:21:30.648631620 -0400 +--- a/pjnath/src/pjnath/turn_session.c ++++ b/pjnath/src/pjnath/turn_session.c @@ -653,3 +653,3 @@ - cnt = PJ_TURN_MAX_DNS_SRV_CNT; @@ -7,11 +7,11 @@ ai = (pj_addrinfo*) --- a/pjnath/src/pjnath/ice_strans.c +++ b/pjnath/src/pjnath/ice_strans.c -@@ -1996,6 +1996,38 @@ static void turn_on_state(pj_turn_sock *turn_sock, pj_turn_state_t old_state, - sizeof(ipaddr), 3))); - - sess_init_update(comp->ice_st); -+ } else if ((old_state == PJ_TURN_STATE_RESOLVING || old_state == PJ_TURN_STATE_ALLOCATING) && +@@ -2078,6 +2078,38 @@ static void turn_on_state(pj_turn_sock *turn_sock, pj_turn_state_t old_state, + } + + sess_init_update(comp->ice_st); ++ } else if ((old_state == PJ_TURN_STATE_RESOLVING || old_state == PJ_TURN_STATE_ALLOCATING) && + new_state >= PJ_TURN_STATE_DEALLOCATING) + { + pj_ice_sess_cand *cand = NULL; @@ -43,9 +43,9 @@ + cand->status = old_state == PJ_TURN_STATE_RESOLVING ? PJ_ERESOLVE : PJ_EINVALIDOP; + + sess_init_update(comp->ice_st); - - } else if (new_state >= PJ_TURN_STATE_DEALLOCATING) { - pj_turn_session_info info; + + } else if (new_state >= PJ_TURN_STATE_DEALLOCATING) { + pj_turn_session_info info; -- 2.8.1.windows.1 diff --git a/contrib/src/pjproject/pj_uwp_gnutls.patch b/contrib/src/pjproject/pj_uwp_gnutls.patch index d40e30a3ade80cbabfbed90c3f17c7644c58cb8d..9f20025be439bd2e9abcfbf3664b111c380e7141 100644 --- a/contrib/src/pjproject/pj_uwp_gnutls.patch +++ b/contrib/src/pjproject/pj_uwp_gnutls.patch @@ -15,380 +15,6 @@ Vittorio Giovara <vittorio.giovara@savoirfairelinux.com> Philippe Proulx <philippe.proulx@savoirfairelinux.com> and Adrien Béraud <adrien.beraud@savoirfairelinux.com> on behalf of Savoir-faire Linux. - - .../aconfigure | 184 +- - .../aconfigure.ac | 101 +- - .../pjlib/build/Makefile | 3 +- - .../pjlib/include/pj/compat/os_auto.h.in | 3 + - .../pjlib/include/pj/config.h | 14 +- - .../pjlib/include/pj/ssl_sock.h | 5 + - .../pjlib/src/pj/ssl_sock_common.c | 5 + - .../pjlib/src/pj/ssl_sock_gtls.c | 2887 ++++++++++++++++++++ - .../pjlib/src/pj/ssl_sock_ossl.c | 6 +- - .../pjmedia/src/pjmedia/transport_srtp.c | 6 +- - 10 files changed, 3147 insertions(+), 67 deletions(-) ---- a/aconfigure -+++ b/aconfigure -@@ -640,6 +640,8 @@ ac_no_opencore_amrnb - libcrypto_present - libssl_present - openssl_h_present -+libgnutls_present -+gnutls_h_present - ac_no_ssl - ac_webrtc_ldflags - ac_webrtc_cflags -@@ -1491,8 +1493,8 @@ Optional Features: - package and samples location using IPPROOT and - IPPSAMPLES env var or with --with-ipp and - --with-ipp-samples options -- --disable-ssl Exclude SSL support the build (default: autodetect) -- -+ --enable-ssl=backend Select 'gnutls' or 'openssl' (default) to provide -+ SSL support (autodetect) - --disable-opencore-amr Exclude OpenCORE AMR support from the build - (default: autodetect) - -@@ -7826,33 +7828,160 @@ fi - - # Check whether --enable-ssl was given. - if test "${enable_ssl+set}" = set; then : -- enableval=$enable_ssl; -- if test "$enable_ssl" = "no"; then -- ac_no_ssl=1 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 -+ enableval=$enable_ssl; if test "x$enableval" = "xgnutls"; then -+ ssl_backend="gnutls" -+ else -+ ssl_backend="openssl" -+ -+ fi -+ -+fi -+ -+ -+if test "x$enable_ssl" = "xno"; then -+ ac_no_ssl=1 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if SSL support is disabled... yes" >&5 - $as_echo "Checking if SSL support is disabled... yes" >&6; } -- fi -+else -+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -+ CFLAGS="$CFLAGS -I$with_ssl/include" -+ LDFLAGS="$LDFLAGS -L$with_ssl/lib" -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 -+$as_echo "Using SSL prefix... $with_ssl" >&6; } -+ fi -+ if test "x$ssl_backend" = "xgnutls"; then -+ for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_PKG_CONFIG+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$PKG_CONFIG"; then -+ ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_PKG_CONFIG="$ac_prog" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG -+if test -n "$PKG_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -+$as_echo "$PKG_CONFIG" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi - -+ -+ test -n "$PKG_CONFIG" && break -+done -+test -n "$PKG_CONFIG" || PKG_CONFIG="none" -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 -+$as_echo "checking for GnuTLS installations.." >&6; } -+ -+ -+ ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" -+if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : -+ gnutls_h_present=1 -+fi -+ -+ -+ -+ if test "$PKG_CONFIG" != "none"; then -+ if $PKG_CONFIG --exists gnutls; then -+ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" -+ libgnutls_present=1 -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 -+$as_echo_n "checking for gnutls_certificate_set_x509_system_trust in -lgnutls... " >&6; } -+if ${ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust+:} false; then : -+ $as_echo_n "(cached) " >&6 - else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lgnutls $LIBS" -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ - -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char gnutls_certificate_set_x509_system_trust (); -+int -+main () -+{ -+return gnutls_certificate_set_x509_system_trust (); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=yes -+else -+ ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&5 -+$as_echo "$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&6; } -+if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" = xyes; then : -+ libgnutls_present=1 && -+ LIBS="$LIBS -lgnutls" -+fi -+ -+ fi -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 -+$as_echo "*** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&6; } -+ fi -+ -+ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 -+$as_echo "GnuTLS library found, SSL support enabled" >&6; } -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h -+ -+ $as_echo "#define PJ_HAS_TLS_SOCK 1" >>confdefs.h -+ -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 -+$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; } -+ fi -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 - $as_echo "checking for OpenSSL installations.." >&6; } -- if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -- CFLAGS="$CFLAGS -I$with_ssl/include" -- LDFLAGS="$LDFLAGS -L$with_ssl/lib" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using SSL prefix... $with_ssl" >&5 --$as_echo "Using SSL prefix... $with_ssl" >&6; } -- fi - - - -- ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -+ ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" - if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : - openssl_h_present=1 - fi - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 - $as_echo_n "checking for ERR_load_BIO_strings in -lcrypto... " >&6; } - if ${ac_cv_lib_crypto_ERR_load_BIO_strings+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -7892,7 +8021,7 @@ if test "x$ac_cv_lib_crypto_ERR_load_BIO_strings" = xyes; then : - libcrypto_present=1 && LIBS="-lcrypto $LIBS" - fi - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 - $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } - if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -7932,22 +8061,23 @@ if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : - libssl_present=1 && LIBS="-lssl $LIBS" - fi - -- if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 -+ if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 - $as_echo "OpenSSL library found, SSL support enabled" >&6; } -- # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -- #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -- $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h - -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found, disabling SSL support **" >&5 --$as_echo "** OpenSSL libraries not found, disabling SSL support **" >&6; } -- fi -+ $as_echo "#define PJ_HAS_TLS_SOCK 0" >>confdefs.h - -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No OpenSSL libraries found, disabling SSL support **" >&5 -+$as_echo "** No OpenSSL libraries found, disabling SSL support **" >&6; } -+ fi -+ fi - fi - - -- - # Check whether --with-opencore-amrnb was given. - if test "${with_opencore_amrnb+set}" = set; then : - withval=$with_opencore_amrnb; as_fn_error $? "This option is obsolete and replaced by --with-opencore-amr=DIR" "$LINENO" 5 ---- a/aconfigure.ac -+++ b/aconfigure.ac -@@ -1566,38 +1566,77 @@ fi - - dnl # Include SSL support - AC_SUBST(ac_no_ssl) --AC_ARG_ENABLE(ssl, -- AS_HELP_STRING([--disable-ssl], -- [Exclude SSL support the build (default: autodetect)]) -- , -- [ -- if test "$enable_ssl" = "no"; then -- [ac_no_ssl=1] -- AC_MSG_RESULT([Checking if SSL support is disabled... yes]) -- fi -- ], -- [ -- AC_MSG_RESULT([checking for OpenSSL installations..]) -- if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -- CFLAGS="$CFLAGS -I$with_ssl/include" -- LDFLAGS="$LDFLAGS -L$with_ssl/lib" -- AC_MSG_RESULT([Using SSL prefix... $with_ssl]) -+AC_ARG_ENABLE([ssl], -+ AS_HELP_STRING([--enable-ssl[=backend]], -+ [Select 'gnutls' or 'openssl' (default) to provide SSL support (autodetect)]), -+ [ if test "x$enableval" = "xgnutls"; then -+ [ssl_backend="gnutls"] -+ else -+ [ssl_backend="openssl"] -+ - fi -- AC_SUBST(openssl_h_present) -- AC_SUBST(libssl_present) -- AC_SUBST(libcrypto_present) -- AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) -- AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) -- AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"]) -- if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -- AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) -- # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -- #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -- AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -- else -- AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **]) -- fi -- ]) -+ ]) -+ -+if test "x$enable_ssl" = "xno"; then -+ [ac_no_ssl=1] -+ AC_MSG_RESULT([Checking if SSL support is disabled... yes]) -+else -+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then -+ CFLAGS="$CFLAGS -I$with_ssl/include" -+ LDFLAGS="$LDFLAGS -L$with_ssl/lib" -+ AC_MSG_RESULT([Using SSL prefix... $with_ssl]) -+ fi -+ if test "x$ssl_backend" = "xgnutls"; then -+ AC_CHECK_PROGS(PKG_CONFIG, -+ $host-pkg-config pkg-config "python pkgconfig.py", -+ none) -+ AC_MSG_RESULT([checking for GnuTLS installations..]) -+ AC_SUBST(gnutls_h_present) -+ AC_SUBST(libgnutls_present) -+ AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) -+ -+ if test "$PKG_CONFIG" != "none"; then -+ if $PKG_CONFIG --exists gnutls; then -+ LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" -+ libgnutls_present=1 -+ else -+ AC_CHECK_LIB(gnutls, -+ gnutls_certificate_set_x509_system_trust, -+ [libgnutls_present=1 && -+ LIBS="$LIBS -lgnutls"]) -+ fi -+ else -+ AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) -+ fi -+ -+ if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then -+ AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -+ AC_DEFINE(PJ_HAS_TLS_SOCK, 1) -+ else -+ AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) -+ fi -+ else -+ AC_MSG_RESULT([checking for OpenSSL installations..]) -+ AC_SUBST(openssl_h_present) -+ AC_SUBST(libssl_present) -+ AC_SUBST(libcrypto_present) -+ AC_CHECK_HEADER(openssl/ssl.h, [openssl_h_present=1]) -+ AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) -+ AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="-lssl $LIBS"]) -+ if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then -+ AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) -+ # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK -+ #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) -+ AC_DEFINE(PJ_HAS_SSL_SOCK, 1) -+ AC_DEFINE(PJ_HAS_TLS_SOCK, 0) -+ else -+ AC_MSG_RESULT([** No OpenSSL libraries found, disabling SSL support **]) -+ fi -+ fi -+fi - - dnl # Obsolete option --with-opencore-amrnb - AC_ARG_WITH(opencore-amrnb, ---- a/pjlib/build/Makefile -+++ b/pjlib/build/Makefile -@@ -35,7 +35,7 @@ export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ - guid.o hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \ - os_info.o pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \ - rbtree.o sock_common.o sock_qos_common.o sock_qos_bsd.o \ -- ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \ -+ ssl_sock_common.o ssl_sock_ossl.o ssl_sock_gtls.o ssl_sock_dump.o \ - string.o timer.o types.o - export PJLIB_CFLAGS += $(_CFLAGS) - export PJLIB_CXXFLAGS += $(_CXXFLAGS) --- a/pjlib/include/pj/compat/os_auto.h.in +++ b/pjlib/include/pj/compat/os_auto.h.in @@ -209,6 +209,9 @@ diff --git a/contrib/src/pjproject/pj_uwp_xbox_one.patch b/contrib/src/pjproject/pj_uwp_xbox_one.patch deleted file mode 100644 index 8834a163d84ca9efa7b7778c885d110cdcd84668..0000000000000000000000000000000000000000 --- a/contrib/src/pjproject/pj_uwp_xbox_one.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/pjlib/src/pj/os_core_win32.c -+++ b/pjlib/src/pj/os_core_win32.c -@@ -1336,9 +1336,6 @@ - - PJ_LOG(6, (event->obj_name, "Pulsing event")); - -- if (PulseEvent(event->hEvent)) -- return PJ_SUCCESS; -- else - return PJ_RETURN_OS_ERROR(GetLastError()); - } - diff --git a/contrib/src/pjproject/rules.mak b/contrib/src/pjproject/rules.mak index bf0f03b436438692254113fbf257227963c91545..510dc8a4b7514cf2919a0eb42f3b3b76cf4c4112 100644 --- a/contrib/src/pjproject/rules.mak +++ b/contrib/src/pjproject/rules.mak @@ -1,5 +1,5 @@ # PJPROJECT -PJPROJECT_VERSION := 2.5.5 +PJPROJECT_VERSION := 2.6 PJPROJECT_URL := http://www.pjsip.org/release/$(PJPROJECT_VERSION)/pjproject-$(PJPROJECT_VERSION).tar.bz2 PJPROJECT_OPTIONS := --disable-oss \ @@ -21,6 +21,7 @@ PJPROJECT_OPTIONS := --disable-oss \ --disable-v4l2 \ --disable-openh264 \ --disable-resample \ + --disable-libwebrtc \ --enable-ssl=gnutls ifdef HAVE_ANDROID @@ -61,10 +62,10 @@ $(TARBALLS)/pjproject-$(PJPROJECT_VERSION).tar.bz2: pjproject: pjproject-$(PJPROJECT_VERSION).tar.bz2 .sum-pjproject $(UNPACK) ifdef HAVE_WIN32 - $(APPLY) $(SRC)/pjproject/intptr_t.patch + #$(APPLY) $(SRC)/pjproject/intptr_t.patch $(APPLY) $(SRC)/pjproject/pj_win.patch endif - $(APPLY) $(SRC)/pjproject/endianness.patch + #$(APPLY) $(SRC)/pjproject/endianness.patch $(APPLY) $(SRC)/pjproject/gnutls.patch $(APPLY) $(SRC)/pjproject/notestsapps.patch $(APPLY) $(SRC)/pjproject/fix_base64.patch