[tomcat-native] 01/04: Imported Upstream version 1.1.33

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon May 11 11:45:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to annotated tag debian/1.1.33-1
in repository tomcat-native.

commit 097bc576e3f236ae36f12441141bd003daceb0af
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon May 11 13:15:57 2015 +0200

    Imported Upstream version 1.1.33
---
 CHANGELOG.txt                                      |  17 +-
 NOTICE                                             |   2 +-
 jni/build.properties.default                       |   2 +-
 jni/build.xml                                      |   4 +-
 jni/docs/index.html                                |   6 +-
 jni/docs/miscellaneous/changelog.html              |  27 +-
 jni/docs/news/2008.html                            |   2 +-
 jni/docs/news/2009.html                            |   2 +-
 jni/docs/news/2010.html                            |   2 +-
 jni/docs/news/2011.html                            |   2 +-
 jni/docs/news/2012.html                            |   2 +-
 jni/docs/news/2013.html                            |   2 +-
 jni/docs/news/2014.html                            |   8 +-
 jni/java/org/apache/tomcat/jni/Library.java        |  43 ++-
 .../apache/tomcat/jni/LibraryNotFoundError.java    |  40 +++
 jni/java/org/apache/tomcat/jni/SSL.java            |   4 +-
 jni/jnirelease.sh                                  |  18 +-
 jni/native/build/apr_common.m4                     |   7 +-
 jni/native/build/config.guess                      | 306 ++++++---------------
 jni/native/build/config.sub                        |  21 +-
 jni/native/include/ssl_private.h                   |   8 +-
 jni/native/include/tcn_version.h                   |   4 +-
 jni/native/os/win32/libtcnative.rc                 |   6 +-
 jni/native/src/jnilib.c                            |   9 +-
 jni/native/src/multicast.c                         |  12 +-
 jni/native/src/poll.c                              |  22 +-
 jni/native/src/ssl.c                               |  10 +-
 jni/native/src/sslcontext.c                        |   4 +-
 jni/native/src/sslinfo.c                           |  12 +-
 jni/native/src/sslnetwork.c                        |   6 +-
 jni/native/src/sslutils.c                          |  15 +-
 jni/native/srclib/VERSIONS                         |   2 +-
 jni/native/srclib/apr/apr-enable-ipv6.patch        |   4 +-
 jni/native/tcnative.spec                           |   2 +-
 jni/xdocs/index.xml                                |   4 +-
 jni/xdocs/miscellaneous/changelog.xml              |  26 ++
 jni/xdocs/news/2014.xml                            |   6 +
 jni/xdocs/style.xsl                                |   2 +-
 38 files changed, 345 insertions(+), 326 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a344252..46f8f9a 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,8 +1,23 @@
+Preface
+
 This is the Changelog for Tomcat Native. This changelog does not contain all
 updates and fixes to the Tomcat Native (yet). It should contain fixes made only
 after December 19th 2007, when the new documentation project for Tomcat Native
 was started.
 
+Changes between 1.1.32 and 1.1.33
+
+  * Fix: Fix compilation failures with master branch of OpenSSL. Replace access
+    to OpenSSL internals by accessor functions. (rjung/kkolinko)
+  * Fix: Fix a zero-boundary-check compiler warning and simplify code in the
+    process. (rjung)
+  * Fix: Remove superfluous semicolons after close-braces to eliminate compiler
+    warnings. (schultz)
+  * Fix: 57653: Fix crash when multiple events for same socket are returned via
+    separate apr_pollfd_t structures. (markt)
+  * Fix: Enable building with OpenSSL 1.0.2 onwards. (billbarker)
+  * Update: Use OpenSSL 1.0.1m with Windows binaries. (markt)
+
 Changes between 1.1.31 and 1.1.32
 
   * Fix: 53952: Add support for TLSv1.2 and TLSv1.1. Patch provided by Marcel
@@ -175,4 +190,4 @@ Changes between 1.1.11 and 1.1.12
     layer. (jfclere)
   * Fix: 44087: Fix it. (jfclere)
 
-Copyright (C) 2008-2014, The Apache Software Foundation
+Copyright (C) 2008-2015, The Apache Software Foundation
diff --git a/NOTICE b/NOTICE
index c2c34d0..78df32c 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Tomcat Native Library
-Copyright 2002-2014 The Apache Software Foundation
+Copyright 2002-2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/jni/build.properties.default b/jni/build.properties.default
index 0e7d03e..0a8df52 100644
--- a/jni/build.properties.default
+++ b/jni/build.properties.default
@@ -18,7 +18,7 @@
 # ----- Version Control Flags -----
 version.major=1
 version.minor=1
-version.build=32
+version.build=33
 version.patch=0
 version.suffix=-dev
 
diff --git a/jni/build.xml b/jni/build.xml
index 91709a1..244348e 100644
--- a/jni/build.xml
+++ b/jni/build.xml
@@ -30,7 +30,7 @@
     <property name="project"               value="tomcat-native" />
     <property name="name"                  value="Tomcat Native" />
     <property name="title"                 value="Tomcat Native Library"/>
-    <property name="year"                  value="2014" />
+    <property name="year"                  value="2015" />
     <property name="version.major"         value="1" />
     <property name="version.minor"         value="1" />
     <property name="version.build"         value="31" />
@@ -175,7 +175,7 @@
             packagenames="org.apache.tomcat.*"
             windowtitle="${title} (Version ${version})"
             doctitle="<h1>${title} (Version ${version})</h1>"
