tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r481766 - in /tomcat/tc6.0.x/trunk/native/connector: configure.in include/tcn_version.h os/win32/libtcnative.rc os/win32/system.c src/error.c src/network.c src/ssl.c src/sslcontext.c src/sslinfo.c src/sslnetwork.c src/sslutils.c
Date Sun, 03 Dec 2006 12:40:20 GMT
Author: mturk
Date: Sun Dec  3 04:40:18 2006
New Revision: 481766

URL: http://svn.apache.org/viewvc?view=rev&rev=481766
Log:
Backport nonssl patches from tomcat-connectors/trunk

Modified:
    tomcat/tc6.0.x/trunk/native/connector/configure.in
    tomcat/tc6.0.x/trunk/native/connector/include/tcn_version.h
    tomcat/tc6.0.x/trunk/native/connector/os/win32/libtcnative.rc
    tomcat/tc6.0.x/trunk/native/connector/os/win32/system.c
    tomcat/tc6.0.x/trunk/native/connector/src/error.c
    tomcat/tc6.0.x/trunk/native/connector/src/network.c
    tomcat/tc6.0.x/trunk/native/connector/src/ssl.c
    tomcat/tc6.0.x/trunk/native/connector/src/sslcontext.c
    tomcat/tc6.0.x/trunk/native/connector/src/sslinfo.c
    tomcat/tc6.0.x/trunk/native/connector/src/sslnetwork.c
    tomcat/tc6.0.x/trunk/native/connector/src/sslutils.c

Modified: tomcat/tc6.0.x/trunk/native/connector/configure.in
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/configure.in?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/configure.in (original)
+++ tomcat/tc6.0.x/trunk/native/connector/configure.in Sun Dec  3 04:40:18 2006
@@ -101,8 +101,7 @@
 APR_ADDTO(TCNATIVE_PRIV_INCLUDES,[-I$JAVA_HOME/$JAVA_INC])
 
 dnl sableVM does not have/need $JAVA_OS/jni_md.h
-if test "$SABLEVM" = "NONE"
-then
+if test "$SABLEVM" = "NONE"; then
   TCN_FIND_JDK_OS
   if test -z "${JAVA_OS}"; then
     AC_MSG_RESULT([jni_md.h found in $JAVA_HOME/$JAVA_INC])
@@ -119,7 +118,19 @@
 dnl
 dnl Detect openssl toolkit installation
 dnl
-TCN_CHECK_SSL_TOOLKIT
+
+use_openssl=true;
+
+AC_ARG_ENABLE(openssl, 
+[ --disable-openssl   avoid using OpenSSL toolkit],
+[
+  use_openssl=false;
+  AC_MSG_RESULT([Disabling SSL support...])
+])
+
+if $use_openssl ; then
+  TCN_CHECK_SSL_TOOLKIT
+fi
 
 so_ext=$APR_SO_EXT
 lib_target=$APR_LIB_TARGET

Modified: tomcat/tc6.0.x/trunk/native/connector/include/tcn_version.h
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/include/tcn_version.h?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/include/tcn_version.h (original)
+++ tomcat/tc6.0.x/trunk/native/connector/include/tcn_version.h Sun Dec  3 04:40:18 2006
@@ -69,7 +69,7 @@
 #define TCN_MINOR_VERSION       1
 
 /** patch level */
-#define TCN_PATCH_VERSION       6
+#define TCN_PATCH_VERSION       8
 
 /**
  *  This symbol is defined for internal, "development" copies of TCN. This

Modified: tomcat/tc6.0.x/trunk/native/connector/os/win32/libtcnative.rc
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/os/win32/libtcnative.rc?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/os/win32/libtcnative.rc (original)
+++ tomcat/tc6.0.x/trunk/native/connector/os/win32/libtcnative.rc Sun Dec  3 04:40:18 2006
@@ -19,7 +19,7 @@
                     "specific language governing permissions and " \
                     "limitations under the License."
 
-#define TCN_VERISON "1.1.6"
+#define TCN_VERISON "1.1.8"
 1000 ICON "apache.ico"
 
 1001 DIALOGEX 0, 0, 252, 51
@@ -35,8 +35,8 @@
 END
 
 1 VERSIONINFO
- FILEVERSION 1,1,6,0
- PRODUCTVERSION 1,1,6,0
+ FILEVERSION 1,1,8,0
+ PRODUCTVERSION 1,1,8,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L

Modified: tomcat/tc6.0.x/trunk/native/connector/os/win32/system.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/os/win32/system.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/os/win32/system.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/os/win32/system.c Sun Dec  3 04:40:18 2006
@@ -34,7 +34,9 @@
 #include "apr_arch_atime.h"  /* for FileTimeToAprTime */
 
 #include "tcn.h"
