X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=keydb_fs.c;h=f8d55dc8233dd80a2b92e6878abee3719dc67cd0;hp=aabb616e7efcd9e3dd82ab567708e8b31e7fb5a8;hb=da1f0ee80a15a9fb6a7d15e81f39ad9dc34db406;hpb=a94e29c9a3763f96b1c773f0818b97e4fd0777b0 diff --git a/keydb_fs.c b/keydb_fs.c index aabb616..f8d55dc 100644 --- a/keydb_fs.c +++ b/keydb_fs.c @@ -379,8 +379,13 @@ static int fs_store_key(struct onak_dbctx *dbctx, } get_skshash(publickey, &hash); - hashid = (hash.hash[0] << 24) + (hash.hash[1] << 16) + - (hash.hash[2] << 8) + hash.hash[3]; + hashid = hash.hash[0]; + hashid <<= 8; + hashid |= hash.hash[1]; + hashid <<= 8; + hashid |= hash.hash[2]; + hashid <<= 8; + hashid |= hash.hash[3]; prove_path_to(hashid, "skshash", dbctx->config->location); skshashpath(wbuffer, sizeof(wbuffer), &hash, dbctx->config->location);