chiark / gitweb /
server: Use the new kdata system.
[tripe] / server / tripe.h
index 217a88dfd00ab4c9760ca767640f9f351a68f135..b22dccce4830a8d8e4431a95f1477602b4a994e6 100644 (file)
@@ -153,8 +153,6 @@ typedef struct algswitch {
   size_t cksz, mksz;                   /* Key lengths for @c@ and @m@ */
 } algswitch;
 
-extern algswitch algs;
-
 typedef struct kdata {
   unsigned ref;                                /* Reference counter */
   struct knode *kn;                    /* Pointer to cache entry */
@@ -277,12 +275,12 @@ typedef struct kxchal {
 
 typedef struct keyexch {
   struct peer *p;                      /* Pointer back to the peer */
+  kdata *kpriv;                                /* Private key and related info */
+  kdata *kpub;                         /* Peer's public key */
   keyset **ks;                         /* Peer's list of keysets */
   unsigned f;                          /* Various useful flags */
   unsigned s;                          /* Current state in exchange */
   sel_timer t;                         /* Timer for next exchange */
-  ge *kpub;                            /* Peer's public key */
-  time_t texp_kpub;                    /* Expiry time for public key */
   mp *alpha;                           /* My temporary secret */
   ge *c;                               /* My challenge */
   ge *rx;                              /* The expected response */
@@ -519,10 +517,6 @@ typedef struct admin {
 /*----- Global variables --------------------------------------------------*/
 
 extern sel_state sel;                  /* Global I/O event state */
-extern group *gg;                      /* The group we work in */
-extern size_t indexsz;                 /* Size of exponent for the group */
-extern mp *kpriv;                      /* Our private key */
-extern ge *kpub;                       /* Our public key */
 extern octet buf_i[PKBUFSZ], buf_o[PKBUFSZ], buf_t[PKBUFSZ], buf_u[PKBUFSZ];
 extern const tunnel_ops *tunnels[];    /* Table of tunnels (0-term) */
 extern const tunnel_ops *tun_default;  /* Default tunnel to use */
@@ -621,21 +615,6 @@ extern void km_unref(kdata */*kd*/);
 
 extern const char *km_tag(kdata */*kd*/);
 
-/* --- @km_getpubkey@ --- *
- *
- * Arguments:  @const char *tag@ = public key tag to load
- *             @ge *kpub@ = where to put the public key
- *             @time_t *t_exp@ = where to put the expiry time
- *
- * Returns:    Zero if OK, nonzero if it failed.
- *
- * Use:                Fetches a public key from the keyring.  (Temporary
- *             compatibility hack.)
- */
-
-extern int km_getpubkey(const char */*tag*/, ge */*kpub*/,
-                       time_t */*t_exp*/);
-
 /*----- Key exchange ------------------------------------------------------*/
 
 /* --- @kx_start@ --- *