+#ifdef HAVE_OPENSSL
 #include "ssl_private.h"
+#endif
 
 #pragma warning(push)
 #pragma warning(disable : 4201)
@@ -371,6 +373,8 @@
     return rv;
 }
 
+#ifdef HAVE_OPENSSL
+
 static DWORD WINAPI password_thread(void *data)
 {
     tcn_pass_cb_t *cb = (tcn_pass_cb_t *)data;
@@ -461,4 +465,4 @@
     return (int)strlen(data->password);
 }
 
-
+#endif

Modified: tomcat/tc6.0.x/trunk/native/connector/src/error.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/error.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/error.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/error.c Sun Dec  3 04:40:18 2006
@@ -70,7 +70,7 @@
         if (f != file) {
             f++;
         }
-        sprintf(fmt, "%s for [%s::%04d]", msg, line, f);
+        sprintf(fmt, "%s for [%04d@%s]", msg, line, f);
         (*env)->ThrowNew(env, javaExceptionClass, &fmt[0]);
     }
     else

Modified: tomcat/tc6.0.x/trunk/native/connector/src/network.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/network.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/network.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/network.c Sun Dec  3 04:40:18 2006
@@ -424,7 +424,10 @@
     apr_status_t ss;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->opaque != NULL);
 #ifdef TCN_DO_STATISTICS
     sp_max_send = TCN_MAX(sp_max_send, nbytes);
@@ -459,7 +462,10 @@
 {
     tcn_socket_t *s = J2P(sock, tcn_socket_t *);
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return;
+    }
     TCN_ASSERT(s->opaque != NULL);
     if (buf)
         s->jsbbuff = (char *)(*e)->GetDirectBufferAddress(e, buf);
@@ -472,7 +478,10 @@
 {
     tcn_socket_t *s = J2P(sock, tcn_socket_t *);
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return;
+    }
     TCN_ASSERT(s->opaque != NULL);
     if (buf)
         s->jrbbuff = (char *)(*e)->GetDirectBufferAddress(e, buf);
@@ -490,7 +499,10 @@
     apr_status_t ss = APR_SUCCESS;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->opaque != NULL);
     TCN_ASSERT(buf != NULL);
 #ifdef TCN_DO_STATISTICS
@@ -526,8 +538,11 @@
     apr_size_t sent = 0;
     apr_status_t ss = APR_SUCCESS;
 
-    UNREFERENCED_STDARGS;
-    TCN_ASSERT(sock != 0);
+    UNREFERENCED(o);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->opaque != NULL);
     TCN_ASSERT(s->jsbbuff != NULL);
 #ifdef TCN_DO_STATISTICS
@@ -746,7 +761,10 @@
     char *bytes;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->opaque != NULL);
     TCN_ASSERT(buf != NULL);
 
@@ -789,7 +807,11 @@
     apr_status_t ss;
     apr_size_t nbytes = (apr_size_t)len;
 
-    UNREFERENCED_STDARGS;
+    UNREFERENCED(o);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(sock != 0);
     TCN_ASSERT(s->opaque != NULL);
     TCN_ASSERT(s->jrbbuff != NULL);
@@ -834,7 +856,10 @@
     char *bytes;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(buf != NULL);
     TCN_ASSERT(s->opaque != NULL);
 
@@ -882,7 +907,11 @@
     apr_size_t nbytes = (apr_size_t)len;
 
     UNREFERENCED_STDARGS;
