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

(make_sexp_print_raw_hash): Deleted

function.
(sexp_print_raw_hash): Deleted command.

Rev: src/sexp_commands.c:1.23
parent 2e0e5826
......@@ -90,38 +90,7 @@ make_sexp_print_to(int format, struct abstract_write *dest)
&dest->super);
}
DEFINE_COMMAND3(sexp_print_raw_hash)
(struct lsh_object *a1,
struct lsh_object *a2,
struct lsh_object *a3,
struct command_continuation *c,
struct exception_handler *e UNUSED)
{
CAST_SUBTYPE(hash_algorithm, algorithm, a1);
CAST_SUBTYPE(abstract_write, dest, a2);
CAST_SUBTYPE(sexp, o, a3);
struct lsh_string *canonical = sexp_format(o, SEXP_CANONICAL, 0);
struct hash_instance *hash = MAKE_HASH(algorithm);
struct lsh_string *digest = lsh_string_alloc(hash->hash_size);
HASH_UPDATE(hash, canonical->length, canonical->data);
HASH_DIGEST(hash, digest->data);
lsh_string_free(canonical);
KILL(hash);
A_WRITE(dest, ssh_format("%lxfS\n", digest));
COMMAND_RETURN(c, o);
}
struct command *
make_sexp_print_raw_hash(struct hash_algorithm *algorithm)
{
return make_command_3_invoke(&sexp_print_raw_hash,
&algorithm->super);
}
/* FIXME: Should be obsoleted; used by spki_commands.c */
/* GABA:
......
Markdown is supported
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