diff --git a/src/common/crypto.c b/src/common/crypto.c
index aeef1e3c6b..b9829ecd1a 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1635,7 +1635,8 @@ crypto_digest_assign(crypto_digest_t *into,
/** Given a list of strings in lst, set the len_out-byte digest
* at digest_out to the hash of the concatenation of those strings,
* plus the optional string append, computed with the algorithm
- * alg. */
+ * alg.
+ * out_len must be \<= DIGEST256_LEN. */
void
crypto_digest_smartlist(char *digest_out, size_t len_out,
const smartlist_t *lst, const char *append,
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 63f8fab104..87dc608e57 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -683,7 +683,12 @@ router_get_extrainfo_hash(const char *s, size_t s_len, char *digest)
"\nrouter-signature",'\n', DIGEST_SHA1);
}
-/** DOCDOC */
+/** Helper: used to generate signatures for routers, directories and
+ * network-status objects. Given a digest_len-byte digest in
+ * digest and a secret private_key, generate an PKCS1-padded
+ * signature, BASE64-encode it, surround it with -----BEGIN/END----- pairs,
+ * and return the new signature on success or NULL on failure.
+ */
char *
router_get_dirobj_signature(const char *digest,
size_t digest_len,