2004-08-23 Moritz Schulte <moritz@g10code.com>
authorMoritz Schulte <mo@g10code.com>
Mon, 23 Aug 2004 12:15:35 +0000 (12:15 +0000)
committerMoritz Schulte <mo@g10code.com>
Mon, 23 Aug 2004 12:15:35 +0000 (12:15 +0000)
* pubkey.c (dummy_generate, dummy_check_secret_key)
(dummy_encrypt, dummy_decrypt, dummy_sign, dummy_verify): Return
err code GPG_ERR_NOT_IMPLEMENTED instead of aborting through
log_bug().
(dummy_get_nbits): Return 0 instead of aborting though log_bug().

cipher/ChangeLog
cipher/pubkey.c

index d09af52..8f11f61 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-23  Moritz Schulte  <moritz@g10code.com>
+
+       * pubkey.c (dummy_generate, dummy_check_secret_key)
+       (dummy_encrypt, dummy_decrypt, dummy_sign, dummy_verify): Return
+       err code GPG_ERR_NOT_IMPLEMENTED instead of aborting through
+       log_bug().
+       (dummy_get_nbits): Return 0 instead of aborting though log_bug().
+
 2004-08-19  Werner Koch  <wk@g10code.de>
 
        * pubkey.c (sexp_data_to_mpi): Changed the zero random byte
index d0a172b..905055b 100644 (file)
@@ -91,39 +91,34 @@ static gcry_err_code_t
 dummy_generate (int algorithm, unsigned int nbits, unsigned long dummy,
                 gcry_mpi_t *skey, gcry_mpi_t **retfactors)
 {
-  log_bug ("no generate() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static gcry_err_code_t
 dummy_check_secret_key (int algorithm, gcry_mpi_t *skey)
 {
-  log_bug ("no check_secret_key() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static gcry_err_code_t
 dummy_encrypt (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
                gcry_mpi_t *pkey, int flags)
 {
-  log_bug ("no encrypt() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static gcry_err_code_t
 dummy_decrypt (int algorithm, gcry_mpi_t *result, gcry_mpi_t *data,
                gcry_mpi_t *skey, int flags)
 {
-  log_bug ("no decrypt() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static gcry_err_code_t
 dummy_sign (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
             gcry_mpi_t *skey)
 {
-  log_bug ("no sign() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static gcry_err_code_t
@@ -131,14 +126,12 @@ dummy_verify (int algorithm, gcry_mpi_t hash, gcry_mpi_t *data,
               gcry_mpi_t *pkey,
              int (*cmp) (void *, gcry_mpi_t), void *opaquev)
 {
-  log_bug ("no verify() for %d\n", algorithm);
-  return GPG_ERR_PUBKEY_ALGO;
+  return GPG_ERR_NOT_IMPLEMENTED;
 }
 
 static unsigned
 dummy_get_nbits (int algorithm, gcry_mpi_t *pkey)
 {
-  log_bug ("no get_nbits() for %d\n", algorithm);
   return 0;
 }