-    TCN_ASSERT(sock != 0);
+    UNREFERENCED(o);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->jrbbuff != NULL);
     TCN_ASSERT(s->opaque != NULL);
 
@@ -930,7 +959,10 @@
     apr_status_t ss;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return -(jint)APR_ENOTSOCK;
+    }
     TCN_ASSERT(s->sock != NULL);
     TCN_ASSERT(buf != NULL);
     ss = apr_socket_recvfrom(f, s->sock, (apr_int32_t)flags, (char*)(bytes + offset),
&nbytes);
@@ -950,10 +982,11 @@
 {
     tcn_socket_t *s = J2P(sock, tcn_socket_t *);
 
-    UNREFERENCED_STDARGS;
-    TCN_ASSERT(sock != 0);
-    if (!s->sock)
-        return APR_EINVAL;
+    UNREFERENCED(o);
+    if (!s->sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return APR_ENOTSOCK;
+    }
     else
         return (jint)(*s->net->opt_set)(s->opaque, (apr_int32_t)opt, (apr_int32_t)on);
 }
@@ -965,9 +998,8 @@
     apr_int32_t on = 0;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
     if (s->sock)
-        tcn_ThrowAPRException(e, APR_EINVAL);
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
     else {
         TCN_THROW_IF_ERR((*s->net->opt_get)(s->opaque, (apr_int32_t)opt,
                                             &on), on);
@@ -981,9 +1013,12 @@
 {
     tcn_socket_t *s = J2P(sock, tcn_socket_t *);
 
-    UNREFERENCED_STDARGS;
-    TCN_ASSERT(sock != 0);
+    UNREFERENCED(o);
     TCN_ASSERT(s->opaque != NULL);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return APR_ENOTSOCK;
+    }    
     return (jint)(*s->net->timeout_set)(s->opaque, J2T(timeout));
 }
 
@@ -993,8 +1028,12 @@
     apr_interval_time_t timeout;
 
     UNREFERENCED(o);
-    TCN_ASSERT(sock != 0);
+    if (!sock) {
+        tcn_ThrowAPRException(e, APR_ENOTSOCK);
+        return 0;
+    }    
     TCN_ASSERT(s->opaque != NULL);
+
     TCN_THROW_IF_ERR((*s->net->timeout_get)(s->opaque, &timeout), timeout);
 cleanup:
     return (jlong)timeout;

Modified: tomcat/tc6.0.x/trunk/native/connector/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/ssl.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/ssl.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/ssl.c Sun Dec  3 04:40:18 2006
@@ -369,6 +369,7 @@
     UNREFERENCED(o);
     if (!tcn_global_pool) {
         TCN_FREE_CSTRING(engine);
+        tcn_ThrowAPRException(e, APR_EINVAL);
         return (jint)APR_EINVAL;
     }
     /* Check if already initialized */
@@ -378,6 +379,8 @@
     }
     if (SSLeay() < 0x0090700L) {
         TCN_FREE_CSTRING(engine);
+        tcn_ThrowAPRException(e, APR_EINVAL);
+        ssl_initialized = 0;
         return (jint)APR_EINVAL;
     }
     /* We must register the library in full, to ensure our configuration
@@ -418,6 +421,7 @@
         if (err != APR_SUCCESS) {
             TCN_FREE_CSTRING(engine);
             ssl_init_cleanup(NULL);
+            tcn_ThrowAPRException(e, err);
             return (jint)err;
         }
         tcn_ssl_engine = ee;
@@ -437,6 +441,7 @@
     if (r) {
         TCN_FREE_CSTRING(engine);
         ssl_init_cleanup(NULL);
+        tcn_ThrowAPRException(e, APR_ENOTIMPL);
         return APR_ENOTIMPL;
     }
     /*
@@ -802,9 +807,102 @@
 }
 
 #else
-/* OpenSSL is not supported
- * If someday we make OpenSSL optional
- * APR_ENOTIMPL will go here
+/* OpenSSL is not supported.
+ * Create empty stubs.
  */
