mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 21:28:08 +00:00
update STUN/fix unix compilation
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@228 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
c454ab0ecb
commit
cf75662660
4 changed files with 10 additions and 29 deletions
|
|
@ -233,7 +233,12 @@ if test $GCC = yes && test $wall_werror = yes; then
|
|||
CFLAGS="$CFLAGS -Werror "
|
||||
fi
|
||||
|
||||
ORTPDEPS_LIBS="$ORTPDEPS_LIBS $PTHREAD_LIBS $PTHREAD_LDFLAGS $SRTP_LIBS"
|
||||
AC_CHECK_LIB(ssl,SSL_CTX_new,[SSL_LIBS="-lssl"])
|
||||
AC_CHECK_LIB(crypto,MD5,[SSL_LIBS="$SSL_LIBS -lcrypto"])
|
||||
|
||||
AC_SUBST(SSL_LIBS)
|
||||
|
||||
ORTPDEPS_LIBS="$ORTPDEPS_LIBS $PTHREAD_LIBS $PTHREAD_LDFLAGS $SRTP_LIBS $SSL_LIBS"
|
||||
ORTPDEPS_CFLAGS="$ORTPDEPS_CFLAGS $PTHREAD_CFLAGS $ORTP_DEFS $SRTP_CFLAGS"
|
||||
CFLAGS="$CFLAGS $ORTP_DEFS"
|
||||
echo "$ORTPDEPS_CFLAGS" > ortp.defs
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ libortp_la_SOURCES= str_utils.c \
|
|||
b64.c
|
||||
|
||||
|
||||
libortp_la_LIBADD= $(PTHREAD_LIBS) -lm $(SRTP_LIBS)
|
||||
libortp_la_LIBADD= $(PTHREAD_LIBS) -lm $(SRTP_LIBS) $(SSL_LIBS)
|
||||
|
||||
libortp_la_LDFLAGS= -version-info $(LIBORTP_SO_VERSION)
|
||||
|
||||
|
|
|
|||
|
|
@ -1198,10 +1198,10 @@ computeHmac_longterm(char* hmac, const char* input, int length,
|
|||
{
|
||||
unsigned int resultSize=0;
|
||||
unsigned char HA1[16];
|
||||
unsigned char HA1_text[1024];
|
||||
char HA1_text[1024];
|
||||
|
||||
snprintf(HA1_text, sizeof(HA1_text), "%s:%s:%s", username, realm, password);
|
||||
MD5(HA1_text, strlen(HA1_text), HA1);
|
||||
MD5((unsigned char *)HA1_text, strlen(HA1_text), HA1);
|
||||
|
||||
HMAC(EVP_sha1(),
|
||||
HA1, 16,
|
||||
|
|
@ -1220,28 +1220,6 @@ computeHmac_shortterm(char* hmac, const char* input, int length, const char* key
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
toHex(const char* buffer, int bufferSize, char* output)
|
||||
{
|
||||
int i;
|
||||
static char hexmap[] = "0123456789abcdef";
|
||||
|
||||
const char* p = buffer;
|
||||
char* r = output;
|
||||
for (i=0; i < bufferSize; i++)
|
||||
{
|
||||
unsigned char temp = *p++;
|
||||
|
||||
int hi = (temp & 0xf0)>>4;
|
||||
int low = (temp & 0xf);
|
||||
|
||||
*r++ = hexmap[hi];
|
||||
*r++ = hexmap[low];
|
||||
}
|
||||
*r = 0;
|
||||
}
|
||||
|
||||
UInt64
|
||||
stunGetSystemTimeSecs(void)
|
||||
{
|
||||
|
|
@ -2566,8 +2544,6 @@ turnSendAllocate( Socket myFd, StunAddress4 *dest,
|
|||
const StunAtrString *username, const StunAtrString *password,
|
||||
StunMessage *resp)
|
||||
{
|
||||
bool_t discard=FALSE;
|
||||
|
||||
StunMessage req;
|
||||
char buf[STUN_MAX_MESSAGE_SIZE];
|
||||
int len = STUN_MAX_MESSAGE_SIZE;
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ rtpsend_stupid_SOURCES=rtpsend_stupid.c
|
|||
|
||||
AM_CFLAGS= -D_ORTP_SOURCE $(PTHREAD_CFLAGS)
|
||||
AM_LDFLAGS= $(PTHREAD_LDFLAGS)
|
||||
LDADD=$(top_builddir)/src/libortp.la $(SRTP_LIBS)
|
||||
LDADD=$(top_builddir)/src/libortp.la $(SRTP_LIBS) $(SSL_LIBS)
|
||||
INCLUDES=-I$(top_srcdir)/include/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue