diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-26 17:21:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-26 17:21:22 +0000 |
commit | 3999807382f98843cdde19211fc94484d0793087 (patch) | |
tree | eab97299e72edbfdd5d6f409db0729d9780d3e5e /src/include | |
parent | abc1a0ea19b7dc199b83749d31e32622c7469ded (diff) | |
download | gnunet-3999807382f98843cdde19211fc94484d0793087.tar.gz gnunet-3999807382f98843cdde19211fc94484d0793087.zip |
-introducing signing of regex accept states, removing PID from regex API
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/block_regex.h | 22 | ||||
-rw-r--r-- | src/include/gnunet_constants.h | 9 | ||||
-rw-r--r-- | src/include/gnunet_regex_service.h | 3 | ||||
-rw-r--r-- | src/include/gnunet_signatures.h | 9 |
4 files changed, 37 insertions, 6 deletions
diff --git a/src/include/block_regex.h b/src/include/block_regex.h index 73d7b70a5..be9d305ad 100644 --- a/src/include/block_regex.h +++ b/src/include/block_regex.h | |||
@@ -90,18 +90,34 @@ struct RegexBlock | |||
90 | /** | 90 | /** |
91 | * @brief Block to announce a peer accepting a state. | 91 | * @brief Block to announce a peer accepting a state. |
92 | */ | 92 | */ |
93 | struct RegexAccept | 93 | struct RegexAcceptBlock |
94 | { | 94 | { |
95 | |||
96 | /** | ||
97 | * Accept blocks must be signed. Signature | ||
98 | * goes over expiration time and key. | ||
99 | */ | ||
100 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | ||
101 | |||
102 | /** | ||
103 | * When does the signature expire? | ||
104 | */ | ||
105 | struct GNUNET_TIME_AbsoluteNBO expiration_time; | ||
106 | |||
95 | /** | 107 | /** |
96 | * The key of the state. | 108 | * The key of the state. |
97 | */ | 109 | */ |
98 | struct GNUNET_HashCode key; | 110 | struct GNUNET_HashCode key; |
99 | 111 | ||
100 | /** | 112 | /** |
101 | * The identity of the peer accepting the state | 113 | * Public key of the peer signing. |
102 | */ | 114 | */ |
103 | struct GNUNET_PeerIdentity id; | 115 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; |
104 | 116 | ||
117 | /** | ||
118 | * The signature. | ||
119 | */ | ||
120 | struct GNUNET_CRYPTO_EccSignature signature; | ||
105 | }; | 121 | }; |
106 | 122 | ||
107 | 123 | ||
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index f10483424..e817c470f 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -94,6 +94,14 @@ extern "C" | |||
94 | 94 | ||
95 | 95 | ||
96 | /** | 96 | /** |
97 | * After how long do we expire an address in a HELLO that we just | ||
98 | * validated? This value is also used for our own addresses when we | ||
99 | * create a HELLO. | ||
100 | */ | ||
101 | #define GNUNET_CONSTANTS_DHT_MAX_EXPIRATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 24) | ||
102 | |||
103 | |||
104 | /** | ||
97 | * Size of the 'struct EncryptedMessage' of the core (which | 105 | * Size of the 'struct EncryptedMessage' of the core (which |
98 | * is the per-message overhead of the core). | 106 | * is the per-message overhead of the core). |
99 | */ | 107 | */ |
@@ -120,6 +128,7 @@ extern "C" | |||
120 | 128 | ||
121 | 129 | ||
122 | 130 | ||
131 | |||
123 | #if 0 /* keep Emacsens' auto-indent happy */ | 132 | #if 0 /* keep Emacsens' auto-indent happy */ |
124 | { | 133 | { |
125 | #endif | 134 | #endif |
diff --git a/src/include/gnunet_regex_service.h b/src/include/gnunet_regex_service.h index 2a176f401..283aad5a1 100644 --- a/src/include/gnunet_regex_service.h +++ b/src/include/gnunet_regex_service.h | |||
@@ -56,7 +56,7 @@ struct GNUNET_REGEX_Search; | |||
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Announce the given peer under the given regular expression. Does | 59 | * Announce this peer under the given regular expression. Does |
60 | * not free resources, must call GNUNET_REGEX_announce_cancel for | 60 | * not free resources, must call GNUNET_REGEX_announce_cancel for |
61 | * that. | 61 | * that. |
62 | * | 62 | * |
@@ -70,7 +70,6 @@ struct GNUNET_REGEX_Search; | |||
70 | */ | 70 | */ |
71 | struct GNUNET_REGEX_Announcement * | 71 | struct GNUNET_REGEX_Announcement * |
72 | GNUNET_REGEX_announce (const struct GNUNET_CONFIGURATION_Handle *cfg, | 72 | GNUNET_REGEX_announce (const struct GNUNET_CONFIGURATION_Handle *cfg, |
73 | const struct GNUNET_PeerIdentity *id, | ||
74 | const char *regex, | 73 | const char *regex, |
75 | struct GNUNET_TIME_Relative refresh_delay, | 74 | struct GNUNET_TIME_Relative refresh_delay, |
76 | uint16_t compression); | 75 | uint16_t compression); |
diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h index a821a74df..ced130a84 100644 --- a/src/include/gnunet_signatures.h +++ b/src/include/gnunet_signatures.h | |||
@@ -120,12 +120,19 @@ extern "C" | |||
120 | */ | 120 | */ |
121 | #define GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY 16 | 121 | #define GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY 16 |
122 | 122 | ||
123 | |||
124 | /** | 123 | /** |
125 | * UBlock Signature, done using DSS, not ECC | 124 | * UBlock Signature, done using DSS, not ECC |
126 | */ | 125 | */ |
127 | #define GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK 17 | 126 | #define GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK 17 |
128 | 127 | ||
128 | /** | ||
129 | * Accept state in regex DFA. Peer affirms that | ||
130 | * he offers the matching service. | ||
131 | */ | ||
132 | #define GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT 18 | ||
133 | |||
134 | |||
135 | |||
129 | #if 0 /* keep Emacsens' auto-indent happy */ | 136 | #if 0 /* keep Emacsens' auto-indent happy */ |
130 | { | 137 | { |
131 | #endif | 138 | #endif |