site.c, dh.c, secnet.h: Allow the dh `makeshared' method to fail.
[secnet] / secnet.h
index c93a279..b23ffa8 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -616,9 +616,9 @@ struct netlink_if {
 typedef string_t dh_makepublic_fn(void *st, uint8_t *secret,
                                  int32_t secretlen);
 /* Fills buffer (up to buflen) with shared secret */
-typedef void dh_makeshared_fn(void *st, uint8_t *secret,
-                             int32_t secretlen, cstring_t rempublic,
-                             uint8_t *sharedsecret, int32_t buflen);
+typedef bool_t dh_makeshared_fn(void *st, uint8_t *secret,
+                               int32_t secretlen, cstring_t rempublic,
+                               uint8_t *sharedsecret, int32_t buflen);
 struct dh_if {
     void *st;
     int32_t len; /* Approximate size of modulus in bytes */