Commit b801e2f4 authored by Niels Möller's avatar Niels Möller
Browse files

(spki_hash_sexp): Bugfix, don't hash the data once.

Bug reported by Werner Koch.

Rev: src/spki.c:1.36
parent 0faba5ce
......@@ -264,15 +264,13 @@ spki_hash_data(struct hash_algorithm *algorithm,
/* Create an SPKI hash from an s-expression. */
struct sexp *
spki_hash_sexp(struct hash_algorithm *algorithm,
int name,
struct sexp *expr)
struct lsh_string *s = hash_string(algorithm,
sexp_format(expr, SEXP_CANONICAL, 0),
struct lsh_string *s = sexp_format(expr, SEXP_CANONICAL, 0);
struct sexp *hash = spki_hash_data(algorithm, name,
s->length, s->data);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment