.Sh SYNOPSIS
.Nm
.Op Fl t Ar KEY | Fl -test= Ns Ar KEY
+.Op Fl e Ar EPOCHS | Fl -epochs= Ns Ar EPOCHS
.Op Fl R Ar NAME | Fl -revoke= Ns Ar NAME
.Op Fl p | -perform
.Op Fl f Ar NAME | Fl -filename= Ns Ar NAME
.Bl -tag -width indent
.It Fl t Ar KEY | Fl -test= Ns Ar KEY
Check if the given KEY (ASCII-encoded public key required) has been revoked.
+.It Fl e Ar EPOCHS | Fl -epochs= Ns Ar EPOCHS
+Number of epochs for which the revocation should be valid (default: 1)
.It Fl R Ar NAME | Fl -revoke= Ns Ar NAME
Calculate or perform revocation for the ego with the given NAME.
.It Fl p | -perform
*/
static char *test_ego;
+/**
+ * -e option.
+ */
+static unsigned int epochs = 1;
+
/**
* Handle for revocation query.
*/
}
GNUNET_IDENTITY_ego_get_public_key (ego, &key);
privkey = GNUNET_IDENTITY_ego_get_private_key (ego);
- memset(&proof_of_work, 0, sizeof (proof_of_work));
+ memset (&proof_of_work, 0, sizeof (proof_of_work));
if ((NULL != filename) && (GNUNET_YES == GNUNET_DISK_file_test (filename)) &&
(sizeof(proof_of_work) ==
GNUNET_DISK_fn_read (filename, &proof_of_work, sizeof(proof_of_work))))
*/
fprintf (stderr,
"%s",
- _("Continuing calculation where left off...\n"));
+ _ ("Continuing calculation where left off...\n"));
ph = GNUNET_REVOCATION_pow_start (&proof_of_work,
- 1, /* Epochs */
+ epochs,
matching_bits);
}
fprintf (stderr,
GNUNET_REVOCATION_pow_init (privkey,
&proof_of_work);
ph = GNUNET_REVOCATION_pow_start (&proof_of_work,
- 1, /* Epochs */
+ epochs, /* Epochs */
matching_bits);
}
pow_task = GNUNET_SCHEDULER_add_now (&calculate_pow, ph);
{
struct GNUNET_REVOCATION_PowCalculationHandle *ph;
ph = GNUNET_REVOCATION_pow_start (&proof_of_work,
- 1, /* Epochs */
+ epochs, /* Epochs */
matching_bits);
pow_task = GNUNET_SCHEDULER_add_now (&calculate_pow, ph);
gettext_noop (
"test if the public key KEY has been revoked"),
&test_ego),
+ GNUNET_GETOPT_option_uint ('e',
+ "epochs",
+ "EPOCHS",
+ gettext_noop (
+ "number of epochs to calculate for"),
+ &epochs),
GNUNET_GETOPT_OPTION_END
};