Re: luksFormat library API doesnt seem to work with large keyfiles.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Jan 17, 2012 at 3:44 AM, Milan Broz <mbroz@xxxxxxxxxx> wrote:
On 01/17/2012 09:05 AM, .. ink .. wrote:
using cryptsetup 1.4.1

test case belo
(please also read examples in docs/examples)


I have seen the example and the source code, they are both easy to follow and very informative.
 


    status = crypt_keyslot_add_by_volume_key( cd,CRYPT_ANY_SLOT,NULL,32,c,strlen( c ) );

I guess strlen(c) is wrong, it will stop on the first zero (mp3 is binary data, not C string).

What about use st.st_size here?
 
st.st_size works as expected so the bug was on my side. Will stop using strlen to find out length of keyfiles.

Thanks
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux