[dm-crypt] luksFormat library API doesnt seem to work with large keyfiles.

.. ink .. mhogomchungu at gmail.com
Wed Jan 18 04:15:17 CET 2012


On Tue, Jan 17, 2012 at 3:44 AM, Milan Broz <mbroz at redhat.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20120117/41a89782/attachment.html>


More information about the dm-crypt mailing list