/* -*-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
*
/*----- 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
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 */
} 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) */
*
* 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 ------------------------------------------------------*/