chiark / gitweb /
sig: Move marshalling responsibility into sign function
[secnet.git] / secnet.h
index 99662a4135b37af90b4310a30e3879857b714dc3..bd4362e1400fd30608f954a193dc3f8ac01da9e5 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -422,7 +422,10 @@ struct sigpubkey_if {
 
 /* SIGPRIVKEY interface */
 
-typedef string_t sig_makesig_fn(void *st, uint8_t *data, int32_t datalen);
+/* Appends the signature to msg.
+ * Can fail and returnn False, eg if the buffer is too small. */
+typedef bool_t sig_makesig_fn(void *st, uint8_t *data, int32_t datalen,
+                             struct buffer_if *msg);
 struct sigprivkey_if {
     void *st;
     sig_makesig_fn *sign;