+
[oweals/gnunet.git] / src / credential / credential.h
index c5c0183cc90b7e2fd49f46d0d4ee65b0e218eee9..66a4636fc73b1547d1225c1f64c8f3f906b5d2ea 100644 (file)
@@ -20,7 +20,7 @@
 /**
  * @file credential/credential.h
  * @brief IPC messages between CREDENTIAL API and CREDENTIAL service
- * @author Adnan Husain 
+ * @author Martin Schanzenbach
  */
 #ifndef CREDENTIAL_H
 #define CREDENTIAL_H
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
+/**
+ * Message from client to Credential service to collect credentials.
+ */
+struct CollectMessage
+{
+  /**
+   * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Subject public key
+   */
+  struct GNUNET_CRYPTO_EcdsaPrivateKey subject_key;
+
+  /**
+   * Trust anchor
+   */
+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
+
+  /**
+   * Length of the issuer attribute
+   */
+  uint16_t issuer_attribute_len;
+
+  /**
+   * Unique identifier for this request (for key collisions).
+   */
+  uint32_t id GNUNET_PACKED;
+
+  /* Followed by the zero-terminated attribute */
+
+};
+
+
 /**
  * Message from client to Credential service to verify attributes.
  */
@@ -50,21 +85,21 @@ struct VerifyMessage
   struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
 
   /**
-   * Length of the issuer attribute
+   * Number of credentials
    */
-  uint16_t issuer_attribute_len;
+  uint32_t c_count;
 
   /**
-   * Length of the subject attribute
+   * Length of the issuer attribute
    */
-  uint16_t subject_attribute_len;
+  uint16_t issuer_attribute_len;
 
   /**
    * Unique identifier for this request (for key collisions).
    */
   uint32_t id GNUNET_PACKED;
 
-  /* Followed by the zero-terminated attributes to look up */
+  /* Followed by the zero-terminated attribute and credentials to look up */
 
 };
 
@@ -72,7 +107,7 @@ struct VerifyMessage
 /**
  * Message from CREDENTIAL service to client: new results.
  */
-struct VerifyResultMessage
+struct DelegationChainResultMessage
 {
   /**
     * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT