On Fri, 15.05.15 16:48, Pavel Odvody (podv...@redhat.com) wrote:

> yes, sha256 - 256bits / 8 = 64bytes (can easily extrapolate other SHAs)
> Zero-length/invalid value would be an error resulting in 404.
> 
> But I wonder whether we want to do that level of validation as the check
> is mostly sanity.
> 
> Something like this?
> 
> typedef struct HashInfo {
>         char *name;
>         size_t length;
> } HashInfo;
> 
> static HashInfo hashes[] = {
>         {"sha256", 64},
>         {"sha384", 96},
>         {"sha512", 128},
>         ...
> };
> 
> What do you think?

Well, I presume that dkr currently only uses one kind of hash, no? If
so, I'd just support that one, and don't bother with anyting more
complex until this really becomes an issue...

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to