summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-data.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-16 12:04:59 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-16 13:40:12 +0200
commit97ef24340da7d3f55a39ba16b400d13f9bbe9e60 (patch)
treee13656c267343db47a4f79d2098222909222736d /src/ipcpd/shim-data.c
parentc884fb9d6b3d3ea59f5fc7c5d709bfff4fcf1849 (diff)
downloadouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.tar.gz
ouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.zip
ipcpd: Allow specifying the hash algorithm to use
Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
Diffstat (limited to 'src/ipcpd/shim-data.c')
-rw-r--r--src/ipcpd/shim-data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/shim-data.c b/src/ipcpd/shim-data.c
index 4459837d..2ef48cb0 100644
--- a/src/ipcpd/shim-data.c
+++ b/src/ipcpd/shim-data.c
@@ -187,7 +187,7 @@ static struct reg_entry * find_reg_entry_by_hash(struct shim_data * data,
list_for_each(h, &data->registry) {
struct reg_entry * e = list_entry(h, struct reg_entry, list);
- if (!memcmp(e->hash, hash, ipcpi.dir_hash_len))
+ if (!memcmp(e->hash, hash, ipcp_dir_hash_len()))
return e;
}
@@ -202,7 +202,7 @@ static struct dir_entry * find_dir_entry(struct shim_data * data,
list_for_each(h, &data->directory) {
struct dir_entry * e = list_entry(h, struct dir_entry, list);
if (e->addr == addr &&
- !memcmp(e->hash, hash, ipcpi.dir_hash_len))
+ !memcmp(e->hash, hash, ipcp_dir_hash_len()))
return e;
}
@@ -215,7 +215,7 @@ static struct dir_entry * find_dir_entry_any(struct shim_data * data,
struct list_head * h;
list_for_each(h, &data->directory) {
struct dir_entry * e = list_entry(h, struct dir_entry, list);
- if (!memcmp(e->hash, hash, ipcpi.dir_hash_len))
+ if (!memcmp(e->hash, hash, ipcp_dir_hash_len()))
return e;
}