The SILC Project

source navigation ]
identifier search ]
freetext search ]
file search ]

silc/silcd/protocol.h

  1 /*
  2 
  3   protocol.h
  4 
  5   Author: Pekka Riikonen <priikone@silcnet.org>
  6 
  7   Copyright (C) 1997 - 2003 Pekka Riikonen
  8 
  9   This program is free software; you can redistribute it and/or modify
 10   it under the terms of the GNU General Public License as published by
 11   the Free Software Foundation; version 2 of the License.
 12 
 13   This program is distributed in the hope that it will be useful,
 14   but WITHOUT ANY WARRANTY; without even the implied warranty of
 15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16   GNU General Public License for more details.
 17 
 18 */
 19 
 20 #ifndef PROTOCOL_H
 21 #define PROTOCOL_H
 22 
 23 /* SILC client protocol types */
 24 #define SILC_PROTOCOL_SERVER_NONE               0
 25 #define SILC_PROTOCOL_SERVER_CONNECTION_AUTH    1
 26 #define SILC_PROTOCOL_SERVER_KEY_EXCHANGE       2
 27 #define SILC_PROTOCOL_SERVER_REKEY              3
 28 #define SILC_PROTOCOL_SERVER_BACKUP             4
 29 /* #define SILC_PROTOCOL_SERVER_MAX             255 */
 30 
 31 /* Internal context for Key Exchange protocol. */
 32 typedef struct {
 33   void *server;
 34   void *context;
 35   SilcSocketConnection sock;
 36   SilcRng rng;
 37 
 38   /* TRUE if we are receiveing part of the protocol */
 39   bool responder;
 40 
 41   /* Destinations ID taken from authenticataed packet so that we can
 42      get the destinations ID. */
 43   void *dest_id;
 44   SilcIdType dest_id_type;
 45 
 46   /* Pointers to the configurations. Defined only when responder is TRUE */
 47   SilcServerConfigRef cconfig;
 48   SilcServerConfigRef sconfig;
 49   SilcServerConfigRef rconfig;
 50 
 51   SilcTask timeout_task;
 52   SilcPacketContext *packet;
 53   SilcSKESecurityPropertyFlag flags;
 54   SilcSKE ske;
 55   SilcSKEKeyMaterial *keymat;
 56 } SilcServerKEInternalContext;
 57 
 58 /* Internal context for connection authentication protocol */
 59 typedef struct {
 60   void *server;
 61   void *context;
 62   SilcSocketConnection sock;
 63 
 64   /* TRUE if we are receiving part of the protocol */
 65   bool responder;
 66 
 67   /* SKE object from Key Exchange protocol. */
 68   SilcSKE ske;
 69 
 70   /* Authentication method and data if we alreay know it. This is filled
 71      before starting the protocol if we know the authentication data.
 72      Otherwise these are and remain NULL. Used when we are initiating. */
 73   SilcUInt32 auth_meth;
 74   void *auth_data;
 75   SilcUInt32 auth_data_len;
 76 
 77   /* Destinations ID from KE protocol context */
 78   void *dest_id;
 79   SilcIdType dest_id_type;
 80 
 81   /* Pointers to the configurations. Defined only when responder is TRUE */
 82   SilcServerConfigRef cconfig;
 83   SilcServerConfigRef sconfig;
 84   SilcServerConfigRef rconfig;
 85 
 86   SilcTask timeout_task;
 87   SilcPacketContext *packet;
 88   SilcUInt16 conn_type;
 89 } SilcServerConnAuthInternalContext;
 90 
 91 /* Internal context for the rekey protocol */
 92 typedef struct {
 93   void *server;
 94   void *context;
 95   SilcSocketConnection sock;
 96   bool responder;                   /* TRUE if we are receiving party */
 97   bool pfs;                         /* TRUE if PFS is to be used */
 98   SilcSKE ske;                      /* Defined if PFS is used */
 99   SilcPacketContext *packet;
100   SilcTask timeout_task;
101 } SilcServerRekeyInternalContext;
102 
103 /* Prototypes */
104 void silc_server_protocols_register(void);
105 void silc_server_protocols_unregister(void);
106 int silc_server_protocol_ke_set_keys(SilcServer server,
107                                      SilcSKE ske,
108                                      SilcSocketConnection sock,
109                                      SilcSKEKeyMaterial *keymat,
110                                      SilcCipher cipher,
111                                      SilcPKCS pkcs,
112                                      SilcHash hash,
113                                      SilcHmac hmac,
114                                      SilcSKEDiffieHellmanGroup group,
115                                      bool is_responder);
116 
117 #endif
118 

This page was automatically generated by the LXR engine.
Free-text search provided by Glimpse