|
From: <s-v...@us...> - 2014-01-15 20:55:52
|
Revision: 245
http://sourceforge.net/p/turnserver/code/245
Author: s-vincent
Date: 2014-01-15 20:55:48 +0000 (Wed, 15 Jan 2014)
Log Message:
-----------
Fixes tests compilation.
Modified Paths:
--------------
trunk/test/Makefile.am
trunk/test/check_account.c
trunk/test/check_allocation.c
trunk/test/check_turn.c
Modified: trunk/test/Makefile.am
===================================================================
--- trunk/test/Makefile.am 2014-01-15 20:46:52 UTC (rev 244)
+++ trunk/test/Makefile.am 2014-01-15 20:55:48 UTC (rev 245)
@@ -8,6 +8,8 @@
$(top_builddir)/src/protocol.h \
$(top_builddir)/src/util_sys.h \
$(top_builddir)/src/util_sys.c \
+ $(top_builddir)/src/util_net.h \
+ $(top_builddir)/src/util_net.c \
$(top_builddir)/src/util_crypto.h \
$(top_builddir)/src/util_crypto.c \
$(top_builddir)/src/tls_peer.h \
@@ -31,10 +33,13 @@
$(top_builddir)/src/protocol.c \
$(top_builddir)/src/util_sys.h \
$(top_builddir)/src/util_sys.c \
+ $(top_builddir)/src/util_net.h \
+ $(top_builddir)/src/util_net.c \
$(top_builddir)/src/util_crypto.h \
$(top_builddir)/src/util_crypto.c \
$(top_builddir)/src/tls_peer.h \
$(top_builddir)/src/tls_peer.c
+
check_account_CFLAGS = @CHECK_CFLAGS@
check_account_LDADD = @CHECK_LIBS@
Modified: trunk/test/check_account.c
===================================================================
--- trunk/test/check_account.c 2014-01-15 20:46:52 UTC (rev 244)
+++ trunk/test/check_account.c 2014-01-15 20:55:48 UTC (rev 245)
@@ -76,7 +76,7 @@
struct account_desc* ret2 = NULL;
struct account_desc* ret3 = NULL;
- INIT_LIST(account_list);
+ list_head_init(&account_list);
/* create a valid account descriptor */
ret = account_desc_new("login", "password", "domain.org", AUTHORIZED);
Modified: trunk/test/check_allocation.c
===================================================================
--- trunk/test/check_allocation.c 2014-01-15 20:46:52 UTC (rev 244)
+++ trunk/test/check_allocation.c 2014-01-15 20:55:48 UTC (rev 245)
@@ -89,7 +89,7 @@
memcpy(&relayed_addr2, &server_addr, sizeof(server_addr));
relayed_addr2.sin_port = htons(48005);
- INIT_LIST(allocation_list);
+ list_head_init(&allocation_list);
/* create a valid allocation descriptor */
ret = allocation_desc_new(id, IPPROTO_UDP, "login", key, realm, nonce,
Modified: trunk/test/check_turn.c
===================================================================
--- trunk/test/check_turn.c 2014-01-15 20:46:52 UTC (rev 244)
+++ trunk/test/check_turn.c 2014-01-15 20:55:48 UTC (rev 245)
@@ -233,7 +233,7 @@
* HMAC-SHA1
*/
/* index -1 because we do not take into account MESSAGE-INTEGRITY attribute */
- md5_generate(md_buf, "login:domain.org:password",
+ crypto_md5_generate(md_buf, "login:domain.org:password",
strlen("login:domain.org:password"));
turn_calculate_integrity_hmac_iov(iov, index - 1, md_buf, sizeof(md_buf),
((struct turn_attr_message_integrity*)attr)->turn_attr_hmac);
@@ -248,7 +248,7 @@
strncpy(buf, "hello", 40);
buf[39] = 0x00;
- crc = crc32_generate(buf, strlen("hello"), 0);
+ crc = crypto_crc32_generate(buf, strlen("hello"), 0);
nb = memcmp(&crc, &crc_hello, sizeof(uint32_t));
fail_unless(nb == 0, "CRC32 failed!");
}
@@ -278,7 +278,7 @@
uint16_t len_save = hdr->turn_msg_len; /* store in big endian */
/* verify integrity with valid login/realm/password */
- md5_generate(md_buf, "login:domain.org:password",
+ crypto_md5_generate(md_buf, "login:domain.org:password",
strlen("login:domain.org:password"));
/* change length up to message integrity */
@@ -294,7 +294,7 @@
/* verify integrity with invalid login/realm/password */
memset(hashmac, 0x00, 20);
- md5_generate(md_buf, "login2:domain.org:password",
+ crypto_md5_generate(md_buf, "login2:domain.org:password",
strlen("login2:domain.org:password"));
turn_calculate_integrity_hmac_iov(iov, index - 2, md_buf, sizeof(md_buf),
hashmac);
@@ -314,7 +314,7 @@
"Fingerprint check");
}
- iovec_free_data(iov, index);
+ net_iovec_free_data(iov, index);
close(sock);
}
END_TEST
@@ -450,7 +450,7 @@
fail_unless(nb > 0, "sendmsg failed");
}
- iovec_free_data(iov, index);
+ net_iovec_free_data(iov, index);
close(sock);
}
END_TEST
@@ -639,7 +639,7 @@
* HMAC-SHA1
*/
/* index -1 because we do not take into account MESSAGE-INTEGRITY attribute */
- md5_generate(md_buf, "login:domain.org:password",
+ crypto_md5_generate(md_buf, "login:domain.org:password",
strlen("login:domain.org:password"));
turn_calculate_integrity_hmac_iov(iov, index - 1, md_buf, sizeof(md_buf),
((struct turn_attr_message_integrity*)attr)->turn_attr_hmac);
@@ -685,7 +685,7 @@
fail_unless(message.software != NULL, "software must be present");
fail_unless(message.error_code != NULL, "error_code must be present");
- iovec_free_data(iov, index);
+ net_iovec_free_data(iov, index);
}
END_TEST
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|