mturk 2005/05/20 00:01:04 Modified: jni/native libtcnative.dsp tcnative.dsp jni/native/src ssl.c Added: jni/java/org/apache/tomcat/jni SSL.java jni/native/include ssl_private.h Log: Add SSL.java for OpenSSL generic constants and functions and ssl_private.h for private wrapper structures. Revision Changes Path 1.1 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java Index: SSL.java =================================================================== /* * Copyright 1999-2004 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. * 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; /** SSL * * @author Mladen Turk * @version $Revision: 1.1 $, $Date: 2005/05/20 07:01:03 $ */ public final class SSL { /* Return OpenSSL version number */ private static native int version(); /* Return OpenSSL version string */ private static native String versionString(); } 1.8 +4 -0 jakarta-tomcat-connectors/jni/native/libtcnative.dsp Index: libtcnative.dsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/libtcnative.dsp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- libtcnative.dsp 19 May 2005 10:23:05 -0000 1.7 +++ libtcnative.dsp 20 May 2005 07:01:04 -0000 1.8 @@ -168,6 +168,10 @@ # End Source File # Begin Source File +SOURCE=.\include\ssl_private.h +# End Source File +# Begin Source File + SOURCE=.\include\tcn_version.h # End Source File # End Group 1.8 +4 -0 jakarta-tomcat-connectors/jni/native/tcnative.dsp Index: tcnative.dsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/tcnative.dsp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- tcnative.dsp 19 May 2005 15:51:32 -0000 1.7 +++ tcnative.dsp 20 May 2005 07:01:04 -0000 1.8 @@ -164,6 +164,10 @@ # End Source File # Begin Source File +SOURCE=.\include\ssl_private.h +# End Source File +# Begin Source File + SOURCE=.\include\tcn_version.h # End Source File # End Group 1.1 jakarta-tomcat-connectors/jni/native/include/ssl_private.h Index: ssl_private.h =================================================================== /* Copyright 2000-2004 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. * 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. */ #ifndef SSL_PRIVATE_H #define SSL_PRIVATE_H /* OpenSSL headers */ #include <openssl/ssl.h> #include <openssl/err.h> #include <openssl/x509.h> #include <openssl/pem.h> #include <openssl/crypto.h> #include <openssl/evp.h> #include <openssl/rand.h> #include <openssl/x509v3.h> /* Avoid tripping over an engine build installed globally and detected * when the user points at an explicit non-engine flavor of OpenSSL */ #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT) #include <openssl/engine.h> #endif #endif /* SSL_PRIVATE_H */ 1.3 +16 -20 jakarta-tomcat-connectors/jni/native/src/ssl.c Index: ssl.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jni/native/src/ssl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ssl.c 12 May 2005 19:28:03 -0000 1.2 +++ ssl.c 20 May 2005 07:01:04 -0000 1.3 @@ -20,31 +20,27 @@ #include "tcn.h" #ifdef HAVE_OPENSSL +#include "ssl_private.h" -/* OpenSSL headers */ -#include <openssl/ssl.h> -#include <openssl/err.h> -#include <openssl/x509.h> -#include <openssl/pem.h> -#include <openssl/crypto.h> -#include <openssl/evp.h> -#include <openssl/rand.h> -#include <openssl/x509v3.h> -/* Avoid tripping over an engine build installed globally and detected - * when the user points at an explicit non-engine flavor of OpenSSL - */ -#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT) -#include <openssl/engine.h> -#endif - - - +TCN_IMPLEMENT_CALL(jint, SSL, version)(TCN_STDARGS) +{ + UNREFERENCED_STDARGS; + return OPENSSL_VERSION_NUMBER; +} + +TCN_IMPLEMENT_CALL(jstring, SSL, versionString)(TCN_STDARGS) +{ + UNREFERENCED(o); + return AJP_TO_JSTRING(OPENSSL_VERSION_TEXT); +} #else - - +/* OpenSSL is not supported + * If someday we make OpenSSL optional + * APR_ENOTIMPL will go here + */ #endif
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]