X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/21c78c9273a5b01f10c2adb9ee03cb8b0fc11bf7..00e64b67d321bf53224d546dcba58c52834a7b79:/tripe.h diff --git a/tripe.h b/tripe.h index 9a180328..06fbf8f1 100644 --- a/tripe.h +++ b/tripe.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: tripe.h,v 1.8 2001/06/19 22:10:57 mdw Exp $ + * $Id: tripe.h,v 1.9 2001/06/22 19:40:36 mdw Exp $ * * Main header file for TrIPE * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: tripe.h,v $ + * Revision 1.9 2001/06/22 19:40:36 mdw + * Support expiry of other peers' public keys. + * * Revision 1.8 2001/06/19 22:10:57 mdw * Some more constants for the algorithms. Document the packet format * change for non-malleability. Moved @buf@ definitions to separate header @@ -335,6 +338,7 @@ typedef struct keyexch { unsigned s; /* Current state in exchange */ sel_timer t; /* Timer for next exchange */ dh_pub kpub; /* Peer's public key */ + time_t texp_kpub; /* Expiry time for public key */ mp *alpha; /* My temporary secret */ mp *c; /* My challenge */ mp *rx; /* The expected response */ @@ -345,6 +349,8 @@ typedef struct keyexch { } keyexch; #define KXF_TIMER 1u /* Waiting for a timer to go off */ +#define KXF_DEAD 2u /* The key-exchanger isn't up */ +#define KXF_PUBKEY 4u /* Key exchanger has a public key */ enum { KXS_DEAD, /* Uninitialized state (magical) */ @@ -484,13 +490,15 @@ extern void km_init(const char */*kr_priv*/, const char */*kr_pub*/, * * Arguments: @const char *tag@ = public key tag to load * @dh_pub *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. */ -extern int km_getpubkey(const char */*tag*/, dh_pub */*kpub*/); +extern int km_getpubkey(const char */*tag*/, dh_pub */*kpub*/, + time_t */*t_exp*/); /*----- Key exchange ------------------------------------------------------*/