-#error "No OpenSSL Toolkit defined."
+
+TCN_IMPLEMENT_CALL(jint, SSL, version)(TCN_STDARGS)
+{
+    UNREFERENCED_STDARGS;
+    return 0;
+}
+
+TCN_IMPLEMENT_CALL(jstring, SSL, versionString)(TCN_STDARGS)
+{
+    UNREFERENCED_STDARGS;
+    return NULL;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS, jstring engine)
+{
+    UNREFERENCED(o);
+    UNREFERENCED(engine);
+    tcn_ThrowAPRException(e, APR_ENOTIMPL);
+    return (jint)APR_ENOTIMPL;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSL, randLoad)(TCN_STDARGS, jstring file)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(file);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSL, randSave)(TCN_STDARGS, jstring file)
+{
+    UNREFERENCED_STDARGS;
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSL, randMake)(TCN_STDARGS, jstring file,
+                                            jint length, jboolean base64)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(file);
+    UNREFERENCED(length);
+    UNREFERENCED(base64);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jlong, SSL, newBIO)(TCN_STDARGS, jlong pool,
+                                       jobject callback)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(pool);
+    UNREFERENCED(callback);
+    return 0;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, closeBIO)(TCN_STDARGS, jlong bio)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(bio);
+    return (jint)APR_ENOTIMPL;
+}
+
+TCN_IMPLEMENT_CALL(void, SSL, setPasswordCallback)(TCN_STDARGS,
+                                                   jobject callback)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(callback);
+}
+
+TCN_IMPLEMENT_CALL(void, SSL, setPassword)(TCN_STDARGS, jstring password)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(password);
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSL, generateRSATempKey)(TCN_STDARGS, jint idx)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(idx);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSL, loadDSATempKey)(TCN_STDARGS, jint idx,
+                                                  jstring file)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(idx);
+    UNREFERENCED(file);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jstring, SSL, getLastError)(TCN_STDARGS)
+{
+    UNREFERENCED_STDARGS;
+    return NULL;
+}
+
 #endif

Modified: tomcat/tc6.0.x/trunk/native/connector/src/sslcontext.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/sslcontext.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/sslcontext.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/sslcontext.c Sun Dec  3 04:40:18 2006
@@ -564,9 +564,138 @@
 }
 
 #else
-/* OpenSSL is not supported
- * If someday we make OpenSSL optional
- * APR_ENOTIMPL will go here
+/* OpenSSL is not supported.
+ * Create empty stubs.
  */
-#error "No OpenSSL Toolkit defined."
+
+TCN_IMPLEMENT_CALL(jlong, SSLContext, make)(TCN_STDARGS, jlong pool,
+                                            jint protocol, jint mode)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(pool);
+    UNREFERENCED(protocol);
+    UNREFERENCED(mode);
+    return 0;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSLContext, free)(TCN_STDARGS, jlong ctx)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setContextId)(TCN_STDARGS, jlong ctx,
+                                                   jstring id)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(id);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setBIO)(TCN_STDARGS, jlong ctx,
+                                             jlong bio, jint dir)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(bio);
+    UNREFERENCED(dir);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setOptions)(TCN_STDARGS, jlong ctx,
+                                                 jint opt)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(opt);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setQuietShutdown)(TCN_STDARGS, jlong ctx,
+                                                       jboolean mode)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(mode);
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCipherSuite)(TCN_STDARGS, jlong ctx,
+                                                         jstring ciphers)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(ciphers);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCARevocation)(TCN_STDARGS, jlong ctx,
+                                                          jstring file,
+                                                          jstring path)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(file);
+    UNREFERENCED(path);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCertificateChainFile)(TCN_STDARGS, jlong ctx,
+                                                                  jstring file,
+                                                                  jboolean skipfirst)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(file);
+    UNREFERENCED(skipfirst);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCACertificate)(TCN_STDARGS,
+                                                           jlong ctx,
+                                                           jstring file,
+                                                           jstring path)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(file);
+    UNREFERENCED(path);
+    return JNI_FALSE;
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setShutdownType)(TCN_STDARGS, jlong ctx,
+                                                      jint type)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(type);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setVerify)(TCN_STDARGS, jlong ctx,
+                                                jint level, jint depth)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(level);
+    UNREFERENCED(depth);
+}
+
+TCN_IMPLEMENT_CALL(void, SSLContext, setRandom)(TCN_STDARGS, jlong ctx,
+                                                jstring file)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(file);
+}
+
+TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCertificate)(TCN_STDARGS, jlong ctx,
+                                                         jstring cert, jstring key,
+                                                         jstring password, jint idx)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(cert);
+    UNREFERENCED(key);
+    UNREFERENCED(password);
+    UNREFERENCED(idx);
+    return JNI_FALSE;
+}
+
 #endif