-            bottom="Copyright 2002-2014 The Apache Software Foundation.<!--
+            bottom="Copyright 2002-2015 The Apache Software Foundation.<!--
 
 Licensed under the Apache License, Version 2.0 (the 'License');
 you may not use this file except in compliance with the License.
diff --git a/jni/docs/index.html b/jni/docs/index.html
index 3b9a3fc..fcd0cdf 100644
--- a/jni/docs/index.html
+++ b/jni/docs/index.html
@@ -32,8 +32,8 @@ manual is described in more detail below.</p>
 </div><h3 id="Headlines">Headlines</h3><div class="text">
 <ul>
 
-<li><a href="news/2014.html#20140707.1">7 July 2014 - <b>TC-Native-1.1.31 released</b></a>
-<p>The Apache Tomcat team is proud to announce the immediate availability of Tomcat Native 1.1.31 Stable.
+<li><a href="news/2014.html#20141023.1">23 October 2014 - <b>TC-Native-1.1.32 released</b></a>
+<p>The Apache Tomcat team is proud to announce the immediate availability of Tomcat Native 1.1.32 Stable.
 </p>
 <p>
  The sources and the binaries for selected platforms are available from the
@@ -184,5 +184,5 @@ INFO: Initializing Coyote HTTP/1.1 on http-8080</code></pre></div>
 </div></div>
 
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/miscellaneous/changelog.html b/jni/docs/miscellaneous/changelog.html
index 81cf3e3..42e413b 100644
--- a/jni/docs/miscellaneous/changelog.html
+++ b/jni/docs/miscellaneous/changelog.html
@@ -6,6 +6,31 @@
   It should contain fixes made only after December 19th 2007, when the
   new documentation project for Tomcat Native was started.
   </p>
+</div><h3 id="Changes_between_1.1.32_and_1.1.33">Changes between 1.1.32 and 1.1.33</h3><div class="text">
+  <ul class="changelog">
+    <li><img alt="Fix: " class="icon" src="../images/fix.gif">
+      Fix compilation failures with master branch of OpenSSL. Replace access
+      to OpenSSL internals by accessor functions. (rjung/kkolinko)
+    </li>
+    <li><img alt="Fix: " class="icon" src="../images/fix.gif">
+      Fix a zero-boundary-check compiler warning and simplify code in the
+      process. (rjung)
+    </li>
+    <li><img alt="Fix: " class="icon" src="../images/fix.gif">
+      Remove superfluous semicolons after close-braces to eliminate compiler
+      warnings. (schultz)
+    </li>
+    <li><img alt="Fix: " class="icon" src="../images/fix.gif">
+      <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=57653">57653</a>: Fix crash when multiple events for same socket are
+      returned via separate apr_pollfd_t structures. (markt)
+    </li>
+    <li><img alt="Fix: " class="icon" src="../images/fix.gif">
+      Enable building with OpenSSL 1.0.2 onwards. (billbarker)
+    </li>
+    <li><img alt="Update: " class="icon" src="../images/update.gif">
+      Use OpenSSL 1.0.1m with Windows binaries. (markt)
+    </li>
+  </ul>
 </div><h3 id="Changes_between_1.1.31_and_1.1.32">Changes between 1.1.31 and 1.1.32</h3><div class="text">
   <ul class="changelog">
     <li><img alt="Fix: " class="icon" src="../images/fix.gif">
@@ -315,5 +340,5 @@
     </li>
   </ul>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2008.html b/jni/docs/news/2008.html
index 04b5468..ae55f42 100644
--- a/jni/docs/news/2008.html
+++ b/jni/docs/news/2008.html
@@ -24,5 +24,5 @@ and some bug fixes.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2009.html b/jni/docs/news/2009.html
index 038c62a..aeb8c51 100644
--- a/jni/docs/news/2009.html
+++ b/jni/docs/news/2009.html
@@ -8,5 +8,5 @@ of Tomcat Native 1.1.18. This is a stable release adding some bug fixes.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2010.html b/jni/docs/news/2010.html
index 0c4782a..80fbd22 100644
--- a/jni/docs/news/2010.html
+++ b/jni/docs/news/2010.html
@@ -13,5 +13,5 @@ of Tomcat Native 1.1.19. This is a stable release adding some bug fixes.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2011.html b/jni/docs/news/2011.html
index 61b575a..22283fb 100644
--- a/jni/docs/news/2011.html
+++ b/jni/docs/news/2011.html
@@ -9,5 +9,5 @@ of Tomcat Native 1.1.22. This is a stable release adding some bug fixes.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2012.html b/jni/docs/news/2012.html
index c0bb8b9..44fdb9f 100644
--- a/jni/docs/news/2012.html
+++ b/jni/docs/news/2012.html
@@ -19,5 +19,5 @@ experimental support for OCSP and PKCS12 certificates.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2013.html b/jni/docs/news/2013.html
index c9b7a13..3f4b807 100644
--- a/jni/docs/news/2013.html
+++ b/jni/docs/news/2013.html
@@ -22,5 +22,5 @@ of Tomcat Native 1.1.27. This is a bug fixing release.
 </p>
 </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/docs/news/2014.html b/jni/docs/news/2014.html
index 9bcd47b..2e4caea 100644
--- a/jni/docs/news/2014.html
+++ b/jni/docs/news/2014.html
@@ -1,5 +1,11 @@
 <!DOCTYPE html SYSTEM "about:legacy-compat">
 <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="../images/docs-stylesheet.css" rel="stylesheet" type="text/css"><link href="../images/style.css" rel="stylesheet" type="text/css"><title>The Apache Tomcat Native - News - 2014 News and Status</title></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="http://tomcat.apache.org/"><img alt="Tomcat Home" src="../images/tomcat.png"></a></div><div [...]
