[svn-commits] twilson: branch group/srtp r165141 - in /team/group/srtp: ./ include/asterisk...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 17 11:34:15 CST 2008


Author: twilson
Date: Wed Dec 17 11:34:14 2008
New Revision: 165141

URL: http://svn.digium.com/view/asterisk?view=rev&rev=165141
Log:
Use AST_EXT_LIB_CHECK instead of the minisip functions so configure doesn't die if minisip libraries are not installed.

Remove some unused functions, and make menuselect happier

Modified:
    team/group/srtp/configure
    team/group/srtp/configure.ac
    team/group/srtp/include/asterisk/autoconfig.h.in
    team/group/srtp/makeopts.in
    team/group/srtp/res/mikey.cc
    team/group/srtp/res/res_mikey.c
    team/group/srtp/res/res_srtp.c

Modified: team/group/srtp/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/srtp/configure.ac?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/configure.ac (original)
+++ team/group/srtp/configure.ac Wed Dec 17 11:34:14 2008
@@ -1591,17 +1591,10 @@
    fi
 fi
 
-dnl Minisip
-AM_MINISIP_CHECK_LIBMUTIL([0.3.1], [PBX_MUTIL=1], [PBX_MUTIL=0])
-AM_MINISIP_CHECK_LIBMNETUTIL([0.3.1], [PBX_MNETUTIL=1], [PBX_MNETUTIL=0])
-AM_MINISIP_CHECK_LIBMCRYPTO([0.3.1], [PBX_MCRYPTO=1], [PBX_MCRYPTO=0])
-AM_MINISIP_CHECK_LIBMIKEY([0.4.1], [PBX_MIKEY=1], [PBX_MIKEY=0])
-AM_MINISIP_CHECK_COMPLETE
-
-AC_SUBST([PBX_MUTIL])
-AC_SUBST([PBX_MNETUTIL])
-AC_SUBST([PBX_MCRYPTO])
-AC_SUBST([PBX_MIKEY])
+AST_EXT_LIB_CHECK([MUTIL], [mutil], [], [libmutil/stringutils.h], [-lmutil])
+AST_EXT_LIB_CHECK([MNETUTIL], [mnetutil], [], [libmnetutil/init.h], [-lmnetutil])
+AST_EXT_LIB_CHECK([MCRYPTO], [mcrypto], [], [libmcrypto/SipSimSoft.h], [-lmcrypto])
+AST_EXT_LIB_CHECK([MIKEY], [mikey], [], [libmikey/Mikey.h], [-lmikey])
 
 AC_LANG_POP
 

Modified: team/group/srtp/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/group/srtp/include/asterisk/autoconfig.h.in?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/include/asterisk/autoconfig.h.in (original)
+++ team/group/srtp/include/asterisk/autoconfig.h.in Wed Dec 17 11:34:14 2008
@@ -422,18 +422,6 @@
 /* Define to 1 if you have the <libintl.h> header file. */
 #undef HAVE_LIBINTL_H
 
-/* Define to 1 if you have the `mcrypto' library (-lmcrypto). */
-#undef HAVE_LIBMCRYPTO
-
-/* Define to 1 if you have the `mikey' library (-lmikey). */
-#undef HAVE_LIBMIKEY
-
-/* Define to 1 if you have the `mnetutil' library (-lmnetutil). */
-#undef HAVE_LIBMNETUTIL
-
-/* Define to 1 if you have the `mutil' library (-lmutil). */
-#undef HAVE_LIBMUTIL
-
 /* Define if your system has the LIBXML2 libraries. */
 #undef HAVE_LIBXML2
 
@@ -500,6 +488,12 @@
 /* Define to 1 if you have the <malloc.h> header file. */
 #undef HAVE_MALLOC_H
 
+/* Define this to indicate the ${MCRYPTO_DESCRIP} library */
+#undef HAVE_MCRYPTO
+
+/* Define to indicate the ${MCRYPTO_DESCRIP} library version */
+#undef HAVE_MCRYPTO_VERSION
+
 /* Define to 1 if you have the `memchr' function. */
 #undef HAVE_MEMCHR
 
