diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-04-20 16:58:17 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-04-20 16:58:17 +0200 |
commit | 4a700470f454268928468ba49539524c3b02438a (patch) | |
tree | fbb2703fb3a6edb7f247996752fd985e9cc9f15f /src | |
parent | ee5cfec8640886ea3fa3f582cb04347762feebbd (diff) | |
download | gnunet-4a700470f454268928468ba49539524c3b02438a.tar.gz gnunet-4a700470f454268928468ba49539524c3b02438a.zip |
remove sign API call
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_revocation_service.h | 22 | ||||
-rw-r--r-- | src/revocation/revocation_api.c | 23 |
2 files changed, 1 insertions, 44 deletions
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h index b2f81b67a..b38fbac3d 100644 --- a/src/include/gnunet_revocation_service.h +++ b/src/include/gnunet_revocation_service.h | |||
@@ -149,12 +149,8 @@ struct GNUNET_REVOCATION_Handle; | |||
149 | * Perform key revocation. | 149 | * Perform key revocation. |
150 | * | 150 | * |
151 | * @param cfg the configuration to use | 151 | * @param cfg the configuration to use |
152 | * @param key public key of the key to revoke | ||
153 | * @param sig signature to use on the revocation (should have been | ||
154 | * created using #GNUNET_REVOCATION_sign_revocation). | ||
155 | * @param ts revocation timestamp | ||
156 | * @param pow proof of work to use (should have been created by | 152 | * @param pow proof of work to use (should have been created by |
157 | * iteratively calling #GNUNET_REVOCATION_check_pow) | 153 | * iteratively calling #GNUNET_REVOCATION_pow_round) |
158 | * @param func funtion to call with the result of the check | 154 | * @param func funtion to call with the result of the check |
159 | * (called with `is_valid` being #GNUNET_NO if | 155 | * (called with `is_valid` being #GNUNET_NO if |
160 | * the revocation worked). | 156 | * the revocation worked). |
@@ -254,22 +250,6 @@ void | |||
254 | GNUNET_REVOCATION_pow_cleanup (struct | 250 | GNUNET_REVOCATION_pow_cleanup (struct |
255 | GNUNET_REVOCATION_PowCalculationHandle *pc); | 251 | GNUNET_REVOCATION_PowCalculationHandle *pc); |
256 | 252 | ||
257 | |||
258 | |||
259 | |||
260 | /** | ||
261 | * Create a revocation signature. | ||
262 | * | ||
263 | * @param key private key of the key to revoke | ||
264 | * @param sig where to write the revocation signature | ||
265 | */ | ||
266 | void | ||
267 | GNUNET_REVOCATION_sign_revocation (struct | ||
268 | GNUNET_REVOCATION_Pow *pow, | ||
269 | const struct | ||
270 | GNUNET_CRYPTO_EcdsaPrivateKey *key); | ||
271 | |||
272 | |||
273 | #if 0 /* keep Emacsens' auto-indent happy */ | 253 | #if 0 /* keep Emacsens' auto-indent happy */ |
274 | { | 254 | { |
275 | #endif | 255 | #endif |
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index fba10a4d5..1aff7c2f6 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -608,27 +608,4 @@ GNUNET_REVOCATION_pow_cleanup (struct | |||
608 | GNUNET_free (pc); | 608 | GNUNET_free (pc); |
609 | } | 609 | } |
610 | 610 | ||
611 | |||
612 | /** | ||
613 | * Create a revocation signature. | ||
614 | * | ||
615 | * @param key private key of the key to revoke | ||
616 | * @param sig where to write the revocation signature | ||
617 | */ | ||
618 | void | ||
619 | GNUNET_REVOCATION_sign_revocation (struct GNUNET_REVOCATION_Pow *pow, | ||
620 | const struct | ||
621 | GNUNET_CRYPTO_EcdsaPrivateKey *key) | ||
622 | { | ||
623 | pow->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); | ||
624 | pow->purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) | ||
625 | + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); | ||
626 | GNUNET_CRYPTO_ecdsa_key_get_public (key, &pow->key); | ||
627 | GNUNET_assert (GNUNET_OK == | ||
628 | GNUNET_CRYPTO_ecdsa_sign_ (key, | ||
629 | &pow->purpose, | ||
630 | &pow->signature)); | ||
631 | } | ||
632 | |||
633 | |||
634 | /* end of revocation_api.c */ | 611 | /* end of revocation_api.c */ |