Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 64299 invoked from network); 21 Jul 2006 17:52:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 17:52:30 -0000 Received: (qmail 34591 invoked by uid 500); 21 Jul 2006 17:52:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34435 invoked by uid 500); 21 Jul 2006 17:52:29 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 34426 invoked by uid 99); 21 Jul 2006 17:52:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 10:52:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 10:52:28 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDA3E41000E for ; Fri, 21 Jul 2006 17:50:14 +0000 (GMT) Message-ID: <10456389.1153504214905.JavaMail.jira@brutus> Date: Fri, 21 Jul 2006 10:50:14 -0700 (PDT) From: "Sunitha Kambhampati (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1373) Encrypted databases cannot be booted using the jar subprotocol (and possibly also using http/https/classpath) In-Reply-To: <12503034.1149286949847.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1373?page=all ] Sunitha Kambhampati updated DERBY-1373: --------------------------------------- Attachment: 10.1_explicitsvnadd_derby1373.diff.txt In the earlier patch 10.1_derby1373.diff.txt' the new files didnt get added to the patch because,merge adds the files to the codeline but does not do a svn add. In this case, svn stat shows A+ which is just the property file changes. It does not add the file. I am attaching a new patch '10.1_explicitsvnadd_derby1373.diff.txt' that has all the newly added files in it. svn stat M java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java M java\testing\org\apache\derbyTesting\functionTests\tests\store\copyfiles.ant A java\testing\org\apache\derbyTesting\functionTests\tests\store\encryptionKey_jar.sql A java\testing\org\apache\derbyTesting\functionTests\tests\store\encryptionKey_jar_app.properties A java\testing\org\apache\derbyTesting\functionTests\master\encryptionKey_jar.out M java\testing\org\apache\derbyTesting\functionTests\suites\encryptionAll.runall Can someone look at this patch. Thanks to Deepa for pointing the issue with 'A+' in the svn stat. . Thanks, Sunitha. > Encrypted databases cannot be booted using the jar subprotocol (and possibly also using http/https/classpath) > ------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1373 > URL: http://issues.apache.org/jira/browse/DERBY-1373 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.1.2.4 > Environment: Environment does not matter. > Reporter: Mathias Herberts > Assigned To: Mathias Herberts > Fix For: 10.2.0.0 > > Attachments: 10.1_derby1373.diff.txt, 10.1_explicitsvnadd_derby1373.diff.txt, derby1373.diff.txt, derby1373.stat.txt, encryptedJar.patch, InputStreamFile.java-patch, InputStreamRandomAccessFile.java > > > An encrypted database cannot be booted when using the jar subprotocol. > The problem lies in the method run from JCECipherFactory. The call to getRandomAccessFile returns null when the verifyKeyFile is an instance of InputStreamFile and the key verification therefore fails. > The implementation of getRandomAccessFile for InputStreamFile states that its code cannot be reached which is untrue. > The provided patch does two things, it provides a new class InputStreamRandomAccessFile in package org.apache.derby.impl.io. This class provides simple implementations of readInt and readFully so the key verification process succeeds. A quick scan of the derby source tree showed no problem or possible impact of this simple implementation. > The second thing the patch does is to modify org/apache/derby/impl/io/InputStreamFile.java so the getRandomAccessFile creates an instance of InputStreamRandomAccessFile instead of returning null. > This patch has been tested against trunk 410361. It solves the problem at least under the jar subprotocol. > The patch has not been tested against http/https/classpath. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira