GPG cannot evaluate the length of text file.

Werner Koch wk at gnupg.org
Wed Dec 3 20:12:14 CET 2014


On Wed,  3 Dec 2014 16:31, sieutruc at gmail.com said:

> gpg2 --verbose --no-mdc-warning --verbose --y --batch --passphrase
> :literal data packet:
>     mode t (74), created 1417110768, name="4481110.txt",
>     raw data: unknown length  ( THE PROBLEM HERE )

Unknown length means that this packet uses partial length encoding
because it does not know the length in advance and gpg always works in
stream mode.

> As i know, if the file length is more than 5Gb, that problem appears.

It is not a problem, it is just a standard encoding.

> But this file has only 499b. Its weird.

You used the --textmode option to create the file and thus we hit this
condition:

        /* Because the text_filter modifies the length of the
         * data, it is not possible to know the used length
         * without a double read of the file - to avoid that
         * we simple use partial length packets. */
        if ( ptmode == 't' )
	  filesize = 0;


Shalom-Salam,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-users mailing list