diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 18:27:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 18:27:33 +0000 |
commit | 0314e07406c3860c4dbc76b585000685f3437e09 (patch) | |
tree | 6233c519361fe97c2ba6d519c16c09bf10a43027 /src/include/gnunet_revocation_service.h | |
parent | 28018959b9afc2a8259f35e074869fd88b31b03e (diff) | |
download | gnunet-0314e07406c3860c4dbc76b585000685f3437e09.tar.gz gnunet-0314e07406c3860c4dbc76b585000685f3437e09.zip |
-revocation prototype
Diffstat (limited to 'src/include/gnunet_revocation_service.h')
-rw-r--r-- | src/include/gnunet_revocation_service.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h index 772dbbe75..7176abb7a 100644 --- a/src/include/gnunet_revocation_service.h +++ b/src/include/gnunet_revocation_service.h | |||
@@ -24,6 +24,7 @@ | |||
24 | /** | 24 | /** |
25 | * @file include/gnunet_revocation_service.h | 25 | * @file include/gnunet_revocation_service.h |
26 | * @brief API to perform and access key revocations | 26 | * @brief API to perform and access key revocations |
27 | * @author Christian Grothoff | ||
27 | * @defgroup revocation key revocation service | 28 | * @defgroup revocation key revocation service |
28 | * @{ | 29 | * @{ |
29 | */ | 30 | */ |
@@ -94,8 +95,11 @@ struct GNUNET_REVOCATION_Handle; | |||
94 | * Perform key revocation. | 95 | * Perform key revocation. |
95 | * | 96 | * |
96 | * @param cfg the configuration to use | 97 | * @param cfg the configuration to use |
97 | * @param key key to revoke | 98 | * @param key public key of the key to revoke |
98 | * @param pow proof of work to use | 99 | * @param sig signature to use on the revocation (should have been |
100 | * created using #GNUNET_REVOCATION_sign_revocation). | ||
101 | * @param pow proof of work to use (should have been created by | ||
102 | * iteratively calling #GNUNET_REVOCATION_check_pow) | ||
99 | * @param func funtion to call with the result of the check | 103 | * @param func funtion to call with the result of the check |
100 | * (called with `is_valid` being #GNUNET_NO if | 104 | * (called with `is_valid` being #GNUNET_NO if |
101 | * the revocation worked). | 105 | * the revocation worked). |
@@ -104,7 +108,8 @@ struct GNUNET_REVOCATION_Handle; | |||
104 | */ | 108 | */ |
105 | struct GNUNET_REVOCATION_Handle * | 109 | struct GNUNET_REVOCATION_Handle * |
106 | GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, | 110 | GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, |
107 | const struct GNUNET_CRYPTO_EccPrivateKey *key, | 111 | const struct GNUNET_CRYPTO_EccPublicSignKey *key, |
112 | const struct GNUNET_CRYPTO_EccSignature *sig, | ||
108 | uint64_t pow, | 113 | uint64_t pow, |
109 | GNUNET_REVOCATION_Callback func, void *func_cls); | 114 | GNUNET_REVOCATION_Callback func, void *func_cls); |
110 | 115 | ||
@@ -131,6 +136,17 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EccPublicSignKey *key, | |||
131 | uint64_t pow); | 136 | uint64_t pow); |
132 | 137 | ||
133 | 138 | ||
139 | /** | ||
140 | * Create a revocation signature. | ||
141 | * | ||
142 | * @param key private key of the key to revoke | ||
143 | * @param sig where to write the revocation signature | ||
144 | */ | ||
145 | void | ||
146 | GNUNET_REVOCATION_sign_revocation (const struct GNUNET_CRYPTO_EccPrivateKey *key, | ||
147 | struct GNUNET_CRYPTO_EccSignature *sig); | ||
148 | |||
149 | |||
134 | #if 0 /* keep Emacsens' auto-indent happy */ | 150 | #if 0 /* keep Emacsens' auto-indent happy */ |
135 | { | 151 | { |
136 | #endif | 152 | #endif |