aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnsrecord/gnsrecord_crypto.c')
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index d794c9cb4..e6036b72b 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -25,6 +25,7 @@
25 * @author Matthias Wachs 25 * @author Matthias Wachs
26 * @author Christian Grothoff 26 * @author Christian Grothoff
27 */ 27 */
28#include "platform.h"
28#include "gnsrecord_crypto.h" 29#include "gnsrecord_crypto.h"
29 30
30#define LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__) 31#define LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__)
@@ -793,7 +794,7 @@ block_decrypt_ecdsa (const struct GNUNET_GNSRECORD_Block *block,
793 continue; 794 continue;
794 } 795 }
795 796
796 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) 797 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW))
797 { 798 {
798 int include_record = GNUNET_YES; 799 int include_record = GNUNET_YES;
799 /* Shadow record, figure out if we have a not expired active record */ 800 /* Shadow record, figure out if we have a not expired active record */
@@ -805,7 +806,7 @@ block_decrypt_ecdsa (const struct GNUNET_GNSRECORD_Block *block,
805 include_record = GNUNET_NO; /* Shadow record is expired */ 806 include_record = GNUNET_NO; /* Shadow record is expired */
806 if ((rd[k].record_type == rd[i].record_type) && 807 if ((rd[k].record_type == rd[i].record_type) &&
807 (rd[k].expiration_time >= now.abs_value_us) && 808 (rd[k].expiration_time >= now.abs_value_us) &&
808 (0 == (rd[k].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD))) 809 (0 == (rd[k].flags & GNUNET_GNSRECORD_RF_SHADOW)))
809 { 810 {
810 include_record = GNUNET_NO; /* We have a non-expired, non-shadow record of the same type */ 811 include_record = GNUNET_NO; /* We have a non-expired, non-shadow record of the same type */
811 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 812 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -815,7 +816,7 @@ block_decrypt_ecdsa (const struct GNUNET_GNSRECORD_Block *block,
815 } 816 }
816 if (GNUNET_YES == include_record) 817 if (GNUNET_YES == include_record)
817 { 818 {
818 rd[i].flags ^= GNUNET_GNSRECORD_RF_SHADOW_RECORD; /* Remove Flag */ 819 rd[i].flags ^= GNUNET_GNSRECORD_RF_SHADOW; /* Remove Flag */
819 if (j != i) 820 if (j != i)
820 rd[j] = rd[i]; 821 rd[j] = rd[i];
821 j++; 822 j++;
@@ -919,7 +920,7 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
919 continue; 920 continue;
920 } 921 }
921 922
922 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) 923 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW))
923 { 924 {
924 int include_record = GNUNET_YES; 925 int include_record = GNUNET_YES;
925 /* Shadow record, figure out if we have a not expired active record */ 926 /* Shadow record, figure out if we have a not expired active record */
@@ -931,7 +932,7 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
931 include_record = GNUNET_NO; /* Shadow record is expired */ 932 include_record = GNUNET_NO; /* Shadow record is expired */
932 if ((rd[k].record_type == rd[i].record_type) && 933 if ((rd[k].record_type == rd[i].record_type) &&
933 (rd[k].expiration_time >= now.abs_value_us) && 934 (rd[k].expiration_time >= now.abs_value_us) &&
934 (0 == (rd[k].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD))) 935 (0 == (rd[k].flags & GNUNET_GNSRECORD_RF_SHADOW)))
935 { 936 {
936 include_record = GNUNET_NO; /* We have a non-expired, non-shadow record of the same type */ 937 include_record = GNUNET_NO; /* We have a non-expired, non-shadow record of the same type */
937 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 938 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -941,7 +942,7 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
941 } 942 }
942 if (GNUNET_YES == include_record) 943 if (GNUNET_YES == include_record)
943 { 944 {
944 rd[i].flags ^= GNUNET_GNSRECORD_RF_SHADOW_RECORD; /* Remove Flag */ 945 rd[i].flags ^= GNUNET_GNSRECORD_RF_SHADOW; /* Remove Flag */
945 if (j != i) 946 if (j != i)
946 rd[j] = rd[i]; 947 rd[j] = rd[i];
947 j++; 948 j++;