Modified: tomcat/tc6.0.x/trunk/native/connector/src/sslinfo.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/sslinfo.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/sslinfo.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/sslinfo.c Sun Dec  3 04:40:18 2006
@@ -555,9 +555,35 @@
 }
 
 #else
-/* OpenSSL is not supported
- * If someday we make OpenSSL optional
- * APR_ENOTIMPL will go here
+/* OpenSSL is not supported.
+ * Create empty stubs.
  */
-#error "No OpenSSL Toolkit defined."
+
+TCN_IMPLEMENT_CALL(jobject, SSLSocket, getInfoB)(TCN_STDARGS, jlong sock,
+                                                 jint what)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(sock);
+    UNREFERENCED(what);
+    return NULL;
+}
+
+TCN_IMPLEMENT_CALL(jstring, SSLSocket, getInfoS)(TCN_STDARGS, jlong sock,
+                                                 jint what)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(sock);
+    UNREFERENCED(what);
+    return NULL;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSLSocket, getInfoI)(TCN_STDARGS, jlong sock,
+                                              jint what)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(sock);
+    UNREFERENCED(what);
+    return 0;
+}
+
 #endif

Modified: tomcat/tc6.0.x/trunk/native/connector/src/sslnetwork.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/sslnetwork.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/sslnetwork.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/sslnetwork.c Sun Dec  3 04:40:18 2006
@@ -563,9 +563,32 @@
 }
 
 #else
-/* OpenSSL is not supported
- * If someday we make OpenSSL optional
- * APR_ENOTIMPL will go here
+/* OpenSSL is not supported.
+ * Create empty stubs.
  */
-#error "No OpenSSL Toolkit defined."
+
+TCN_IMPLEMENT_CALL(jint, SSLSocket, handshake)(TCN_STDARGS, jlong sock)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(sock);
+    return (jint)APR_ENOTIMPL;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSLSocket, attach)(TCN_STDARGS, jlong ctx,
+                                            jlong sock)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(ctx);
+    UNREFERENCED(sock);
+    return (jint)APR_ENOTIMPL;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSLSocket, renegotiate)(TCN_STDARGS,
+                                                 jlong sock)
+{
+    UNREFERENCED_STDARGS;
+    UNREFERENCED(sock);
+    return (jint)APR_ENOTIMPL;
+}
+
 #endif

Modified: tomcat/tc6.0.x/trunk/native/connector/src/sslutils.c
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/native/connector/src/sslutils.c?view=diff&rev=481766&r1=481765&r2=481766
==============================================================================
--- tomcat/tc6.0.x/trunk/native/connector/src/sslutils.c (original)
+++ tomcat/tc6.0.x/trunk/native/connector/src/sslutils.c Sun Dec  3 04:40:18 2006
@@ -81,8 +81,9 @@
     if (data->cb.obj) {
         JNIEnv *e;
         jobject  o;
-        jstring  prompt = AJP_TO_JSTRING(data->prompt);
+        jstring  prompt;
         tcn_get_java_env(&e);
+        prompt = AJP_TO_JSTRING(data->prompt);
         if ((o = (*e)->CallObjectMethod(e, data->cb.obj,
                             data->cb.mid[0], prompt))) {
             TCN_ALLOC_CSTRING(o);
@@ -671,10 +672,4 @@
     return ok;
 }
 
-#else
-/* OpenSSL is not supported
- * If someday we make OpenSSL optional
- * APR_ENOTIMPL will go here
- */
-#error "No OpenSSL Toolkit defined."
 #endif



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message