[virt-tools-list] [libosinfo 1/3] Every driver file in DB must provide MD5 checksum

Christophe Fergeau cfergeau at redhat.com
Wed Dec 12 15:26:33 UTC 2012


On Wed, Dec 12, 2012 at 04:06:10PM +0200, Zeeshan Ali (Khattak) wrote:
> On Wed, Dec 12, 2012 at 11:25 AM, Christophe Fergeau
> <cfergeau at redhat.com> wrote:
> > On Wed, Dec 12, 2012 at 03:21:28AM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> >>
> >> ---
> >>  data/schemas/libosinfo.rng            |  9 +++++++++
> >>  osinfo/osinfo_device_driver.c         | 18 ++++++++++++++++++
> >>  osinfo/osinfo_device_driver_private.h |  3 +++
> >>  osinfo/osinfo_loader.c                | 11 ++++++++---
> >>  4 files changed, 38 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> >> index 51b0c20..819790a 100644
> >> --- a/data/schemas/libosinfo.rng
> >> +++ b/data/schemas/libosinfo.rng
> >> @@ -415,6 +415,9 @@
> >>        </optional>
> >>        <zeroOrMore>
> >>          <element name='file'>
> >> +          <attribute name="md5">
> >> +            <ref name='md5'/>
> >> +          </attribute>
> >>            <text/>
> >>          </element>
> >>        </zeroOrMore>
> >> @@ -636,4 +639,10 @@
> >>        <param name="pattern">dos|unix</param>
> >>      </data>
> >>    </define>
> >> +
> >> +  <define name='md5'>
> >> +    <data type="string">
> >> +      <param name="pattern">[0-9a-fA-F]{32}</param>
> >> +    </data>
> >> +  </define>
> >
> > I'd go with SHA256 from the start
> 
> Why? Do we expect these files to be huge? MD5 should suffice.

As you said in one of your other email, we don't really know what creative
use applications would make of these checksums, md5 is old, unsecure, ...
so I'm not sure it's a good idea to use this in new code.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121212/268d4cfc/attachment.sig>


More information about the virt-tools-list mailing list