summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-31 11:37:42 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-31 11:37:42 +0100
commitce443bb4d4815ac79170b81cae74fc8b8030ea54 (patch)
tree5ad2e67ea4179a4f766c3180bf44b06cc8577f33 /src/include
parent9f7a6d50b4c6a79ab16dfabe2c57510565bc4cf2 (diff)
downloadanastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.tar.gz
anastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.tar.bz2
anastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.zip
fix #7054: propagate more information on the rate-limiting
Diffstat (limited to 'src/include')
-rw-r--r--src/include/anastasis.h18
-rw-r--r--src/include/anastasis_service.h17
2 files changed, 35 insertions, 0 deletions
diff --git a/src/include/anastasis.h b/src/include/anastasis.h
index fd7ed40..b957f18 100644
--- a/src/include/anastasis.h
+++ b/src/include/anastasis.h
@@ -207,6 +207,24 @@ struct ANASTASIS_ChallengeStartResponse
unsigned int http_status;
} open_challenge;
+ /**
+ * Details for #ANASTASIS_CHALLENGE_STATUS_RATE_LIMIT_EXCEEDED.
+ */
+ struct
+ {
+
+ /**
+ * How many requests are allowed at most per @e request_frequency?
+ */
+ uint32_t request_limit;
+
+ /**
+ * Frequency at which requests are allowed / new challenges are
+ * created.
+ */
+ struct GNUNET_TIME_Relative request_frequency;
+
+ } rate_limit_exceeded;
/**
* Response with details if
diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h
index b6b3d76..0ef31d6 100644
--- a/src/include/anastasis_service.h
+++ b/src/include/anastasis_service.h
@@ -570,6 +570,23 @@ struct ANASTASIS_KeyShareDownloadDetails
} payment_required;
+ struct
+ {
+
+ /**
+ * How many requests are allowed at most per @e request_frequency?
+ */
+ uint32_t request_limit;
+
+ /**
+ * Frequency at which requests are allowed / new challenges are
+ * created.
+ */
+ struct GNUNET_TIME_Relative request_frequency;
+
+ } rate_limit_exceeded;
+
+
/**
* Response with details about a server-side failure, if
* @e status is #ANASTASIS_KSD_SERVER_ERROR,