OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [office] RE: Directories in Zip packages


+1 on your conclusion.

 - Dennis

More amusement:

Yes, but an uncompressed file of length 0 both compressed and uncompressed
length of 0, just like those "faux" directory entries.  Normally, a Zipper
doesn't compress a file when the uncompressed form is shorter, the exception
in ODF being that any file that is encrypted (!) is always compressed.

Oh yes, encryption of (empty) directories.  Perish the thought.

-----Original Message-----
From: Bob Jolliffe [mailto:bobjolliffe@gmail.com] 
Sent: Monday, September 27, 2010 15:19
To: dennis.hamilton@acm.org
Cc: Hanssens Bart; Svante Schubert; ODF TC List
Subject: Re: [office] RE: Directories in Zip packages

On 27 September 2010 22:11, Dennis E. Hamilton <dennis.hamilton@acm.org>
wrote:
> -1
>
> Unless there is a proposal for how to accomplish the signing of
> "directories" via XML Digital Signature (and also directory entries for
> package files, which we don't sign either).
>
> Please include a specific rule for knowing what is a directory entry in
the
> Zip, because there is no help in APPNOTE 6.2.0 that I can find.

Not sure whether this should make me laugh or cry.  Given that it
seems you are right that the appnote is not helpful, and given that I
know the java ZipEntry class has a method called isDirectory(), I
thought I'd quickly look up how the openjdk implements it:

     public boolean isDirectory() {
         return name.endsWith("/");
     }

well there you have it.  Make of that what you will :-)

In practice, besides the trailing '/', it does look empirically like
you can spot a directory by the fact that the local file header of the
entry is followed immediately by the next local file header ie. there
is no file data section.  Note this is unlike the zero length file
(which has a file data section of 2 bytes worth of compression
infrastructure). So as far as 'directory' entries are concerned there
really really doesn't seem to be anything to sign.  So I guess I would
go along with Bart's suggestion but minus the "directories".  And if
we do find these things in an odf zip package (which we'd rather not)
the consumer could and should simply ignore them.

Cheers
Bob

[ ... ]



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]