Deprecated No Reply SKE flag, introduced IV Included flag.
[silc.git] / lib / silcske / silcske.h
index 5c552e03b7051962ea6eee7359f15d9c2eaa4522..597cea10a26cf42c354d4fa0aca54d4e42d12857 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef SILCSKE_H
 #define SILCSKE_H
 
-/****h* silcske/SilcSKEAPI
+/****h* silcske/SILC SKE Interface
  *
  * DESCRIPTION
  *
@@ -273,10 +273,10 @@ typedef struct {
  * SOURCE
  */
 typedef enum {
-  SILC_SKE_SP_FLAG_NONE      = 0x00,     /* No flags */
-  SILC_SKE_SP_FLAG_NO_REPLY  = 0x01,    /* No reply required to payload */
-  SILC_SKE_SP_FLAG_PFS       = 0x02,    /* Perfect Forward Secrecy */
-  SILC_SKE_SP_FLAG_MUTUAL    = 0x04,    /* Mutual authentication */
+  SILC_SKE_SP_FLAG_NONE         = 0x00,         /* No flags */
+  SILC_SKE_SP_FLAG_IV_INCLUDED  = 0x01,         /* IV included in ciphertexts */
+  SILC_SKE_SP_FLAG_PFS          = 0x02,         /* Perfect Forward Secrecy */
+  SILC_SKE_SP_FLAG_MUTUAL       = 0x04,         /* Mutual authentication */
 } SilcSKESecurityPropertyFlag;
 /***/
 
@@ -335,6 +335,7 @@ struct SilcSKEStruct {
   SilcSKEStartPayload *start_payload;
   SilcSKEKEPayload *ke1_payload;
   SilcSKEKEPayload *ke2_payload;
+  unsigned char *remote_version;
 
   /* Temporary copy of the KE Start Payload used in the
      HASH computation. */
@@ -892,4 +893,32 @@ silc_ske_process_key_material_data(unsigned char *data,
  ***/
 void silc_ske_free_key_material(SilcSKEKeyMaterial *key);
 
+/****f* silcske/SilcSKEAPI/silc_ske_parse_version
+ *
+ * SYNOPSIS
+ *
+ *    bool silc_ske_parse_version(SilcSKE ske, 
+ *                                SilcUInt32 *protocol_version,
+ *                                char **protocol_version_string,
+ *                                SilcUInt32 *software_version, 
+ *                                char **software_version_string,
+ *                                char **vendor_version);
+ *
+ * DESCRIPTION
+ *
+ *    This utility function can be used to parse the remote host's version
+ *    string.  This returns the protocol version, and software version into
+ *    the `protocol_version', `software_version' and `vendor_version' pointers
+ *    if they are provided.  The string versions of the versions are saved
+ *    in *_string pointers if they are provided.  Returns TRUE if the version
+ *    string was successfully parsed.
+ *
+ ***/
+bool silc_ske_parse_version(SilcSKE ske, 
+                           SilcUInt32 *protocol_version,
+                           char **protocol_version_string,
+                           SilcUInt32 *software_version, 
+                           char **software_version_string,
+                           char **vendor_version);
+
 #endif /* !SILCSKE_H */