Changeset 5725


Ignore:
Timestamp:
Jan 15, 2018 8:52:29 AM (6 years ago)
Author:
ming
Message:

Re #2082: Initial implementation of GnuTLS support.

Location:
pjproject/trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5679 r5725  
    643643ac_no_opencore_amrwb 
    644644ac_no_opencore_amrnb 
     645libgnutls_present 
     646gnutls_h_present 
    645647libcrypto_present 
    646648libssl_present 
    647649openssl_h_present 
     650ac_ssl_backend 
    648651ac_ssl_has_aes_gcm 
    649652ac_no_ssl 
     
    759762oldincludedir 
    760763includedir 
    761 runstatedir 
    762764localstatedir 
    763765sharedstatedir 
     
    820822with_ipp_arch 
    821823with_ssl 
     824with_gnutls 
    822825enable_ssl 
    823826with_opencore_amrnb 
     
    884887sharedstatedir='${prefix}/com' 
    885888localstatedir='${prefix}/var' 
    886 runstatedir='${localstatedir}/run' 
    887889includedir='${prefix}/include' 
    888890oldincludedir='/usr/include' 
     
    11371139    silent=yes ;; 
    11381140 
    1139   -runstatedir | --runstatedir | --runstatedi | --runstated \ 
    1140   | --runstate | --runstat | --runsta | --runst | --runs \ 
    1141   | --run | --ru | --r) 
    1142     ac_prev=runstatedir ;; 
    1143   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 
    1144   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 
    1145   | --run=* | --ru=* | --r=*) 
    1146     runstatedir=$ac_optarg ;; 
    1147  
    11481141  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 
    11491142    ac_prev=sbindir ;; 
     
    12831276                datadir sysconfdir sharedstatedir localstatedir includedir \ 
    12841277                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 
    1285                 libdir localedir mandir runstatedir 
     1278                libdir localedir mandir 
    12861279do 
    12871280  eval ac_val=\$$ac_var 
     
    14361429  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] 
    14371430  --localstatedir=DIR     modifiable single-machine data [PREFIX/var] 
    1438   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] 
    14391431  --libdir=DIR            object code libraries [EPREFIX/lib] 
    14401432  --includedir=DIR        C header files [PREFIX/include] 
     
    15551547  --with-ipp-arch=ARCH    Specify the Intel IPP ARCH suffix, e.g. "64" or 
    15561548                          "em64t. Default is blank for IA32" 
    1557   --with-ssl=DIR          Specify alternate libssl prefix 
     1549  --with-ssl=DIR          Specify alternate SSL library prefix. This option 
     1550                          will try to find OpenSSL first, then if not found, 
     1551                          GnuTLS. To skip OpenSSL finding, use --with-gnutls 
     1552                          option instead. 
     1553  --with-gnutls=DIR       Specify alternate GnuTLS prefix 
    15581554  --with-opencore-amrnb=DIR 
    15591555                          This option is obsolete and replaced by 
     
    78607856 
    78617857 
    7862 if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno"; then 
     7858 
     7859# Check whether --with-gnutls was given. 
     7860if test "${with_gnutls+set}" = set; then : 
     7861  withval=$with_gnutls; 
     7862else 
     7863  with_gnutls=no 
     7864 
     7865fi 
     7866 
     7867 
     7868if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno" -a "x$with_gnutls" = "xno"; then 
    78637869    enable_ssl=no 
    78647870fi 
     
    78667872 
    78677873ac_ssl_has_aes_gcm=0 
     7874 
    78687875 
    78697876# Check whether --enable-ssl was given. 
     
    78787885else 
    78797886 
    7880                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 
    7881 $as_echo "checking for OpenSSL installations.." >&6; } 
    78827887                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 
    78837888                    CFLAGS="$CFLAGS -I$with_ssl/include" 
     
    78877892                fi 
    78887893 
    7889  
    7890  
    7891                 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" 
     7894                if test "x$with_gnutls" = "xno"; then 
     7895 
     7896                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for OpenSSL installations.." >&5 
     7897$as_echo "checking for OpenSSL installations.." >&6; } 
     7898 
     7899 
     7900 
     7901                    ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" 
    78927902if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : 
    78937903  openssl_h_present=1 
     
    78957905 
    78967906 
    7897                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 
     7907                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_BIO_strings in -lcrypto" >&5 
    78987908$as_echo_n "checking for ERR_load_BIO_strings in -lcrypto... " >&6; } 
    78997909if ${ac_cv_lib_crypto_ERR_load_BIO_strings+:} false; then : 
     
    79357945fi 
    79367946 
    7937                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 
     7947                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 
    79387948$as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } 
    79397949if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : 
     
    79757985fi 
    79767986 
    7977                 if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 
     7987                    if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 
    79787988                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL library found, SSL support enabled" >&5 
    79797989$as_echo "OpenSSL library found, SSL support enabled" >&6; } 
     
    80518061                        $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h 
    80528062 
    8053                 else 
    8054                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found, disabling SSL support **" >&5 
    8055 $as_echo "** OpenSSL libraries not found, disabling SSL support **" >&6; } 
     8063                        $as_echo "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_OPENSSL" >>confdefs.h 
     8064 
     8065                        ac_ssl_backend="openssl" 
     8066                    else 
     8067                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** OpenSSL libraries not found **" >&5 
     8068$as_echo "** OpenSSL libraries not found **" >&6; } 
     8069                    fi 
     8070 
    80568071                fi 
     8072 
     8073                if test "x$ac_ssl_backend" = "x"; then 
     8074 
     8075                    if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then 
     8076                        CFLAGS="$CFLAGS -I$with_gnutls/include" 
     8077                        LDFLAGS="$LDFLAGS -L$with_gnutls/lib" 
     8078                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using GnuTLS prefix... $with_gnutls" >&5 
     8079$as_echo "Using GnuTLS prefix... $with_gnutls" >&6; } 
     8080                    fi 
     8081 
     8082                    for ac_prog in $host-pkg-config pkg-config "python pkgconfig.py" 
     8083do 
     8084  # Extract the first word of "$ac_prog", so it can be a program name with args. 
     8085set dummy $ac_prog; ac_word=$2 
     8086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 
     8087$as_echo_n "checking for $ac_word... " >&6; } 
     8088if ${ac_cv_prog_PKG_CONFIG+:} false; then : 
     8089  $as_echo_n "(cached) " >&6 
     8090else 
     8091  if test -n "$PKG_CONFIG"; then 
     8092  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. 
     8093else 
     8094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
     8095for as_dir in $PATH 
     8096do 
     8097  IFS=$as_save_IFS 
     8098  test -z "$as_dir" && as_dir=. 
     8099    for ac_exec_ext in '' $ac_executable_extensions; do 
     8100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
     8101    ac_cv_prog_PKG_CONFIG="$ac_prog" 
     8102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 
     8103    break 2 
     8104  fi 
     8105done 
     8106  done 
     8107IFS=$as_save_IFS 
     8108 
     8109fi 
     8110fi 
     8111PKG_CONFIG=$ac_cv_prog_PKG_CONFIG 
     8112if test -n "$PKG_CONFIG"; then 
     8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 
     8114$as_echo "$PKG_CONFIG" >&6; } 
     8115else 
     8116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
     8117$as_echo "no" >&6; } 
     8118fi 
     8119 
     8120 
     8121  test -n "$PKG_CONFIG" && break 
     8122done 
     8123test -n "$PKG_CONFIG" || PKG_CONFIG="none" 
     8124 
     8125                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for GnuTLS installations.." >&5 
     8126$as_echo "checking for GnuTLS installations.." >&6; } 
     8127 
     8128 
     8129                    ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" 
     8130if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : 
     8131  gnutls_h_present=1 
     8132fi 
     8133 
     8134 
     8135 
     8136                    if test "$PKG_CONFIG" != "none"; then 
     8137                        if $PKG_CONFIG --exists gnutls; then 
     8138                            LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" 
     8139                            libgnutls_present=1 
     8140                        else 
     8141                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_certificate_set_x509_system_trust in -lgnutls" >&5 
     8142$as_echo_n "checking for gnutls_certificate_set_x509_system_trust in -lgnutls... " >&6; } 
     8143if ${ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust+:} false; then : 
     8144  $as_echo_n "(cached) " >&6 
     8145else 
     8146  ac_check_lib_save_LIBS=$LIBS 
     8147LIBS="-lgnutls  $LIBS" 
     8148cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     8149/* end confdefs.h.  */ 
     8150 
     8151/* Override any GCC internal prototype to avoid an error. 
     8152   Use char because int might match the return type of a GCC 
     8153   builtin and then its argument prototype would still apply.  */ 
     8154#ifdef __cplusplus 
     8155extern "C" 
     8156#endif 
     8157char gnutls_certificate_set_x509_system_trust (); 
     8158int 
     8159main () 
     8160{ 
     8161return gnutls_certificate_set_x509_system_trust (); 
     8162  ; 
     8163  return 0; 
     8164} 
     8165_ACEOF 
     8166if ac_fn_c_try_link "$LINENO"; then : 
     8167  ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=yes 
     8168else 
     8169  ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust=no 
     8170fi 
     8171rm -f core conftest.err conftest.$ac_objext \ 
     8172    conftest$ac_exeext conftest.$ac_ext 
     8173LIBS=$ac_check_lib_save_LIBS 
     8174fi 
     8175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&5 
     8176$as_echo "$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" >&6; } 
     8177if test "x$ac_cv_lib_gnutls_gnutls_certificate_set_x509_system_trust" = xyes; then : 
     8178  libgnutls_present=1 && 
     8179                              LIBS="$LIBS -lgnutls" 
     8180fi 
     8181 
     8182                        fi 
     8183                    else 
     8184                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&5 
     8185$as_echo "*** Warning: neither pkg-config nor python is available, disabling gnutls. ***" >&6; } 
     8186                    fi 
     8187 
     8188                    if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then 
     8189                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: GnuTLS library found, SSL support enabled" >&5 
     8190$as_echo "GnuTLS library found, SSL support enabled" >&6; } 
     8191                        $as_echo "#define PJ_HAS_SSL_SOCK 1" >>confdefs.h 
     8192 
     8193                        $as_echo "#define PJ_SSL_SOCK_IMP PJ_SSL_SOCK_IMP_GNUTLS" >>confdefs.h 
     8194 
     8195                        ac_ssl_backend="gnutls" 
     8196                    else 
     8197                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5 
     8198$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; } 
     8199                    fi 
     8200 
     8201                fi 
    80578202 
    80588203fi 
  • pjproject/trunk/aconfigure.ac

    r5679 r5725  
    15421542AC_ARG_WITH(ssl, 
    15431543    AS_HELP_STRING([--with-ssl=DIR], 
    1544                    [Specify alternate libssl prefix]), 
     1544                   [Specify alternate SSL library prefix. This option will try 
     1545                    to find OpenSSL first, then if not found, GnuTLS. To skip 
     1546                    OpenSSL finding, use --with-gnutls option instead.]), 
    15451547    [], 
    15461548    [with_ssl=no] 
    15471549    ) 
    15481550 
     1551dnl # GnuTLS alt prefix 
     1552AC_ARG_WITH(gnutls, 
     1553    AS_HELP_STRING([--with-gnutls=DIR], 
     1554                   [Specify alternate GnuTLS prefix]), 
     1555    [], 
     1556    [with_gnutls=no] 
     1557    ) 
     1558 
    15491559dnl # Do not use default SSL installation if we are cross-compiling 
    1550 if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno"; then 
     1560if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno" -a "x$with_gnutls" = "xno"; then 
    15511561    enable_ssl=no 
    15521562fi 
     
    15551565AC_SUBST(ac_no_ssl) 
    15561566AC_SUBST(ac_ssl_has_aes_gcm,0) 
     1567AC_SUBST(ac_ssl_backend) 
    15571568AC_ARG_ENABLE(ssl, 
    15581569              AS_HELP_STRING([--disable-ssl], 
     
    15661577              ], 
    15671578              [ 
    1568                 AC_MSG_RESULT([checking for OpenSSL installations..]) 
    15691579                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 
    15701580                    CFLAGS="$CFLAGS -I$with_ssl/include" 
     
    15721582                    AC_MSG_RESULT([Using SSL prefix... $with_ssl]) 
    15731583                fi 
    1574                 AC_SUBST(openssl_h_present) 
    1575                 AC_SUBST(libssl_present) 
    1576                 AC_SUBST(libcrypto_present) 
    1577                 AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) 
    1578                 AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) 
    1579                 AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) 
    1580                 if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 
     1584 
     1585                if test "x$with_gnutls" = "xno"; then 
     1586 
     1587                    AC_MSG_RESULT([checking for OpenSSL installations..]) 
     1588                    AC_SUBST(openssl_h_present) 
     1589                    AC_SUBST(libssl_present) 
     1590                    AC_SUBST(libcrypto_present) 
     1591                    AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) 
     1592                    AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) 
     1593                    AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) 
     1594                    if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 
    15811595                        AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) 
    15821596                         
     
    15991613                        #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) 
    16001614                        AC_DEFINE(PJ_HAS_SSL_SOCK, 1) 
    1601                 else 
    1602                         AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **]) 
     1615                        AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_OPENSSL) 
     1616                        ac_ssl_backend="openssl" 
     1617                    else 
     1618                        AC_MSG_RESULT([** OpenSSL libraries not found **]) 
     1619                    fi 
     1620                 
    16031621                fi 
     1622                 
     1623                if test "x$ac_ssl_backend" = "x"; then 
     1624 
     1625                    if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then 
     1626                        CFLAGS="$CFLAGS -I$with_gnutls/include" 
     1627                        LDFLAGS="$LDFLAGS -L$with_gnutls/lib" 
     1628                        AC_MSG_RESULT([Using GnuTLS prefix... $with_gnutls]) 
     1629                    fi 
     1630 
     1631                    AC_CHECK_PROGS(PKG_CONFIG, 
     1632                       $host-pkg-config pkg-config "python pkgconfig.py", 
     1633                       none) 
     1634                    AC_MSG_RESULT([checking for GnuTLS installations..]) 
     1635                    AC_SUBST(gnutls_h_present) 
     1636                    AC_SUBST(libgnutls_present) 
     1637                    AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) 
     1638 
     1639                    if test "$PKG_CONFIG" != "none"; then 
     1640                        if $PKG_CONFIG --exists gnutls; then 
     1641                            LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" 
     1642                            libgnutls_present=1 
     1643                        else 
     1644                            AC_CHECK_LIB(gnutls, 
     1645                             gnutls_certificate_set_x509_system_trust, 
     1646                             [libgnutls_present=1 && 
     1647                              LIBS="$LIBS -lgnutls"]) 
     1648                        fi 
     1649                    else 
     1650                        AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) 
     1651                    fi 
     1652 
     1653                    if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then 
     1654                        AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) 
     1655                        AC_DEFINE(PJ_HAS_SSL_SOCK, 1) 
     1656                        AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS) 
     1657                        ac_ssl_backend="gnutls" 
     1658                    else 
     1659                        AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) 
     1660                    fi 
     1661                 
     1662                fi 
    16041663              ]) 
    16051664 
  • pjproject/trunk/pjlib/build/Makefile

    r5445 r5725  
    3636        os_info.o pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \ 
    3737        rbtree.o sock_common.o sock_qos_common.o \ 
    38         ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \ 
     38        ssl_sock_common.o ssl_sock_ossl.o ssl_sock_gtls.o ssl_sock_dump.o \ 
    3939        string.o timer.o types.o 
    4040export PJLIB_CFLAGS += $(_CFLAGS) 
  • pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in

    r5543 r5725  
    220220#undef PJ_HAS_SSL_SOCK 
    221221#endif 
     222#ifndef PJ_SSL_SOCK_IMP 
     223#   define PJ_SSL_SOCK_IMP      PJ_SSL_SOCK_IMP_NONE 
     224#endif 
    222225 
    223226 
  • pjproject/trunk/pjlib/include/pj/config.h

    r5719 r5725  
    913913/** 
    914914 * Enable secure socket. For most platforms, this is implemented using 
    915  * OpenSSL, so this will require OpenSSL to be installed. For Symbian 
    916  * platform, this is implemented natively using CSecureSocket. 
     915 * OpenSSL or GnuTLS, so this will require one of those libraries to 
     916 * be installed. For Symbian platform, this is implemented natively 
     917 * using CSecureSocket. 
    917918 * 
    918919 * Default: 0 (for now) 
     
    920921#ifndef PJ_HAS_SSL_SOCK 
    921922#  define PJ_HAS_SSL_SOCK           0 
     923#endif 
     924 
     925 
     926/* 
     927 * Secure socket implementation. 
     928 * Select one of these implementations in PJ_SSL_SOCK_IMP. 
     929 */ 
     930#define PJ_SSL_SOCK_IMP_NONE        0   /**< Disable SSL socket.    */ 
     931#define PJ_SSL_SOCK_IMP_OPENSSL     1   /**< Using OpenSSL.         */ 
     932#define PJ_SSL_SOCK_IMP_GNUTLS      2   /**< Using GnuTLS.          */ 
     933 
     934 
     935/** 
     936 * Select which SSL socket implementation to use. Currently pjlib supports 
     937 * PJ_SSL_SOCK_IMP_OPENSSL, which uses OpenSSL, and PJ_SSL_SOCK_IMP_GNUTLS, 
     938 * which uses GnuTLS. Setting this to PJ_SSL_SOCK_IMP_NONE will disable 
     939 * secure socket. 
     940 * 
     941 * Default is PJ_SSL_SOCK_IMP_NONE 
     942 */ 
     943#ifndef PJ_SSL_SOCK_IMP 
     944#   define PJ_SSL_SOCK_IMP                  PJ_SSL_SOCK_IMP_NONE 
    922945#endif 
    923946 
  • pjproject/trunk/pjlib/include/pj/ssl_sock.h

    r5472 r5725  
    184184    pj_str_t raw;                   /**< Raw certificate in PEM format, only 
    185185                                         available for remote certificate. */ 
     186 
     187    struct { 
     188        unsigned        cnt;        /**< # of entry     */ 
     189        pj_str_t       *cert_raw; 
     190    } raw_chain; 
    186191 
    187192} pj_ssl_cert_info; 
  • pjproject/trunk/pjlib/src/pj/ssl_sock_common.c

    r5472 r5725  
    3636    param->concurrency = -1; 
    3737    param->whole_data = PJ_TRUE; 
     38#if (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_GNUTLS) 
     39    /* GnuTLS is allowed to send bigger chunks.*/ 
     40    param->send_buffer_size = 65536; 
     41#else 
    3842    param->send_buffer_size = 8192; 
     43#endif 
    3944#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0 
    4045    param->read_buffer_size = 1500; 
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r5678 r5725  
    3333 
    3434 
    35 /* Only build when PJ_HAS_SSL_SOCK is enabled */ 
    36 #if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK!=0 
     35/* Only build when PJ_HAS_SSL_SOCK is enabled and when the backend is 
     36 * OpenSSL. 
     37 */ 
     38#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \ 
     39    (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL) 
    3740 
    3841#define THIS_FILE               "ssl_sock_ossl.c" 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r5670 r5725  
    3232#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    3333 
    34 #if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0) 
     34#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \ 
     35    (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL) 
    3536#  include <openssl/rand.h> 
    3637#  include <openssl/opensslv.h> 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_sdes.c

    r5635 r5725  
    123123 
    124124        do { 
    125 #if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0) 
     125#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0) && \ 
     126    (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL) 
    126127            int err = RAND_bytes((unsigned char*)key, 
    127128                                 crypto_suites[cs_idx].cipher_key_len); 
Note: See TracChangeset for help on using the changeset viewer.