You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2004/10/21 19:05:20 UTC

svn commit: rev 55231 - incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce

Author: djd
Date: Thu Oct 21 10:05:19 2004
New Revision: 55231

Modified:
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
Log:
Fix Derby 42

1)The encryption key length is used only for error checking and the fix to not store this information is OK and simple. 

Patch from Sunitha Kambhampati skambha@Yngvi.Org


Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java	(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java	Thu Oct 21 10:05:19 2004
@@ -545,12 +545,6 @@
 					throw StandardException.newException(SQLState.SERVICE_WRONG_BOOT_PASSWORD);
 
 				generatedKey = org.apache.derby.iapi.util.StringUtil.fromHexString(externalKey, 0, externalKey.length());
-				if(create)
-		                   properties.put(Attribute.CRYPTO_KEY_LENGTH,String.valueOf(generatedKey.length));	
-				else
-				  // mismatch in encryptedKey used at creation versus at connecting again
-				  if(generatedKey.length != encodedKeyLength && encodedKeyLength > 0)
-					throw StandardException.newException(SQLState.ENCRYPTION_BAD_EXTERNAL_KEY);
 
 			} else {