asterisk-13.x: revert to version 13.2.0 with AST-2015-003 fix
authorJiri Slachta <slachta@cesnet.cz>
Wed, 13 May 2015 12:05:36 +0000 (14:05 +0200)
committerJiri Slachta <slachta@cesnet.cz>
Wed, 13 May 2015 12:05:36 +0000 (14:05 +0200)
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
net/asterisk-13.x/Makefile
net/asterisk-13.x/patches/002-undef-res-ninit.patch
net/asterisk-13.x/patches/004-ifdef-missing-execinfo.patch
net/asterisk-13.x/patches/100-AST-2015-003-13.diff [new file with mode: 0644]

index 23f333f6c948cdee7e82c0371e69df7a849da6aa..36a0d4b168e7a186e92005b8151ef2a44c7e1839 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk13
-PKG_VERSION:=13.3.2
-PKG_RELEASE:=2
+PKG_VERSION:=13.2.0
+PKG_RELEASE:=4
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
-PKG_MD5SUM:=afc8a5b7fc239c7aa5692b563d7e6ed2
+PKG_MD5SUM:=36033a5faa2f0f9ac3bc34b799e823a2
 
 PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
 PKG_BUILD_DEPENDS:=libxml2/host
index e7ed74c971a015ca77c406c0e03ab607c28fdea8..de73db810ec93280dfab4de2818018ad0d11efeb 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1202,7 +1202,6 @@ AC_LINK_IFELSE(
+@@ -1177,7 +1177,6 @@ AC_LINK_IFELSE(
                        #include <resolv.h>],
                        [int foo = res_ninit(NULL);])],
        AC_MSG_RESULT(yes)
index 204d91dd92f73a012ef5929c3b939104446a4637..2cec5c02db13a49b54b068decb42e01f285ff844 100644 (file)
  #include <time.h>     /* we want to override localtime_r */
  #include <unistd.h>
  #include <string.h>
-@@ -540,13 +542,17 @@ extern void *_ast_mem_backtrace_buffer[_
+@@ -514,13 +516,17 @@ extern void *_ast_mem_backtrace_buffer[_
   * Ok, this sucks. But if we're already out of mem, we don't
   * want the logger to create infinite recursion (and a crash).
   */
diff --git a/net/asterisk-13.x/patches/100-AST-2015-003-13.diff b/net/asterisk-13.x/patches/100-AST-2015-003-13.diff
new file mode 100644 (file)
index 0000000..c10a186
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/main/tcptls.c
++++ b/main/tcptls.c
+@@ -640,9 +640,15 @@
+                                                       break;
+                                               }
+                                               str = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, pos));
+-                                              ASN1_STRING_to_UTF8(&str2, str);
++                                              ret = ASN1_STRING_to_UTF8(&str2, str);
++                                              if (ret < 0) {
++                                                      continue;
++                                              }
++
+                                               if (str2) {
+-                                                      if (!strcasecmp(tcptls_session->parent->hostname, (char *) str2)) {
++                                                      if (strlen((char *) str2) != ret) {
++                                                              ast_log(LOG_WARNING, "Invalid certificate common name length (contains NULL bytes?)\n");
++                                                      } else if (!strcasecmp(tcptls_session->parent->hostname, (char *) str2)) {
+                                                               found = 1;
+                                                       }
+                                                       ast_debug(3, "SSL Common Name compare s1='%s' s2='%s'\n", tcptls_session->parent->hostname, str2);