@@ -512,6 +506,12 @@
 /* Define to 1 if you have the `memset' function. */
 #undef HAVE_MEMSET
 
+/* Define this to indicate the ${MIKEY_DESCRIP} library */
+#undef HAVE_MIKEY
+
+/* Define to indicate the ${MIKEY_DESCRIP} library version */
+#undef HAVE_MIKEY_VERSION
+
 /* Define this to indicate the ${MISDN_DESCRIP} library */
 #undef HAVE_MISDN
 
@@ -536,8 +536,20 @@
 /* Define to 1 if you have a working `mmap' system call. */
 #undef HAVE_MMAP
 
+/* Define this to indicate the ${MNETUTIL_DESCRIP} library */
+#undef HAVE_MNETUTIL
+
+/* Define to indicate the ${MNETUTIL_DESCRIP} library version */
+#undef HAVE_MNETUTIL_VERSION
+
 /* Define to 1 if you have the `munmap' function. */
 #undef HAVE_MUNMAP
+
+/* Define this to indicate the ${MUTIL_DESCRIP} library */
+#undef HAVE_MUTIL
+
+/* Define to indicate the ${MUTIL_DESCRIP} library version */
+#undef HAVE_MUTIL_VERSION
 
 /* Define this to indicate the ${NBS_DESCRIP} library */
 #undef HAVE_NBS

Modified: team/group/srtp/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/group/srtp/makeopts.in?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/makeopts.in (original)
+++ team/group/srtp/makeopts.in Wed Dec 17 11:34:14 2008
@@ -121,17 +121,17 @@
 LUA_INCLUDE=@LUA_INCLUDE@
 LUA_LIB=@LUA_LIB@
 
-MUTIL_INCLUDE=@MUTIL_CFLAGS@
-MUTIL_LIB=@MUTIL_LIBS@
-
-MNETUTIL_INCLUDE=@MNETUTIL_CFLAGS@
-MNETUTIL_LIB=@MNETUTIL_LIBS@
-
-MCRYPTO_INCLUDE=@MCRYPTO_CFLAGS@
-MCRYPTO_LIB=@MCRYPTO_LIBS@
-
-MIKEY_INCLUDE=@MIKEY_CFLAGS@
-MIKEY_LIB=@MIKEY_LIBS@
+MUTIL_INCLUDE=@MUTIL_INCLUDE@
+MUTIL_LIB=@MUTIL_LIB@
+
+MNETUTIL_INCLUDE=@MNETUTIL_INCLUDE@
+MNETUTIL_LIB=@MNETUTIL_LIB@
+
+MCRYPTO_INCLUDE=@MCRYPTO_INCLUDE@
+MCRYPTO_LIB=@MCRYPTO_LIB@
+
+MIKEY_INCLUDE=@MIKEY_INCLUDE@
+MIKEY_LIB=@MIKEY_LIB@
 
 NBS_INCLUDE=@NBS_INCLUDE@
 NBS_LIB=@NBS_LIB@

Modified: team/group/srtp/res/mikey.cc
URL: http://svn.digium.com/view/asterisk/team/group/srtp/res/mikey.cc?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/res/mikey.cc (original)
+++ team/group/srtp/res/mikey.cc Wed Dec 17 11:34:14 2008
@@ -58,11 +58,7 @@
 
 
 // local functions
-/*
-static int message_to_base64(MRef<MikeyMessage *> msg,
-			     char *buf, size_t buflen);*/
 static int string_to_buf(const string &msg, char *buf, size_t buflen);
-/* static void dump_hex(unsigned char *buf, size_t bufsize); */
 static int getPolicyParamTypeValue(MikeyPayloadSP *policy, uint8_t type,
 				   uint8_t *value);
 static void dump_policy(MikeyPayloadSP *sp);
@@ -182,20 +178,6 @@
 // Local functions
 // 
 
