Linux local db encryption issue b11
Jason Moehlman
jmoehlma at moehlman.com
Fri Dec 5 07:16:06 CST 2008
Hi Kirill,
V4RB on RB2008r3.1
Once I started thinking about it, I believe that local file encryption
on Linux has been broken for a while, but I don't generally use local
files, mostly VServer so I did not worry too much.
dbfile = dbname+".vdb"
f = new folderItem(dbfile)
if f.Exists then
if lsldb.lslencrypt then
vcdb.UseEncryptionKey(dbAuth(4),EVDataKind.kStructureOnly)
vcdb.UseEncryptionKey(dbAuth(5),EVDataKind.kRecordsOnly)
end if
vcdb.open(f)
if vcdb.IsOpen then
if lsldb.lslencrypt then
if not vcdb.IsEncrypted then
vcdb.Encrypt(dbAuth(4),EVDataKind.kStructureOnly) //
kStructureAndRecords, kStructure
vcdb.Encrypt(dbAuth(5),EVDataKind.kRecordsOnly) //
kStructureAndRecords, kStructure
end if
end if
end if
if not vcdb.isopen then
#if TargetHasGUI then
msgBox "Database Open Failed"
system.log(system.LogLevelError,"LSL DB Error: Database
Open Failed")
#else
system.log(system.LogLevelError,"LSL DB Error: Database
Open Failed")
#endif
quit
end if
me.lslconnected=true
else
vcdb.create(f,EVDbMode.kDsc_Dat_Blb_Ind,64*1024)
if not vcdb.isopen then
#if TargetHasGUI then
msgBox "Database Create Failed"
system.log(system.LogLevelError,"LSL DB Error: Database
Create Failed")
#else
system.log(system.LogLevelError,"LSL DB Error: Database
Create Failed")
#endif
quit
end if
me.lslconnected=true
if not dbraw then
result=createtables(me)
updateStatus(15)
result = populatedb(me)
if vcdb.IsOpen then
if lsldb.lslencrypt then
if not vcdb.IsEncrypted then
vcdb.Encrypt(dbAuth(4),EVDataKind.kStructureOnly) //
kStructureAndRecords, kStructure
vcdb.Encrypt(dbAuth(5),EVDataKind.kRecordsOnly) //
kStructureAndRecords, kStructure
end if
end if
end if
end if
end if
Jason
On Dec 5, 2008, at 4:04 AM, Kirill Pekarov wrote:
> Hi, Jason.
>
> You wrote 05.12.2008, 2:08:41:
>
>> Has anyone had any luck encrypting a local file db on a linux system.
>
>> Everytime I encrypt the db at creation or after the fact I cannot
>> open
>> or access it again - seems corrupt.
>
> What ADK do you use? How you encrypt database and how you then open
> it? Can you show your code here?
>
>
> --
> Best regards,
>
> Kirill Pekarov
> Software Engineer Associate
> Paradigma Software, Inc
> Valentina - The Ultra-Fast Database
> http://www.valentina-db.com
>
> _______________________________________________
> Valentina-beta mailing list
> Valentina-beta at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-beta
More information about the Valentina-beta
mailing list