aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-08-15 16:25:11 +0200
committerjospaeth <spaethj@in.tum.de>2020-08-15 16:25:11 +0200
commit72a66ee46f2b2bcb3d2cc4376c6c7dc6b57c86aa (patch)
tree281f68831ea8527eea4b6641767a9cd0b5b91817
parent91d9d4251d3b1d0fab1780da73b6969581d22ffe (diff)
parentf1f40feb2beb5c036da0e2b93c433b09b920e0b4 (diff)
downloadgnunet-72a66ee46f2b2bcb3d2cc4376c6c7dc6b57c86aa.tar.gz
gnunet-72a66ee46f2b2bcb3d2cc4376c6c7dc6b57c86aa.zip
Merge branch 'master' into spaeth/escrow_plugins
-rw-r--r--ChangeLog63
-rw-r--r--configure.ac20
-rw-r--r--contrib/Makefile.inc6
-rw-r--r--src/ats/ats_api_performance.c2
-rw-r--r--src/ats/gnunet-service-ats_addresses.c2
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c2
-rw-r--r--src/include/gnunet_common.h6
-rw-r--r--src/include/gnunet_my_lib.h2
-rw-r--r--src/include/gnunet_mysql_lib.h6
-rw-r--r--src/mysql/mysql.c2
-rw-r--r--src/namestore/gnunet-service-namestore.c4
-rw-r--r--src/namestore/namestore_api_monitor.c2
-rw-r--r--src/transport/gnunet-service-tng.c2
-rw-r--r--src/util/common_allocation.c8
-rw-r--r--src/util/service.c2
-rw-r--r--src/util/test_peer.c3
16 files changed, 110 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ed6576e7..98b3b40b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
1Wed, 12 Aug 2020 09:36:33 +0200 (99f820453)
2fix: GNUNET_is_zero(ptr) should return enum GNUNET_GenericReturnValue. Fixes #6475. - Martin Schanzenbach
3
4Tue, 11 Aug 2020 11:35:06 +0200 (286759692)
5fix: mysql version detection - Martin Schanzenbach
6
7Thu, 6 Aug 2020 08:45:40 +0200 (1d4f5263a)
8reclaim: Refactoring and more standards compliance with respect to scopes - Martin Schanzenbach
9
10Wed, 5 Aug 2020 11:35:05 +0200 (6e764f4ab)
11reclaim: Make SPAs work with public clients. No longer encrypt code. - Martin Schanzenbach
12
13Tue, 4 Aug 2020 21:08:22 +0200 (ade9b5e52)
14reclaim: fix #6463 - Martin Schanzenbach
15
16Tue, 4 Aug 2020 19:40:23 +0200 (815ded19f)
17rest: fix #6462 - Martin Schanzenbach
18
19Tue, 4 Aug 2020 10:09:45 +0200 (080519e98)
20reclaim: do not store access token instead piggyback ticket - Martin Schanzenbach
21
22Mon, 3 Aug 2020 19:37:23 +0200 (8c86c4472)
23reclaim: support client credentials in POST body for token request - Martin Schanzenbach
24
25Sat, 1 Aug 2020 16:22:38 +0200 (e44686f08)
26fix: reclaim urlenc / revert accidental change - Martin Schanzenbach
27
28Sat, 1 Aug 2020 16:07:08 +0200 (754d8c1b4)
29util: add percent/url encoding - Martin Schanzenbach
30
31Thu, 30 Jul 2020 16:12:22 +0530 (8d312646c)
32fix SIGSEGV in GNUNET_buffer_write_data_encoded - Florian Dold
33
34Thu, 30 Jul 2020 15:15:59 +0530 (d335baac8)
35implement GNUNET_buffer_write_data_encoded - Florian Dold
36
37Wed, 22 Jul 2020 21:47:42 +0200 (8703a0516)
38ensure psql fails hard if there is an error in the SQL (fixes #6437) - Christian Grothoff
39
40Sat, 18 Jul 2020 00:44:39 +0200 (7f4ddbcab)
41merge flags into enum for GNUNET_DISK_pipe() API, fixing #6188 - Christian Grothoff
42
43Fri, 17 Jul 2020 22:35:36 +0200 (28ab2c446)
44avoid boolean flag in GNUNET_OS_start_process() API (fixes #6188) - Christian Grothoff
45
46Fri, 17 Jul 2020 14:26:45 +0200 (0c9911d73)
47TNG: Implemented 5530: add replay protection to TCP communicator. Added monotime value checks - t3sserakt
48
49Thu, 16 Jul 2020 20:36:12 +0200 (bbe0a0501)
50avoid boolean argument in GNUNET_CURL_job_add(), see #6188 - Christian Grothoff
51
52Thu, 16 Jul 2020 17:40:14 +0200 (ee1fbffa1)
53support context-wide client authentication - Christian Grothoff
54
55Thu, 16 Jul 2020 17:24:30 +0200 (23820348b)
56docs: fixed example for pinning a friends public key - rexxnor
57
58Wed, 15 Jul 2020 17:21:39 +0200 (9bb2c1e31)
59Load GNSRECORD plugins within GNUnet's context - Christian Grothoff
60
61Fri, 3 Jul 2020 22:37:42 +0200 (0f2ac01f3)
62Add function to return GNUnet's default configuration - Christian Grothoff
63
1Thu, 9 Jul 2020 09:09:50 +0200 (5a0df5e18) 64Thu, 9 Jul 2020 09:09:50 +0200 (5a0df5e18)
2fix: raise ATS quotas to 10 MiB #6426 - Martin Schanzenbach 65fix: raise ATS quotas to 10 MiB #6426 - Martin Schanzenbach
3 66
diff --git a/configure.ac b/configure.ac
index 5c79ff2af..4dacfa8ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
21# 21#
22AC_PREREQ(2.61) 22AC_PREREQ(2.61)
23# Checks for programs. 23# Checks for programs.
24AC_INIT([gnunet], [0.13.1], [bug-gnunet@gnu.org]) 24AC_INIT([gnunet], [0.13.2], [bug-gnunet@gnu.org])
25AC_CONFIG_AUX_DIR([build-aux]) 25AC_CONFIG_AUX_DIR([build-aux])
26 26
27# check for legacy option that is no longer supported (#5627) and fail hard 27# check for legacy option that is no longer supported (#5627) and fail hard
@@ -1432,12 +1432,11 @@ AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"],
1432 AC_MSG_CHECKING(mysql version) 1432 AC_MSG_CHECKING(mysql version)
1433 AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 1433 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1434 [[ 1434 [[
1435 #include <mysql/mysql.h>]], 1435 #include <mysql/mysql_version.h>]],
1436 [[ 1436 [[
1437 #if (MYSQL_VERSION_ID < 40100) 1437 #if (MYSQL_VERSION_ID < 40100)
1438 #error needs at least version >= 4.1 1438 #error needs at least version >= 4.1
1439 #endif 1439 #endif
1440 int main () { return 0; }
1441 ]]) 1440 ]])
1442 ], 1441 ],
1443 [mysql=true], 1442 [mysql=true],
@@ -1451,6 +1450,21 @@ AS_IF([test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"],
1451 mysqlfail=false 1450 mysqlfail=false
1452 AC_MSG_RESULT(ok) 1451 AC_MSG_RESULT(ok)
1453 ]) 1452 ])
1453 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1454 [[
1455 #include <mysql/mysql_version.h>]],
1456 [[
1457 #if (MYSQL_VERSION_ID < 80000)
1458 #error needs at least version >= 4.1
1459 #endif
1460 ]])
1461 ],
1462 [mysql8=true],
1463 [mysql8=false])
1464 AS_IF([test x$mysql8 = xtrue],
1465 [
1466 AC_DEFINE([HAVE_MYSQL8],[1],[Have mysql8])
1467 ],[])
1454]) 1468])
1455 1469
1456AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue) 1470AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
diff --git a/contrib/Makefile.inc b/contrib/Makefile.inc
index 35c2d42a8..a563ef4a1 100644
--- a/contrib/Makefile.inc
+++ b/contrib/Makefile.inc
@@ -3,6 +3,12 @@
3# itself. 3# itself.
4 4
5BUILDCOMMON_SHLIB_FILES = \ 5BUILDCOMMON_SHLIB_FILES = \
6 build-common/sh/bin.sh/python.sh \
7 build-common/sh/lib.sh/existence.sh \
8 build-common/sh/lib.sh/existence_python.sh \
9 build-common/sh/lib.sh/msg.sh \
10 build-common/sh/lib.sh/progname.sh \
11 build-common/sh/lib.sh/version_gnunet.sh \
6 build-common/LICENSE 12 build-common/LICENSE
7 13
8BUILDCOMMON_CONF_FILES = \ 14BUILDCOMMON_CONF_FILES = \
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index acc9356ed..7349fb989 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -496,7 +496,7 @@ handle_address_list (void *cls,
496 return; /* was canceled */ 496 return; /* was canceled */
497 497
498 memset (&allzeros, '\0', sizeof(allzeros)); 498 memset (&allzeros, '\0', sizeof(allzeros));
499 if ((0 == GNUNET_is_zero (&pi->peer)) && 499 if ((GNUNET_YES == GNUNET_is_zero (&pi->peer)) &&
500 (0 == plugin_name_length) && 500 (0 == plugin_name_length) &&
501 (0 == plugin_address_length)) 501 (0 == plugin_address_length))
502 { 502 {
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index e8a95c65e..3cd831a39 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -685,7 +685,7 @@ GAS_handle_request_address_list (struct GNUNET_SERVICE_Client *client,
685 memset (&allzeros, 685 memset (&allzeros,
686 '\0', 686 '\0',
687 sizeof(struct GNUNET_PeerIdentity)); 687 sizeof(struct GNUNET_PeerIdentity));
688 if (0 == GNUNET_is_zero (&alrm->peer)) 688 if (GNUNET_YES == GNUNET_is_zero (&alrm->peer))
689 { 689 {
690 /* Return addresses for all peers */ 690 /* Return addresses for all peers */
691 GAS_addresses_get_peer_info (NULL, 691 GAS_addresses_get_peer_info (NULL,
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index a2068b31b..221364c5d 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -245,7 +245,7 @@ GCP_2s (const struct CadetPeer *cp)
245 char *ret; 245 char *ret;
246 246
247 if ((NULL == cp) || 247 if ((NULL == cp) ||
248 (0 == GNUNET_is_zero (&cp->pid.public_key))) 248 (GNUNET_YES == GNUNET_is_zero (&cp->pid.public_key)))
249 return "NULL"; 249 return "NULL";
250 250
251 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); 251 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key);
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index b2f99cd55..fcaae1026 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -1173,9 +1173,9 @@ GNUNET_memcmp_ct_ (const void *b1,
1173 * @param a pointer to @a n bytes which should be tested for the 1173 * @param a pointer to @a n bytes which should be tested for the
1174 * entire memory being zero'ed out. 1174 * entire memory being zero'ed out.
1175 * @param n number of bytes in @a to be tested 1175 * @param n number of bytes in @a to be tested
1176 * @return 0 if a is zero, non-zero otherwise 1176 * @return GNUNET_YES if a is zero, GNUNET_NO otherwise
1177 */ 1177 */
1178int 1178enum GNUNET_GenericReturnValue
1179GNUNET_is_zero_ (const void *a, 1179GNUNET_is_zero_ (const void *a,
1180 size_t n); 1180 size_t n);
1181 1181
@@ -1185,7 +1185,7 @@ GNUNET_is_zero_ (const void *a,
1185 * 1185 *
1186 * @param a pointer to a struct which should be tested for the 1186 * @param a pointer to a struct which should be tested for the
1187 * entire memory being zero'ed out. 1187 * entire memory being zero'ed out.
1188 * @return 0 if a is zero, non-zero otherwise 1188 * @return GNUNET_YES if a is zero, GNUNET_NO otherwise
1189 */ 1189 */
1190#define GNUNET_is_zero(a) \ 1190#define GNUNET_is_zero(a) \
1191 GNUNET_is_zero_ (a, sizeof (*a)) 1191 GNUNET_is_zero_ (a, sizeof (*a))
diff --git a/src/include/gnunet_my_lib.h b/src/include/gnunet_my_lib.h
index 74e7bf492..b8513ca84 100644
--- a/src/include/gnunet_my_lib.h
+++ b/src/include/gnunet_my_lib.h
@@ -245,7 +245,7 @@ struct GNUNET_MY_ResultSpec
245 /** 245 /**
246 * Memory for MySQL to notify us about NULL values. 246 * Memory for MySQL to notify us about NULL values.
247 */ 247 */
248 my_bool is_null; 248 MYSQL_BOOL is_null;
249}; 249};
250 250
251 251
diff --git a/src/include/gnunet_mysql_lib.h b/src/include/gnunet_mysql_lib.h
index 964483024..843d3ccb3 100644
--- a/src/include/gnunet_mysql_lib.h
+++ b/src/include/gnunet_mysql_lib.h
@@ -41,6 +41,12 @@ extern "C"
41#endif 41#endif
42#endif 42#endif
43 43
44#ifdef HAVE_MYSQL8
45 typedef bool MYSQL_BOOL;
46#else
47 typedef my_bool MYSQL_BOOL; //MySQL < 8 wants this
48#endif
49
44 50
45/** 51/**
46 * Mysql context. 52 * Mysql context.
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c
index 713227068..e20debc82 100644
--- a/src/mysql/mysql.c
+++ b/src/mysql/mysql.c
@@ -220,7 +220,7 @@ iopen (struct GNUNET_MYSQL_Context *mc)
220 char *mysql_user; 220 char *mysql_user;
221 char *mysql_password; 221 char *mysql_password;
222 unsigned long long mysql_port; 222 unsigned long long mysql_port;
223 my_bool reconnect; 223 MYSQL_BOOL reconnect;
224 unsigned int timeout; 224 unsigned int timeout;
225 225
226 mc->dbf = mysql_init (NULL); 226 mc->dbf = mysql_init (NULL);
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index bb8138e23..b24bb2952 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1809,7 +1809,7 @@ run_zone_iteration_round (struct ZoneIteration *zi, uint64_t limit)
1809 start = GNUNET_TIME_absolute_get (); 1809 start = GNUNET_TIME_absolute_get ();
1810 GNUNET_break (GNUNET_SYSERR != 1810 GNUNET_break (GNUNET_SYSERR !=
1811 GSN_database->iterate_records (GSN_database->cls, 1811 GSN_database->iterate_records (GSN_database->cls,
1812 (0 == GNUNET_is_zero (&zi->zone)) 1812 (GNUNET_YES == GNUNET_is_zero (&zi->zone))
1813 ? NULL 1813 ? NULL
1814 : &zi->zone, 1814 : &zi->zone,
1815 zi->seq, 1815 zi->seq,
@@ -2083,7 +2083,7 @@ monitor_iteration_next (void *cls)
2083 else 2083 else
2084 zm->iteration_cnt = zm->limit; /* use it all */ 2084 zm->iteration_cnt = zm->limit; /* use it all */
2085 ret = GSN_database->iterate_records (GSN_database->cls, 2085 ret = GSN_database->iterate_records (GSN_database->cls,
2086 (0 == GNUNET_is_zero (&zm->zone)) 2086 (GNUNET_YES == GNUNET_is_zero (&zm->zone))
2087 ? NULL 2087 ? NULL
2088 : &zm->zone, 2088 : &zm->zone,
2089 zm->seq, 2089 zm->seq,
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c
index ab6140328..9dc955544 100644
--- a/src/namestore/namestore_api_monitor.c
+++ b/src/namestore/namestore_api_monitor.c
@@ -139,7 +139,7 @@ check_result (void *cls, const struct RecordResultMessage *lrm)
139 139
140 (void) cls; 140 (void) cls;
141 if ((0 != GNUNET_memcmp (&lrm->private_key, &zm->zone)) && 141 if ((0 != GNUNET_memcmp (&lrm->private_key, &zm->zone)) &&
142 (0 != GNUNET_is_zero (&zm->zone))) 142 (GNUNET_NO == GNUNET_is_zero (&zm->zone)))
143 { 143 {
144 GNUNET_break (0); 144 GNUNET_break (0);
145 return GNUNET_SYSERR; 145 return GNUNET_SYSERR;
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index baefdfa88..2f6e17f3b 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -3209,7 +3209,7 @@ notify_monitors (const struct GNUNET_PeerIdentity *peer,
3209 continue; 3209 continue;
3210 if (tc->details.monitor.one_shot) 3210 if (tc->details.monitor.one_shot)
3211 continue; 3211 continue;
3212 if ((0 != GNUNET_is_zero (&tc->details.monitor.peer)) && 3212 if ((GNUNET_NO == GNUNET_is_zero (&tc->details.monitor.peer)) &&
3213 (0 != GNUNET_memcmp (&tc->details.monitor.peer, peer))) 3213 (0 != GNUNET_memcmp (&tc->details.monitor.peer, peer)))
3214 continue; 3214 continue;
3215 notify_monitor (tc, peer, address, nt, me); 3215 notify_monitor (tc, peer, address, nt, me);
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 4aad49777..a404a1627 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -538,9 +538,9 @@ GNUNET_copy_message (const struct GNUNET_MessageHeader *msg)
538 * @param a pointer to @a n bytes which should be tested for the 538 * @param a pointer to @a n bytes which should be tested for the
539 * entire memory being zero'ed out. 539 * entire memory being zero'ed out.
540 * @param n number of bytes in @a to be tested 540 * @param n number of bytes in @a to be tested
541 * @return 0 if a is zero, non-zero otherwise 541 * @return GNUNET_YES if a is zero, GNUNET_NO otherwise
542 */ 542 */
543int 543enum GNUNET_GenericReturnValue
544GNUNET_is_zero_ (const void *a, 544GNUNET_is_zero_ (const void *a,
545 size_t n) 545 size_t n)
546{ 546{
@@ -548,8 +548,8 @@ GNUNET_is_zero_ (const void *a,
548 548
549 for (size_t i = 0; i < n; i++) 549 for (size_t i = 0; i < n; i++)
550 if (b[i]) 550 if (b[i])
551 return 1; 551 return GNUNET_NO;
552 return 0; 552 return GNUNET_YES;
553} 553}
554 554
555 555
diff --git a/src/util/service.c b/src/util/service.c
index e6bbe855f..ddd31181d 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -473,7 +473,7 @@ check_ipv6_listed (const struct GNUNET_STRINGS_IPv6NetworkPolicy *list,
473 return GNUNET_NO; 473 return GNUNET_NO;
474 i = 0; 474 i = 0;
475NEXT: 475NEXT:
476 while (0 != GNUNET_is_zero (&list[i].network)) 476 while (GNUNET_NO == GNUNET_is_zero (&list[i].network))
477 { 477 {
478 for (unsigned int j = 0; j < sizeof(struct in6_addr) / sizeof(int); j++) 478 for (unsigned int j = 0; j < sizeof(struct in6_addr) / sizeof(int); j++)
479 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) != 479 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) !=
diff --git a/src/util/test_peer.c b/src/util/test_peer.c
index 320746c76..bb0bc48dc 100644
--- a/src/util/test_peer.c
+++ b/src/util/test_peer.c
@@ -106,8 +106,7 @@ check ()
106 * is expected to be set to zero 106 * is expected to be set to zero
107 */GNUNET_log_skip (1, GNUNET_YES); 107 */GNUNET_log_skip (1, GNUNET_YES);
108 GNUNET_PEER_resolve (0, &res); 108 GNUNET_PEER_resolve (0, &res);
109 GNUNET_assert (0 == 109 GNUNET_assert (GNUNET_YES == GNUNET_is_zero (&res));
110 GNUNET_is_zero (&res));
111 110
112 /* Removing peer entries 1 and 3 from table using the list decrement function */ 111 /* Removing peer entries 1 and 3 from table using the list decrement function */
113 /* If count = 0, nothing should be done whatsoever */ 112 /* If count = 0, nothing should be done whatsoever */