-#if 0
-static int message_to_base64(MRef<MikeyMessage *> msg, char *buf, size_t buflen)
-{
-	const string base64 = msg->b64Message();
-
-	if (buflen <= base64.size())
-		return -1;
-
-	strncpy(buf, base64.c_str(), buflen);
-//   printf("message_to_base64 '%s'\n", buf);
-	return base64.size();
-}
-#endif
-
 static int string_to_buf(const string &msg, char *buf, size_t buflen)
 {
 	if (buflen <= msg.size())
@@ -208,40 +190,6 @@
 
 
 #define dump_var(name) printf("Var: %10s = %08x\n", #name, name);
-
-#if 0
-static void dump_hex(unsigned char *buf, size_t bufsize)
-{
-	int i;
-	size_t start_pos = 0;
-
-	while(start_pos < bufsize) {
-		size_t pos;
-
-		printf("%04lx ", start_pos);
-
-		for (i = 0, pos = start_pos; i < 16 && pos < bufsize; i++,pos++) {
-			printf("%02x ", buf[pos]);
-			if (i == 7)
-				printf(" ");
-		}
-
-		printf(" ");
-
-		for (i = 0, pos = start_pos; i < 16 && pos < bufsize; i++,pos++) {
-			int c = buf[pos];
-
-			if (isalnum(c))
-				printf("%c", c);
-			else
-				printf(".");
-		}
-
-		printf("\n");
-		start_pos += 16;
-	}
-}
-#endif
 
 static int getPolicyParamTypeValue(MikeyPayloadSP *policy, uint8_t type,
 				   uint8_t *value)
@@ -635,7 +583,7 @@
 
 #ifdef DEBUG_OUTPUT
 	cerr << "SSRC: "<< ssrc <<" - TEK: " << binToHex(key, sizeof(key)) << endl;
-	cerr << "SSRC: "<< ssrc <<" - SALT: " << binToHex(salt, sizeof(salt) )<< endl;
+	cerr << "SSRC: "<< ssrc <<" - SALT: " << binToHex(salt, sizeof(salt)) << endl;
 #endif
 
 	if (ast_srtp_policy_set_master_key(policy, key, sizeof(key),

Modified: team/group/srtp/res/res_mikey.c
URL: http://svn.digium.com/view/asterisk/team/group/srtp/res/res_mikey.c?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/res/res_mikey.c (original)
+++ team/group/srtp/res/res_mikey.c Wed Dec 17 11:34:14 2008
@@ -23,6 +23,8 @@
  * Specified in RFC 3830, 4650 and 4738.
  * 
  * \author Mikael Magnusson <mikma at users.sourceforge.net>
+ *
+ * \extref Depends on the libraries included with minisip - http://minisip.org
  */
 
 /*** MODULEINFO
@@ -30,7 +32,7 @@
          <depend>mnetutil</depend>
          <depend>mcrypto</depend>
          <depend>mikey</depend>
-***/
+ ***/
 
 #include"asterisk.h"
 
@@ -39,7 +41,7 @@
 #include<asterisk/module.h>
 #include"mikey.h"
 
-#define DESCRIPTION "Multimedia Internet KEYing (MIKEY)"
+
 
 /* extern struct ast_mikey_res g_mikey_res; */
 
@@ -77,7 +79,7 @@
 	return res;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, DESCRIPTION,
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Multimedia Internet KEYing (MIKEY)",
 		.load = load_module,
 		.unload = unload_module,
 		);

Modified: team/group/srtp/res/res_srtp.c
URL: http://svn.digium.com/view/asterisk/team/group/srtp/res/res_srtp.c?view=diff&rev=165141&r1=165140&r2=165141
==============================================================================
--- team/group/srtp/res/res_srtp.c (original)
+++ team/group/srtp/res/res_srtp.c Wed Dec 17 11:34:14 2008
@@ -59,8 +59,6 @@
 #include "asterisk/module.h"
 #include "asterisk/options.h"
 #include "asterisk/rtp.h"
-
-#define DESCRIPTION "Secure RTP (SRTP)"
 
 struct ast_srtp {
 	struct ast_rtp *rtp;
@@ -563,7 +561,7 @@
 	return 1;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, DESCRIPTION,
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Secure RTP (SRTP)",
 		.load = load_module,
 		.unload = unload_module,
 /*		.reload = reload, */




More information about the svn-commits mailing list