server/keymgmt.c: Capture copies of the keyring and tag strings.
[tripe] / server / tripe.h
index ba47232..bf75b45 100644 (file)
@@ -819,7 +819,7 @@ extern const tunnel_ops *tunnels[]; /* Table of tunnels (0-term) */
 extern const tunnel_ops *tun_default;  /* Default tunnel to use */
 extern udpsocket udpsock[NADDRFAM];    /* The master UDP sockets */
 extern kdata *master;                  /* Default private key */
-extern const char *tag_priv;           /* Default private key tag */
+extern char *tag_priv;                 /* Default private key tag */
 
 #ifndef NTRACE
 extern const trace_opt tr_opts[];      /* Trace options array */
@@ -859,6 +859,20 @@ extern void km_init(const char */*privkr*/, const char */*pubkr*/,
 
 extern int km_reload(void);
 
+/* --- @km_clear@ --- *
+ *
+ * Arguments:  ---
+ *
+ * Returns:    ---
+ *
+ * Use:                Forget the currently loaded keyrings.  The @master@ key will
+ *             be cleared, but other keys already loaded will continue to
+ *             exist until their reference count drops to zero.  Call
+ *             @km_init@ to make everything work again.
+ */
+
+extern void km_clear(void);
+
 /* --- @km_findpub@, @km_findpriv@ --- *
  *
  * Arguments:  @const char *tag@ = key tag to load