db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r543303 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
Date Thu, 31 May 2007 23:03:12 GMT
Author: djd
Date: Thu May 31 16:03:11 2007
New Revision: 543303

URL: http://svn.apache.org/viewvc?view=rev&rev=543303
Log:
Remove unused and old JDK 1.3 code that have explicit com.ibm and com.sun class names for
crypto.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java?view=diff&rev=543303&r1=543302&r2=543303
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
Thu May 31 16:03:11 2007
@@ -72,7 +72,6 @@
 {
     private final static String MESSAGE_DIGEST = "MD5";
 
-	private final static String DEFAULT_PROVIDER = "com.sun.crypto.provider.SunJCE";
 	private final static String DEFAULT_ALGORITHM = "DES/CBC/NoPadding";
 	private final static String DES = "DES";
 	private final static String DESede = "DESede";
@@ -423,28 +422,7 @@
 
         cryptoProvider = properties.getProperty(Attribute.CRYPTO_PROVIDER);
 
-		if (cryptoProvider == null)
-		{
-			// JDK 1.3 does not create providers by itself.
-			if (JVMInfo.JDK_ID == JVMInfo.J2SE_13) {
-
-				String vendor;
-				try {
-					vendor = System.getProperty("java.vendor", "");
-				} catch (SecurityException se) {
-					vendor = "";
-				}
-
-				vendor = StringUtil.SQLToUpperCase(vendor);
-
-				if (vendor.startsWith("IBM "))
-					cryptoProvider = "com.ibm.crypto.provider.IBMJCE";
-				else if (vendor.startsWith("SUN "))
-					cryptoProvider = "com.sun.crypto.provider.SunJCE";
-
-			}
-		}
-		else
+		if (cryptoProvider != null)
 		{
             provider_or_algo_specified = true;
 



Mime
View raw message