Merge branch 'master' of ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / identity-provider / identity_provider.h
index 9fe444da4898ec22393b9df33373b4720c386fc1..6fe6102c857caf7766859f95ac0986337741c8f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2016 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2016 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public Liceidentity as published
@@ -58,14 +58,19 @@ struct GNUNET_IDENTITY_PROVIDER_Ticket
 /**
  * Answer from service to client after issue operation
  */
-struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage
+struct IssueResultMessage
 {
   /**
    * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE
    */
   struct GNUNET_MessageHeader header;
 
-  /* followed by 0-terminated ticket */
+  /**
+   * Unique identifier for this request (for key collisions).
+   */
+  uint32_t id GNUNET_PACKED;
+
+  /* followed by 0-terminated label,ticket,token */
 
 };
 
@@ -73,7 +78,7 @@ struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage
 /**
  * Ticket exchange message.
  */
-struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage
+struct ExchangeResultMessage
 {
   /**
    * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
@@ -81,10 +86,15 @@ struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage
   struct GNUNET_MessageHeader header;
 
   /**
-   * Number of bytes in token string including 0-termination, in NBO;
+   * Unique identifier for this request (for key collisions).
+   */
+  uint32_t id GNUNET_PACKED;
+
+  /**
+   * Nonce found in ticket. NBO
    * 0 on error.
    */
-  uint16_t name_len GNUNET_PACKED;
+  uint64_t ticket_nonce GNUNET_PACKED;
 
   /* followed by 0-terminated token */
 
@@ -95,13 +105,19 @@ struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage
 /**
  * Client requests IdP to issue token.
  */
-struct GNUNET_IDENTITY_PROVIDER_IssueMessage
+struct IssueMessage
 {
   /**
    * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * Unique identifier for this request (for key collisions).
+   */
+  uint32_t id GNUNET_PACKED;
+
+
   /**
    * Issuer identity private key
    */
@@ -131,13 +147,18 @@ struct GNUNET_IDENTITY_PROVIDER_IssueMessage
 /**
  * Use to exchange a ticket for a token
  */
-struct GNUNET_IDENTITY_PROVIDER_ExchangeMessage
+struct ExchangeMessage
 {
   /**
    * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
    */
   struct GNUNET_MessageHeader header;
-  
+
+  /**
+   * Unique identifier for this request (for key collisions).
+   */
+  uint32_t id GNUNET_PACKED;
+
   /**
    * Audience identity private key
    */