diff options
author | Andreas Ebner <pansy007@googlemail.com> | 2019-08-06 16:17:33 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-10-07 12:17:28 +0200 |
commit | 33525da20575ba0149d1c6bcaac74e52d4e0ddd7 (patch) | |
tree | 91966b82a290b9b9d34c9d6e1c10f13d1b8156ed /src/credential/plugin_gnsrecord_credential.c | |
parent | 15b0d71a635f02f5e0291a695d35a65698fdea05 (diff) | |
download | gnunet-33525da20575ba0149d1c6bcaac74e52d4e0ddd7.tar.gz gnunet-33525da20575ba0149d1c6bcaac74e52d4e0ddd7.zip |
Removed GNUNET_CREDENTIAL_Credential, new cmdline parameters, formatting:
- removed all files and functions related to GNUNET_CREDENTIAL_Credential, has been replaced by GNUNET_CREDENTIAL_Delegate
- renamed cmline parameter 'credential'
- added cmline parameter for backward/forward search and a related enum
- added cmline parameter to store private delegates
- only private delegates are used as start/end of the search algorithm (set to vrh in collect)
- run valgrind: no memory exceptions
- run clang-format
Diffstat (limited to 'src/credential/plugin_gnsrecord_credential.c')
-rw-r--r-- | src/credential/plugin_gnsrecord_credential.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/credential/plugin_gnsrecord_credential.c b/src/credential/plugin_gnsrecord_credential.c index 784c7def1..088c4dd0e 100644 --- a/src/credential/plugin_gnsrecord_credential.c +++ b/src/credential/plugin_gnsrecord_credential.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | 29 | ||
30 | #include "credential_misc.h" | ||
31 | #include "delegate_misc.h" | 30 | #include "delegate_misc.h" |
32 | #include "credential_serialization.h" | 31 | #include "credential_serialization.h" |
33 | #include "gnunet_credential_service.h" | 32 | #include "gnunet_credential_service.h" |
@@ -79,7 +78,7 @@ credential_value_to_string (void *cls, | |||
79 | { | 78 | { |
80 | subject_pkey = | 79 | subject_pkey = |
81 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&set[i].subject_key); | 80 | GNUNET_CRYPTO_ecdsa_public_key_to_string (&set[i].subject_key); |
82 | 81 | ||
83 | if (0 == set[i].subject_attribute_len) | 82 | if (0 == set[i].subject_attribute_len) |
84 | { | 83 | { |
85 | if (0 == i) | 84 | if (0 == i) |
@@ -117,16 +116,6 @@ credential_value_to_string (void *cls, | |||
117 | } | 116 | } |
118 | return attr_str; | 117 | return attr_str; |
119 | } | 118 | } |
120 | case GNUNET_GNSRECORD_TYPE_CREDENTIAL: | ||
121 | { | ||
122 | struct GNUNET_CREDENTIAL_Credential *cred; | ||
123 | char *cred_str; | ||
124 | |||
125 | cred = GNUNET_CREDENTIAL_credential_deserialize (data, data_size); | ||
126 | cred_str = GNUNET_CREDENTIAL_credential_to_string (cred); | ||
127 | GNUNET_free (cred); | ||
128 | return cred_str; | ||
129 | } | ||
130 | case GNUNET_GNSRECORD_TYPE_DELEGATE: | 119 | case GNUNET_GNSRECORD_TYPE_DELEGATE: |
131 | { | 120 | { |
132 | struct GNUNET_CREDENTIAL_Delegate *cred; | 121 | struct GNUNET_CREDENTIAL_Delegate *cred; |
@@ -255,14 +244,6 @@ credential_string_to_value (void *cls, | |||
255 | GNUNET_free (tmp_str); | 244 | GNUNET_free (tmp_str); |
256 | return GNUNET_OK; | 245 | return GNUNET_OK; |
257 | } | 246 | } |
258 | case GNUNET_GNSRECORD_TYPE_CREDENTIAL: | ||
259 | { | ||
260 | struct GNUNET_CREDENTIAL_Credential *cred; | ||
261 | cred = GNUNET_CREDENTIAL_credential_from_string (s); | ||
262 | |||
263 | *data_size = GNUNET_CREDENTIAL_credential_serialize (cred, (char **) data); | ||
264 | return GNUNET_OK; | ||
265 | } | ||
266 | case GNUNET_GNSRECORD_TYPE_DELEGATE: | 247 | case GNUNET_GNSRECORD_TYPE_DELEGATE: |
267 | { | 248 | { |
268 | struct GNUNET_CREDENTIAL_Delegate *cred; | 249 | struct GNUNET_CREDENTIAL_Delegate *cred; |