- begin work on enhanced multipart receiving
[oweals/gnunet.git] / src / revocation / gnunet-revocation.c
index 5f97a7112f6ac8834890c389298f7a03bbda37d9..59f47ab9752d236977aeeb685e37244cd8fbd344 100644 (file)
@@ -193,12 +193,12 @@ struct RevocationData
   /**
    * Public key.
    */
-  struct GNUNET_CRYPTO_EccPublicSignKey key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey key;
 
   /**
    * Revocation signature data.
    */
-  struct GNUNET_CRYPTO_EccSignature sig;
+  struct GNUNET_CRYPTO_EcdsaSignature sig;
 
   /**
    * Proof of work (in NBO).
@@ -310,14 +310,14 @@ ego_callback (void *cls,
               const struct GNUNET_IDENTITY_Ego *ego)
 {
   struct RevocationData *rd;
-  struct GNUNET_CRYPTO_EccPublicSignKey key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey key;
 
   el = NULL;
   if (NULL == ego)
   {
     FPRINTF (stdout,
              _("Ego `%s' not found.\n"),
-             test_ego);
+             revoke_ego);
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
@@ -334,7 +334,7 @@ ego_callback (void *cls,
   {
     if (0 != memcmp (&rd->key,
                      &key,
-                     sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)))
+                     sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)))
     {
       fprintf (stderr,
                _("Error: revocation certificate in `%s' is not for `%s'\n"),
@@ -387,14 +387,14 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  struct GNUNET_CRYPTO_EccPublicSignKey pk;
+  struct GNUNET_CRYPTO_EcdsaPublicKey pk;
   struct RevocationData rd;
 
   cfg = c;
   if (NULL != test_ego)
   {
     if (GNUNET_OK !=
-        GNUNET_CRYPTO_ecc_public_sign_key_from_string (test_ego,
+        GNUNET_CRYPTO_ecdsa_public_key_from_string (test_ego,
                                                        strlen (test_ego),
                                                        &pk))
     {
@@ -429,6 +429,13 @@ run (void *cls,
   }
   if (NULL != revoke_ego)
   {
+    if ( !perform && (NULL == filename) )
+    {
+        FPRINTF (stderr,
+                 "%s",
+                 _("No filename to store revocation certificate given.\n"));
+        return;
+    }
     /* main code here */
     el = GNUNET_IDENTITY_ego_lookup (cfg,
                                      revoke_ego,
@@ -492,10 +499,10 @@ main (int argc, char *const *argv)
      gettext_noop ("use NAME for the name of the revocation file"),
      1, &GNUNET_GETOPT_set_string, &filename},
     {'R', "revoke", "NAME",
-     gettext_noop ("revoke the private key associated with the ego NAME "),
+     gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "),
      1, &GNUNET_GETOPT_set_string, &revoke_ego},
     {'p', "perform", NULL,
-     gettext_noop ("actually perform the revocation revocation file, otherwise we just do the precomputation"),
+     gettext_noop ("actually perform revocation, otherwise we just do the precomputation"),
      0, &GNUNET_GETOPT_set_one, &perform},
     {'t', "test", "KEY",
      gettext_noop ("test if the public key KEY has been revoked"),