- change record data name
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 2 Dec 2016 12:50:43 +0000 (13:50 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Fri, 2 Dec 2016 12:50:43 +0000 (13:50 +0100)
src/credential/plugin_gnsrecord_credential.c
src/include/gnunet_credential_service.h

index cc645468db6c13c058175123a2d3355900ac6285..480dc4c62e52859c25b5dda9abafcbce563a9577 100644 (file)
@@ -53,12 +53,12 @@ credential_value_to_string (void *cls,
   {
    case GNUNET_GNSRECORD_TYPE_CREDENTIAL:
    {
-    struct GNUNET_CREDENTIAL_AttributeRecordData cred;
+    struct GNUNET_CREDENTIAL_CredentialRecordData cred;
     char *cred_str;
     char *subject_pkey;
     char *issuer_pkey;
     uint32_t cf; // Credential flags
-    if (data_size < sizeof (struct GNUNET_CREDENTIAL_AttributeRecordData))
+    if (data_size < sizeof (struct GNUNET_CREDENTIAL_CredentialRecordData))
         return NULL; /* malformed */
     memcpy (&cred,
               data,
@@ -111,7 +111,7 @@ credential_string_to_value (void *cls,
   {
     case GNUNET_GNSRECORD_TYPE_CREDENTIAL:
       { 
-        struct GNUNET_CREDENTIAL_AttributeRecordData *cred;
+        struct GNUNET_CREDENTIAL_CredentialRecordData *cred;
         unsigned int cf; // credential flags
 
         size_t enclen = (sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)) * 8;
@@ -134,7 +134,7 @@ credential_string_to_value (void *cls,
                       s);
           return GNUNET_SYSERR;
         }
-        *data_size = sizeof (struct GNUNET_CREDENTIAL_AttributeRecordData) + strlen (name) + 1;
+        *data_size = sizeof (struct GNUNET_CREDENTIAL_CredentialRecordData) + strlen (name) + 1;
         *data = cred = GNUNET_malloc (*data_size);
         GNUNET_CRYPTO_ecdsa_public_key_from_string (subject_pkey,
                                                     strlen (subject_pkey),
index a5dc49cfb0b3ea7e8fb2de2fefe338199c86dbda..5675cd9905b93e1b994e3685b2f785c0231717be 100644 (file)
@@ -74,9 +74,9 @@ enum GNUNET_CREDENTIAL_CredentialFlags {
 
 GNUNET_NETWORK_STRUCT_BEGIN
 /**
- * The attribute record 
+ * The credential record 
  */
-struct GNUNET_CREDENTIAL_AttributeRecordData {
+struct GNUNET_CREDENTIAL_CredentialRecordData {
   
   /**
    * Public key of the subject this credential was issued to
@@ -112,7 +112,7 @@ struct GNUNET_CREDENTIAL_AttributeRecordData {
 /**
  * The attribute delegation record
 */
-struct GNUNET_CREDENTIAL_AttributeDelegationRecordData {
+struct GNUNET_CREDENTIAL_AttributeRecordData {
   
   /**
    * Public key of the subject this attribute was delegated to
@@ -121,6 +121,7 @@ struct GNUNET_CREDENTIAL_AttributeDelegationRecordData {
   
   /**
    * Followed by the attribute that was delegated to as string
+   * May be empty
    */
 };