db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Herberts" <mathias.herbe...@gmail.com>
Subject Problem using encrypted databases with jar subprotocol
Date Tue, 30 May 2006 22:46:18 GMT
The current trunk (410361) does not allow to have encrypted databases
using encryptionKey with the jar subprotocol (and probably also the
http/https and classpath subprotocols also).

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.

Included in this email is 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.

Also included in this email is a patch to
org/apache/derby/impl/io/InputStreamFile.java so the
getRandomAccessFile creates an instance of InputStreamRandomAccessFile
instead of returning null.

I have tested my patch with an encrypted db accessed via the jar
subprotocol, it has not been tested with any other subprotocol.

Regards,

Mathias.

Mime
View raw message