chiark / gitweb /
privcache: Break out DEFAULT_MAXPRIV_BYTES
[secnet.git] / privcache.c
index ba5ddc903a0ee4e5fdb4be83d18236bb45048938..719a2d0da72e2f5b3fd0674814719bb6bf41c0bf 100644 (file)
@@ -21,6 +21,7 @@
 #include "util.h"
 
 #define DEFAULT_SIZE 5
+#define DEFAULT_MAXPRIV_BYTES 4095
 
 struct ent {
     struct sigkeyid id;
@@ -207,7 +208,7 @@ static list_t *privcache_apply(closure_t *self, struct cloc loc,
     st->used=0;
 
     int32_t buflen=dict_read_number(dict,"privkey-max",False,"privcache",loc,
-                                   4095);
+                                   DEFAULT_MAXPRIV_BYTES);
     buffer_new(&st->databuf,buflen+1);
 
     const char *path=dict_read_string(dict,"privkeys",True,"privcache",loc);