+ <div class="subsection"><h4 id="20141023.1">23 October 2014 - TC-Native-1.1.32 released</h4><div class="text">
+  <p>The Apache Tomcat team is proud to announce the immediate availability
+  of Tomcat Native 1.1.32. This release add support for TLSv1.1 and TLSv1.2 and
+  includes Windows binaries built with OpenSSL 1.0.1j and APR 1.5.1.
+  </p>
+ </div></div>    
  <div class="subsection"><h4 id="20140707.1">7 July 2014 - TC-Native-1.1.31 released</h4><div class="text">
   <p>The Apache Tomcat team is proud to announce the immediate availability
   of Tomcat Native 1.1.31. This is a bug fixing release and includes Windows
@@ -13,5 +19,5 @@
   </p>
  </div></div>
 </div></div></div></div></div><footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer></div></body></html>
\ No newline at end of file
diff --git a/jni/java/org/apache/tomcat/jni/Library.java b/jni/java/org/apache/tomcat/jni/Library.java
index 8923131..c1e717e 100644
--- a/jni/java/org/apache/tomcat/jni/Library.java
+++ b/jni/java/org/apache/tomcat/jni/Library.java
@@ -17,6 +17,8 @@
 
 package org.apache.tomcat.jni;
 
+import java.io.File;
+
 /** Library
  *
  * @author Mladen Turk
@@ -30,45 +32,42 @@ public final class Library {
      */
     private static Library _instance = null;
 
