You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/04/07 16:18:42 UTC
svn commit: r1671854 - in /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni:
Error.java Library.java SSL.java
Author: markt
Date: Tue Apr 7 14:18:42 2015
New Revision: 1671854
URL: http://svn.apache.org/r1671854
Log:
Align implementation with 8.0.x (use final, add some new constants, throw Exception rather than Throwable)
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Error.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/SSL.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Error.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Error.java?rev=1671854&r1=1671853&r2=1671854&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Error.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Error.java Tue Apr 7 14:18:42 2015
@@ -28,12 +28,12 @@ public class Error extends Exception {
/**
* APR error type.
*/
- private int error;
+ private final int error;
/**
* A description of the problem.
*/
- private String description;
+ private final String description;
/**
* Construct an APRException.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java?rev=1671854&r1=1671853&r2=1671854&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java Tue Apr 7 14:18:42 2015
@@ -26,13 +26,13 @@ import java.io.File;
public final class Library {
/* Default library names */
- private static String [] NAMES = {"tcnative-1", "libtcnative-1"};
+ private static final String [] NAMES = {"tcnative-1", "libtcnative-1"};
/*
* A handle to the unique Library singleton instance.
*/
private static Library _instance = null;
- private Library() throws Throwable {
+ private Library() throws Exception {
boolean loaded = false;
String path = System.getProperty("java.library.path");
String [] paths = path.split(File.pathSeparator);
@@ -44,6 +44,8 @@ public final class Library {
} catch (ThreadDeath t) {
throw t;
} catch (VirtualMachineError t) {
+ // Don't use a Java 7 multiple exception catch so we can keep
+ // the JNI code identical between Tomcat 6/7/8
throw t;
} catch (Throwable t) {
String name = System.mapLibraryName(NAMES[i]);
@@ -166,7 +168,7 @@ public final class Library {
* @param libraryName the name of the library to load
*/
public static boolean initialize(String libraryName)
- throws Throwable
+ throws Exception
{
if (_instance == null) {
if (libraryName == null)
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/SSL.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/SSL.java?rev=1671854&r1=1671853&r2=1671854&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/SSL.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/SSL.java Tue Apr 7 14:18:42 2015
@@ -139,6 +139,10 @@ 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_2 = 0x08000000;
+ public static final int SSL_OP_NO_TLSv1_1 = 0x10000000;
+
+ public static final int SSL_OP_NO_TICKET = 0x00004000;
// SSL_OP_PKCS1_CHECK_1 and SSL_OP_PKCS1_CHECK_2 flags are unsupported
// in the current version of OpenSSL library. See ssl.h changes in commit
@@ -329,7 +333,7 @@ public final class SSL {
/**
* Generate temporary RSA key.
- * <br />
+ * <br>
* Index can be one of:
* <PRE>
* SSL_TMP_KEY_RSA_512
@@ -345,7 +349,7 @@ public final class SSL {
/**
* Load temporary DSA key from file
- * <br />
+ * <br>
* Index can be one of:
* <PRE>
* SSL_TMP_KEY_DH_512
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org