-    private Library()
-        throws Exception
-    {
+    private Library() throws Exception {
         boolean loaded = false;
+        String path = System.getProperty("java.library.path");
+        String [] paths = path.split(File.pathSeparator);
         StringBuilder err = new StringBuilder();
         for (int i = 0; i < NAMES.length; i++) {
             try {
                 System.loadLibrary(NAMES[i]);
                 loaded = true;
-            }
-            catch (Throwable t) {
-                if (t instanceof ThreadDeath) {
-                    throw (ThreadDeath) t;
-                }
-                if (t instanceof VirtualMachineError) {
-                    throw (VirtualMachineError) t;
-                }
+            } catch (ThreadDeath | VirtualMachineError t) {
+                throw t;
+            } catch (Throwable t) {
                 String name = System.mapLibraryName(NAMES[i]);
-                String path = System.getProperty("java.library.path");
-                String sep = System.getProperty("path.separator");
-                String [] paths = path.split(sep);
-                for (int j=0; j<paths.length; j++) {
+                for (int j = 0; j < paths.length; j++) {
                     java.io.File fd = new java.io.File(paths[j] , name);
                     if (fd.exists()) {
-                        t.printStackTrace();
+                        // File exists but failed to load
+                        throw t;
                     }
                 }
-                if ( i > 0)
+                if (i > 0) {
                     err.append(", ");
+                }
                 err.append(t.getMessage());
             }
-            if (loaded)
+            if (loaded) {
                 break;
+            }
         }
         if (!loaded) {
-            err.append('(');
-            err.append(System.getProperty("java.library.path"));
-            err.append(')');
-            throw new UnsatisfiedLinkError(err.toString());
+            StringBuilder names = new StringBuilder();
+            for (String name : NAMES) {
+                names.append(name);
+                names.append(", ");
+            }
+            throw new LibraryNotFoundError(names.substring(0, names.length() -2), err.toString());
         }
     }
 
diff --git a/jni/java/org/apache/tomcat/jni/LibraryNotFoundError.java b/jni/java/org/apache/tomcat/jni/LibraryNotFoundError.java
new file mode 100644
index 0000000..ab8a030
--- /dev/null
+++ b/jni/java/org/apache/tomcat/jni/LibraryNotFoundError.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.jni;
+
+public class LibraryNotFoundError extends UnsatisfiedLinkError {
+
+    private static final long serialVersionUID = 1L;
+
+    private final String libraryNames;
+
+    /**
+     *
+     * @param libraryNames A list of the file names of the native libraries that
+     *                     failed to load
+     * @param errors A list of the error messages received when trying to load
+     *               each of the libraries
+     */
+    public LibraryNotFoundError(String libraryNames, String errors){
+        super(errors);
+        this.libraryNames = libraryNames;
+    }
+
+    public String getLibraryNames(){
+        return libraryNames;
+    }
+}
diff --git a/jni/java/org/apache/tomcat/jni/SSL.java b/jni/java/org/apache/tomcat/jni/SSL.java
index 46c7cc9..0dc27b7 100644
--- a/jni/java/org/apache/tomcat/jni/SSL.java
+++ b/jni/java/org/apache/tomcat/jni/SSL.java
@@ -137,8 +137,8 @@ public final class SSL {
     public static final int SSL_OP_NO_SSLv2                         = 0x01000000;
     public static final int SSL_OP_NO_SSLv3                         = 0x02000000;
     public static final int SSL_OP_NO_TLSv1                         = 0x04000000;
-    public static final int SSL_OP_NO_TLSv1_1                       = 0x08000000;
-    public static final int SSL_OP_NO_TLSv1_2                       = 0x10000000;
+    public static final int SSL_OP_NO_TLSv1_2                       = 0x08000000;
+    public static final int SSL_OP_NO_TLSv1_1                       = 0x10000000;
 
     public static final int SSL_OP_NO_TICKET                        = 0x00004000;
 
diff --git a/jni/jnirelease.sh b/jni/jnirelease.sh
index 7a60b0b..c1c1fef 100755
--- a/jni/jnirelease.sh
+++ b/jni/jnirelease.sh
@@ -23,12 +23,17 @@
 
 # Default place to look for apr source.  Can be overridden with
 #   --with-apr=[directory]
-apr_src_dir=`pwd`/srclib/apr
+apr_src_dir=`pwd`/native/srclib/apr
 JKJNIEXT=""
 JKJNIVER=""
 SVNBASE=https://svn.apache.org/repos/asf/tomcat/native
 TCTRUNK_SVNBASE=https://svn.apache.org/repos/asf/tomcat/trunk
 
+# Set the environment variable that stops OSX storing extended
+# attributes in tar archives etc. with a file starting with ._
+COPYFILE_DISABLE=1
+export COPYFILE_DISABLE
+
 for o
 do
     case "$o" in
@@ -174,7 +179,7 @@ else
    fi
    WIN_VERSION=`grep TCN_VERSION ${JKJNIDIST}/jni/native/os/win32/libtcnative.rc | grep define | awk ' { print $3 } '`
    if [ "x\"$JKJNIVER\"" != "x$WIN_VERSION" ]; then
-     echo "Check: ${JKJNIDIST}/jni/native/os/win32/libtcnative.rc says $WIN_VERSION (FILEVERSION, PRODUCTVERSION, TCN_VERSION"
+     echo "Check: ${JKJNIDIST}/jni/native/os/win32/libtcnative.rc says $WIN_VERSION (FILEVERSION, PRODUCTVERSION, TCN_VERSION)"
      exit 1
    fi
 fi
@@ -189,10 +194,11 @@ if [ $? -ne 0 ]; then
     echo ""
     exit 1
 fi
-# Remove first 25 lines from converted file which contains
-# page navagation data.
-# Remember to increase the lines when new file is added to news.
-sed -i '' '1,25d' ../../CHANGELOG.txt
+# Remove page navigation data from converted file.
+cp -p ../../CHANGELOG.txt ../../CHANGELOG.txt.tmp
+awk '/Preface/ {o=1} o>0' ../../CHANGELOG.txt.tmp > ../../CHANGELOG.txt
+rm ../../CHANGELOG.txt.tmp
+
 cd "$top"
 mv ${JKJNIDIST}/jni/build/docs ${JKJNIDIST}/jni/docs
 rm -rf ${JKJNIDIST}/jni/build
diff --git a/jni/native/build/apr_common.m4 b/jni/native/build/apr_common.m4
index 50dbfac..6b5c0f0 100644
--- a/jni/native/build/apr_common.m4
+++ b/jni/native/build/apr_common.m4
@@ -468,9 +468,14 @@ AC_MSG_CHECKING(size of $2)
 AC_CACHE_VAL(AC_CV_NAME,
 [AC_TRY_RUN([#include <stdio.h>
 $1
+#ifdef WIN32
+#define binmode "b"
+#else
+#define binmode
+#endif
 main()
 {
-  FILE *f=fopen("conftestval", "w");
+  FILE *f=fopen("conftestval", "w" binmode);
   if (!f) exit(1);
   fprintf(f, "%d\n", sizeof($2));
   exit(0);
diff --git a/jni/native/build/config.guess b/jni/native/build/config.guess
index 2055429..72625d4 100755
--- a/jni/native/build/config.guess
+++ b/jni/native/build/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2013-04-24'
+timestamp='2014-02-12'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -132,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -853,21 +874,21 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -880,67 +901,54 @@ EOF
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-	#else
-	#include <features.h>
-	#ifdef __UCLIBC__
-	LIBC=uclibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -959,59 +967,63 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
     or1k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     or32:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
+	echo powerpc64-unknown-linux-${LIBC}
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	LIBC=gnu
-	test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1244,19 +1256,31 @@ EOF
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1347,154 +1371,6 @@ EOF
 	exit ;;
 esac
 
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-	"4"
-#else
-	""
-#endif
-	); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
 cat >&2 <<EOF
 $0: unable to guess system type
 
diff --git a/jni/native/build/config.sub b/jni/native/build/config.sub
index 8b612ab..092cff0 100755
--- a/jni/native/build/config.sub
+++ b/jni/native/build/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2013-04-24'
+timestamp='2014-01-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -257,7 +257,7 @@ case $basic_machine in
 	| avr | avr32 \
 	| be32 | be64 \
 	| bfin \
-	| c4x | clipper \
+	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| epiphany \
 	| fido | fr30 | frv \
@@ -265,6 +265,7 @@ case $basic_machine in
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| k1om \
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -324,7 +325,7 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -372,7 +373,7 @@ case $basic_machine in
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| clipper-* | craynv-* | cydra-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -381,6 +382,7 @@ case $basic_machine in
 	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| k1om-* \
 	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
@@ -794,7 +796,7 @@ case $basic_machine in
 		os=-mingw64
 		;;
 	mingw32)
-		basic_machine=i386-pc
+		basic_machine=i686-pc
 		os=-mingw32
 		;;
 	mingw32ce)
@@ -830,7 +832,7 @@ case $basic_machine in
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
-		basic_machine=i386-pc
+		basic_machine=i686-pc
 		os=-msys
 		;;
 	mvs)
@@ -1546,6 +1548,9 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	c8051-*)
+		os=-elf
+		;;
 	hexagon-*)
 		os=-elf
 		;;
diff --git a/jni/native/include/ssl_private.h b/jni/native/include/ssl_private.h
index 2ae67cf..6d43cc3 100644
--- a/jni/native/include/ssl_private.h
+++ b/jni/native/include/ssl_private.h
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: ssl_private.h 1632595 2014-10-17 14:50:34Z schultz $
+ * @version $Id: ssl_private.h 1658728 2015-02-10 14:45:19Z kkolinko $
  */
 
 #ifndef SSL_PRIVATE_H
@@ -295,12 +295,6 @@ typedef struct {
 } tcn_ssl_conn_t;
 
 
-#define SSL_CTX_get_extra_certs(ctx)        ((ctx)->extra_certs)
-#define SSL_CTX_set_extra_certs(ctx, value) \
-    TCN_BEGIN_MACRO                         \
-        (ctx)->extra_certs = (value);       \
-    TCN_END_MACRO
-
 /*
  *  Additional Functions
  */
diff --git a/jni/native/include/tcn_version.h b/jni/native/include/tcn_version.h
index d79c3f8..bf5eb98 100644
--- a/jni/native/include/tcn_version.h
+++ b/jni/native/include/tcn_version.h
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: tcn_version.h 1633143 2014-10-20 12:44:50Z markt $
+ * @version $Id: tcn_version.h 1667779 2015-03-19 14:43:26Z markt $
  */
 
 #ifndef TCN_VERSION_H
@@ -69,7 +69,7 @@ extern "C" {
 #define TCN_MINOR_VERSION       1
 
 /** patch level */
-#define TCN_PATCH_VERSION       32
+#define TCN_PATCH_VERSION       33
 
 /**
  *  This symbol is defined for internal, "development" copies of TCN. This
diff --git a/jni/native/os/win32/libtcnative.rc b/jni/native/os/win32/libtcnative.rc
index 3436473..69aedc9 100644
--- a/jni/native/os/win32/libtcnative.rc
+++ b/jni/native/os/win32/libtcnative.rc
@@ -20,7 +20,7 @@ LANGUAGE 0x9,0x1
                      "See the License for the specific language governing " \
                      "permissions and limitations under the License."
 
-#define TCN_VERSION "1.1.32"
+#define TCN_VERSION "1.1.33"
 1000 ICON "apache.ico"
 
 1001 DIALOGEX 0, 0, 252, 51
@@ -36,8 +36,8 @@ BEGIN
 END
 
 1 VERSIONINFO
- FILEVERSION 1,1,32,0
- PRODUCTVERSION 1,1,32,0
+ FILEVERSION 1,1,33,0
+ PRODUCTVERSION 1,1,33,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
diff --git a/jni/native/src/jnilib.c b/jni/native/src/jnilib.c
index 6f4bda7..0110ad0 100644
--- a/jni/native/src/jnilib.c
+++ b/jni/native/src/jnilib.c
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: jnilib.c 1449753 2013-02-25 15:40:08Z rjung $
+ * @version $Id: jnilib.c 1666217 2015-03-12 15:03:31Z rjung $
  */
 
 #include "tcn.h"
@@ -120,18 +120,15 @@ jstring tcn_new_stringn(JNIEnv *env, const char *str, size_t l)
 {
     jstring result;
     jbyteArray bytes = 0;
-    size_t len = l;
 
     if (!str)
         return NULL;
     if ((*env)->EnsureLocalCapacity(env, 2) < 0) {
         return NULL; /* out of memory error */
     }
-    if (l < 0)
-        len = strlen(str);
-    bytes = (*env)->NewByteArray(env, (jsize)len);
+    bytes = (*env)->NewByteArray(env, l);
     if (bytes != NULL) {
-        (*env)->SetByteArrayRegion(env, bytes, 0, (jint)len, (jbyte *)str);
+        (*env)->SetByteArrayRegion(env, bytes, 0, l, (jbyte *)str);
         result = (*env)->NewObject(env, jString_class, jString_init, bytes);
         (*env)->DeleteLocalRef(env, bytes);
         return result;
diff --git a/jni/native/src/multicast.c b/jni/native/src/multicast.c
index 5de988c..755db9b 100644
--- a/jni/native/src/multicast.c
+++ b/jni/native/src/multicast.c
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: multicast.c 1442587 2013-02-05 13:49:48Z rjung $
+ * @version $Id: multicast.c 1650120 2015-01-07 17:17:37Z schultz $
  */
 
 #include "tcn.h"
@@ -32,7 +32,7 @@ TCN_IMPLEMENT_CALL(jint, Multicast, join)(TCN_STDARGS,
     apr_sockaddr_t *sa = J2P(source, apr_sockaddr_t *);
     UNREFERENCED_STDARGS;
     return (jint)apr_mcast_join(s->sock, ja, ia, sa);
-};
+}
 
 TCN_IMPLEMENT_CALL(jint, Multicast, leave)(TCN_STDARGS,
                                            jlong sock, jlong addr,
@@ -44,7 +44,7 @@ TCN_IMPLEMENT_CALL(jint, Multicast, leave)(TCN_STDARGS,
     apr_sockaddr_t *sa = J2P(source, apr_sockaddr_t *);
     UNREFERENCED_STDARGS;
     return (jint)apr_mcast_leave(s->sock, aa, ia, sa);
-};
+}
 
 TCN_IMPLEMENT_CALL(jint, Multicast, hops)(TCN_STDARGS,
                                           jlong sock, jint ttl)
@@ -52,7 +52,7 @@ TCN_IMPLEMENT_CALL(jint, Multicast, hops)(TCN_STDARGS,
     tcn_socket_t *s = J2P(sock, tcn_socket_t *);
     UNREFERENCED_STDARGS;
     return (jint)apr_mcast_hops(s->sock, (apr_byte_t)ttl);
-};
+}
 
 TCN_IMPLEMENT_CALL(jint, Multicast, loopback)(TCN_STDARGS,
                                               jlong sock, jboolean opt)
@@ -63,7 +63,7 @@ TCN_IMPLEMENT_CALL(jint, Multicast, loopback)(TCN_STDARGS,
     if (opt)
         on = 1;
     return (jint)apr_mcast_loopback(s->sock, on);
-};
+}
 
 TCN_IMPLEMENT_CALL(jint, Multicast, ointerface)(TCN_STDARGS,
                                                 jlong sock, jlong iface)
@@ -72,4 +72,4 @@ TCN_IMPLEMENT_CALL(jint, Multicast, ointerface)(TCN_STDARGS,
     apr_sockaddr_t *ia = J2P(iface, apr_sockaddr_t *);
     UNREFERENCED_STDARGS;
     return (jint)apr_mcast_interface(s->sock, ia);
-};
+}
diff --git a/jni/native/src/poll.c b/jni/native/src/poll.c
index aeb6288..1df8b63 100644
--- a/jni/native/src/poll.c
+++ b/jni/native/src/poll.c
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: poll.c 1525525 2013-09-23 08:08:56Z rjung $
+ * @version $Id: poll.c 1667243 2015-03-17 10:28:05Z markt $
  */
 
 #include "tcn.h"
@@ -360,15 +360,23 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN_STDARGS, jlong pollset,
             tcn_socket_t *s = (tcn_socket_t *)fd->client_data;
             p->set[i*2+0] = (jlong)(fd->rtnevents);
             p->set[i*2+1] = P2J(s);
+            /* If a socket is registered for multiple events and the poller has
+               multiple events to return it may do as a single pair in this
+               array or as multiple pairs depending on implementation. On OSX at
+               least, multiple pairs have been observed. In this case do not try
+               and remove socket from the pollset for a second time else a crash
+               will result. */ 
             if (remove) {
-                apr_pollset_remove(p->pollset, fd);
-                APR_RING_REMOVE(s->pe, link);
-                APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link);
-                s->pe = NULL;
-                p->nelts--;
+                if (s->pe) {
+                    apr_pollset_remove(p->pollset, fd);
+                    APR_RING_REMOVE(s->pe, link);
+                    APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link);
+                    s->pe = NULL;
+                    p->nelts--;
 #ifdef TCN_DO_STATISTICS
-                p->sp_removed++;
+                    p->sp_removed++;
 #endif
+                }
             }
             else {
                 /* Update last active with the current time
diff --git a/jni/native/src/ssl.c b/jni/native/src/ssl.c
index 16a239a..00b6a22 100644
--- a/jni/native/src/ssl.c
+++ b/jni/native/src/ssl.c
@@ -17,7 +17,7 @@
 /*
  *
  * @author Mladen Turk
- * @version $Id: ssl.c 1632595 2014-10-17 14:50:34Z schultz $
+ * @version $Id: ssl.c 1649733 2015-01-06 04:42:24Z billbarker $
  */
 
 #include "tcn.h"
@@ -229,6 +229,7 @@ static const jint supported_ssl_opts = 0
 
 static int ssl_tmp_key_init_rsa(int bits, int idx)
 {
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
     if (!(SSL_temp_keys[idx] =
           RSA_generate_key(bits, RSA_F4, NULL, NULL))) {
 #ifdef OPENSSL_FIPS
@@ -245,15 +246,22 @@ static int ssl_tmp_key_init_rsa(int bits, int idx)
     else {
         return 0;
     }
+#else
+    return 0;
+#endif
 }
 
 static int ssl_tmp_key_init_dh(int bits, int idx)
 {
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
     if (!(SSL_temp_keys[idx] =
           SSL_dh_get_tmp_param(bits)))
         return 1;
     else
         return 0;
+#else
+    return 0;
+#endif
 }
 
 
diff --git a/jni/native/src/sslcontext.c b/jni/native/src/sslcontext.c
index 7bf3f55..6037182 100644
--- a/jni/native/src/sslcontext.c
+++ b/jni/native/src/sslcontext.c
@@ -17,7 +17,7 @@
 /** SSL Context wrapper
  *
  * @author Mladen Turk
- * @version $Id: sslcontext.c 1632595 2014-10-17 14:50:34Z schultz $
+ * @version $Id: sslcontext.c 1649733 2015-01-06 04:42:24Z billbarker $
  */
 
 #include "tcn.h"
@@ -103,7 +103,7 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, make)(TCN_STDARGS, jlong pool,
             ctx = SSL_CTX_new(SSLv3_server_method());
         else
             ctx = SSL_CTX_new(SSLv3_method());
-#ifndef OPENSSL_NO_SSL2
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_NO_SSL2)
     } else if (protocol == SSL_PROTOCOL_SSLV2) {
         if (mode == SSL_MODE_CLIENT)
             ctx = SSL_CTX_new(SSLv2_client_method());
diff --git a/jni/native/src/sslinfo.c b/jni/native/src/sslinfo.c
index ba2b80d..0ee3829 100644
--- a/jni/native/src/sslinfo.c
+++ b/jni/native/src/sslinfo.c
@@ -17,7 +17,7 @@
 /** SSL info wrapper
  *
  * @author Mladen Turk
- * @version $Id: sslinfo.c 1442587 2013-02-05 13:49:48Z rjung $
+ * @version $Id: sslinfo.c 1658603 2015-02-09 23:26:44Z kkolinko $
  */
 
 #include "tcn.h"
@@ -218,8 +218,9 @@ TCN_IMPLEMENT_CALL(jobject, SSLSocket, getInfoB)(TCN_STDARGS, jlong sock,
         {
             SSL_SESSION *session  = SSL_get_session(s->ssl);
             if (session) {
-                array = tcn_new_arrayb(e, &session->session_id[0],
-                                       session->session_id_length);
+                unsigned int len;
+                const unsigned char *id = SSL_SESSION_get_id(session, &len);
+                array = tcn_new_arrayb(e, id, len);
             }
         }
         break;
@@ -298,8 +299,9 @@ TCN_IMPLEMENT_CALL(jstring, SSLSocket, getInfoS)(TCN_STDARGS, jlong sock,
         {
             SSL_SESSION *session  = SSL_get_session(s->ssl);
             if (session) {
-                char *hs = convert_to_hex(&session->session_id[0],
-                                          session->session_id_length);
+                unsigned int len;
+                const unsigned char *id = SSL_SESSION_get_id(session, &len);
+                char *hs = convert_to_hex(id, len);
                 if (hs) {
                     value = tcn_new_string(e, hs);
                     free(hs);
diff --git a/jni/native/src/sslnetwork.c b/jni/native/src/sslnetwork.c
index e1468cf..1c8d98e 100644
--- a/jni/native/src/sslnetwork.c
+++ b/jni/native/src/sslnetwork.c
@@ -17,7 +17,7 @@
 /** SSL network wrapper
  *
  * @author Mladen Turk
- * @version $Id: sslnetwork.c 1456353 2013-03-14 07:35:56Z mturk $
+ * @version $Id: sslnetwork.c 1658646 2015-02-10 09:00:11Z rjung $
  */
 
 #include "tcn.h"
@@ -410,7 +410,7 @@ ssl_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
             rv  = apr_get_netos_error();
             i   = SSL_get_error(con->ssl, s);
             /* Special case if the "close notify" alert send by peer */
-            if (s == 0 && (con->ssl->shutdown & SSL_RECEIVED_SHUTDOWN)) {
+            if (s == 0 && (SSL_get_shutdown(con->ssl) & SSL_RECEIVED_SHUTDOWN)) {
                 con->shutdown_type = SSL_SHUTDOWN_TYPE_STANDARD;
                 return APR_EOF;
             }
@@ -647,7 +647,7 @@ TCN_IMPLEMENT_CALL(jint, SSLSocket, renegotiate)(TCN_STDARGS,
     if (SSL_get_state(con->ssl) != SSL_ST_OK) {
         return APR_EGENERAL;
     }
-    con->ssl->state = SSL_ST_ACCEPT;
+    SSL_set_state(con->ssl, SSL_ST_ACCEPT);
 
     apr_socket_timeout_get(con->sock, &timeout);
     ecode = SSL_ERROR_WANT_READ;
diff --git a/jni/native/src/sslutils.c b/jni/native/src/sslutils.c
index 23b2be0..def1119 100644
--- a/jni/native/src/sslutils.c
+++ b/jni/native/src/sslutils.c
@@ -17,7 +17,7 @@
 /** SSL Utilities
  *
  * @author Mladen Turk
- * @version $Id: sslutils.c 1507125 2013-07-25 21:01:25Z schultz $
+ * @version $Id: sslutils.c 1658728 2015-02-10 14:45:19Z kkolinko $
  */
 
 #include "tcn.h"
@@ -254,6 +254,7 @@ static unsigned char dhxxx2_g[]={
 
 static DH *get_dh(int idx)
 {
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED)
     DH *dh;
 
     if ((dh = DH_new()) == NULL)
@@ -279,6 +280,9 @@ static DH *get_dh(int idx)
     }
     else
         return dh;
+#else
+    return NULL;
+#endif
 }
 
 DH *SSL_dh_get_tmp_param(int key_len)
@@ -416,7 +420,6 @@ int SSL_CTX_use_certificate_chain(SSL_CTX *ctx, const char *file,
     X509 *x509;
     unsigned long err;
     int n;
-    STACK_OF(X509) *extra_certs;
 
     if ((bio = BIO_new(BIO_s_file_internal())) == NULL)
         return -1;
@@ -432,12 +435,10 @@ int SSL_CTX_use_certificate_chain(SSL_CTX *ctx, const char *file,
         }
         X509_free(x509);
     }
+
     /* free a perhaps already configured extra chain */
-    extra_certs = SSL_CTX_get_extra_certs(ctx);
-    if (extra_certs != NULL) {
-        sk_X509_pop_free(extra_certs, X509_free);
-        SSL_CTX_set_extra_certs(ctx,NULL);
-    }
+    SSL_CTX_clear_extra_chain_certs(ctx);
+
     /* create new extra chain by loading the certs */
     n = 0;
     while ((x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL)) != NULL) {
diff --git a/jni/native/srclib/VERSIONS b/jni/native/srclib/VERSIONS
index a5613e0..de75d71 100644
--- a/jni/native/srclib/VERSIONS
+++ b/jni/native/srclib/VERSIONS
@@ -1,4 +1,4 @@
 Use the following version of the libraries
 
 - APR 1.5.1, http://apr.apache.org
-- OpenSSL 1.0.1j, http://www.openssl.org
+- OpenSSL 1.0.1m, http://www.openssl.org
diff --git a/jni/native/srclib/apr/apr-enable-ipv6.patch b/jni/native/srclib/apr/apr-enable-ipv6.patch
index 5c98a12..ee8c302 100644
--- a/jni/native/srclib/apr/apr-enable-ipv6.patch
+++ b/jni/native/srclib/apr/apr-enable-ipv6.patch
@@ -1,6 +1,6 @@
 --- include/apr.hw
 +++ include/apr.hw
-@@ -276,7 +276,7 @@
+@@ -282,7 +282,7 @@
  #define APR_HAVE_IN_ADDR        1
  #define APR_HAVE_INET_ADDR      1
  #define APR_HAVE_INET_NETWORK   0
@@ -9,7 +9,7 @@
  #define APR_HAVE_MEMMOVE        1
  #define APR_HAVE_SETRLIMIT      0
  #define APR_HAVE_SIGACTION      0
-@@ -340,7 +340,7 @@
+@@ -346,7 +346,7 @@
  /* If we have a TCP implementation that can be "corked", what flag
   * do we use?
   */
diff --git a/jni/native/tcnative.spec b/jni/native/tcnative.spec
index 6749e63..459693c 100644
--- a/jni/native/tcnative.spec
+++ b/jni/native/tcnative.spec
@@ -20,7 +20,7 @@
 
 Summary: Tomcat Native Java library
 Name: tcnative
-Version: 1.1.32
+Version: 1.1.33
 Release: 1
 License: Apache Software License
 Group: System Environment/Libraries
diff --git a/jni/xdocs/index.xml b/jni/xdocs/index.xml
index dd4be86..7ac347d 100644
--- a/jni/xdocs/index.xml
+++ b/jni/xdocs/index.xml
@@ -64,8 +64,8 @@ manual is described in more detail below.</p>
 <section name="Headlines">
 <ul>
 
-<li><a href="news/2014.html#20140707.1">7 July 2014 - <b>TC-Native-1.1.31 released</b></a>
-<p>The Apache Tomcat team is proud to announce the immediate availability of Tomcat Native 1.1.31 Stable.
+<li><a href="news/2014.html#20141023.1">23 October 2014 - <b>TC-Native-1.1.32 released</b></a>
+<p>The Apache Tomcat team is proud to announce the immediate availability of Tomcat Native 1.1.32 Stable.
 </p>
 <p>
  The sources and the binaries for selected platforms are available from the
diff --git a/jni/xdocs/miscellaneous/changelog.xml b/jni/xdocs/miscellaneous/changelog.xml
index 50529ff..c6dfde9 100644
--- a/jni/xdocs/miscellaneous/changelog.xml
+++ b/jni/xdocs/miscellaneous/changelog.xml
@@ -36,6 +36,32 @@
   new documentation project for Tomcat Native was started.
   </p>
 </section>
+<section name="Changes between 1.1.32 and 1.1.33">
+  <changelog>
+    <fix>
+      Fix compilation failures with master branch of OpenSSL. Replace access
+      to OpenSSL internals by accessor functions. (rjung/kkolinko)
+    </fix>
+    <fix>
+      Fix a zero-boundary-check compiler warning and simplify code in the
+      process. (rjung)
+    </fix>
+    <fix>
+      Remove superfluous semicolons after close-braces to eliminate compiler
+      warnings. (schultz)
+    </fix>
+    <fix>
+      <bug>57653</bug>: Fix crash when multiple events for same socket are
+      returned via separate apr_pollfd_t structures. (markt)
+    </fix>
+    <fix>
+      Enable building with OpenSSL 1.0.2 onwards. (billbarker)
+    </fix>
+    <update>
+      Use OpenSSL 1.0.1m with Windows binaries. (markt)
+    </update>
+  </changelog>
+</section>
 <section name="Changes between 1.1.31 and 1.1.32">
   <changelog>
     <fix>
diff --git a/jni/xdocs/news/2014.xml b/jni/xdocs/news/2014.xml
index 23ba317..76e6a76 100644
--- a/jni/xdocs/news/2014.xml
+++ b/jni/xdocs/news/2014.xml
@@ -29,6 +29,12 @@
 <body>
 
 <section name="2014 News & Status">
+ <subsection anchor="20141023.1" name="23 October 2014 - TC-Native-1.1.32 released">
+  <p>The Apache Tomcat team is proud to announce the immediate availability
+  of Tomcat Native 1.1.32. This release add support for TLSv1.1 and TLSv1.2 and
+  includes Windows binaries built with OpenSSL 1.0.1j and APR 1.5.1.
+  </p>
+ </subsection>    
  <subsection anchor="20140707.1" name="7 July 2014 - TC-Native-1.1.31 released">
   <p>The Apache Tomcat team is proud to announce the immediate availability
   of Tomcat Native 1.1.31. This is a bug fixing release and includes Windows
diff --git a/jni/xdocs/style.xsl b/jni/xdocs/style.xsl
index 261bcc7..e3c6374 100644
--- a/jni/xdocs/style.xsl
+++ b/jni/xdocs/style.xsl
@@ -127,7 +127,7 @@
 
   <!-- Footer -->
   <footer><div id="footer">
-    Copyright © 2008-2014, The Apache Software Foundation
+    Copyright © 2008-2015, The Apache Software Foundation
   </div></footer>
 </div>
 </body>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat-native.git



More information about the pkg-java-commits mailing list