Remove deprecated control codes.
authorWerner Koch <wk@gnupg.org>
Wed, 2 Oct 2013 12:14:57 +0000 (14:14 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 2 Oct 2013 12:18:03 +0000 (14:18 +0200)
* src/gcrypt.h.in (GCRYCTL_SET_KEY): Remove.
(GCRYCTL_SET_IV): Remove.
(GCRYCTL_SET_CTR): Remove.
* cipher/md.c (gcry_md_ctl): Remove deprecated GCRYCTL_SET_KEY.
* cipher/cipher.c (gcry_cipher_ctl): Remove deprecated
GCRYCTL_SET_KEY, GCRYCTL_SET_IV, GCRYCTL_SET_CTR.
--

Real functions are available for a long time now thus there is no more
point in supporting the control code hacks.  We have an ABI break
anyway thus this is a good time to get rid of them.

Signed-off-by: Werner Koch <wk@gnupg.org>
NEWS
cipher/cipher.c
cipher/md.c
src/gcrypt.h.in

diff --git a/NEWS b/NEWS
index c232a99..ab326eb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ Noteworthy changes in version 1.6.0 (unreleased)
  * The deprecated message digest debug macros have been removed.  Use
    gcry_md_debug instead.
 
+ * Removed deprecated control codes.
+
  * Added support for the IDEA cipher algorithm.
 
  * Added support for the Salsa20 and reduced Salsa20/12 stream ciphers.
@@ -24,10 +26,12 @@ Noteworthy changes in version 1.6.0 (unreleased)
 
  * Added support for the SCRYPT algorithm.
 
- * Mitigate the Yarom/Falkner flush+reload side-channel attack on RSA
+ * Mitigated the Yarom/Falkner flush+reload side-channel attack on RSA
    secret keys.  See <http://eprint.iacr.org/2013/448> [CVE-2013-4242].
 
- * Support Deterministic DSA as per RFC-6969.
+ * Added support for Deterministic DSA as per RFC-6969.
+
+ * Added support for curve Ed25519.
 
  * Added a scatter gather hash convenience function.
 
@@ -41,20 +45,24 @@ Noteworthy changes in version 1.6.0 (unreleased)
 
  * Interface changes relative to the 1.5.0 release:
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- gcry_ac_*              REMOVED.
- GCRY_AC_*              REMOVED.
- gcry_module_t          REMOVED.
- gcry_cipher_register   REMOVED.
- gcry_cipher_unregister REMOVED.
- gcry_cipher_list       REMOVED.
- gcry_pk_register       REMOVED.
- gcry_pk_unregister     REMOVED.
- gcry_pk_list           REMOVED.
- gcry_md_register       REMOVED.
- gcry_md_unregister     REMOVED.
- gcry_md_list           REMOVED.
- gcry_md_start_debug    REMOVED (macro).
- gcry_md_stop_debug     REMOVED (macro).
+ gcry_ac_*                      REMOVED.
+ GCRY_AC_*                      REMOVED.
+ gcry_module_t                  REMOVED.
+ gcry_cipher_register           REMOVED.
+ gcry_cipher_unregister         REMOVED.
+ gcry_cipher_list               REMOVED.
+ gcry_pk_register               REMOVED.
+ gcry_pk_unregister             REMOVED.
+ gcry_pk_list                   REMOVED.
+ gcry_md_register               REMOVED.
+ gcry_md_unregister             REMOVED.
+ gcry_md_list                   REMOVED.
+ gcry_md_start_debug            REMOVED (macro).
+ gcry_md_stop_debug             REMOVED (macro).
+ GCRYCTL_SET_KEY                 REMOVED.
+ GCRYCTL_SET_IV                  REMOVED.
+ GCRYCTL_SET_CTR                 REMOVED.
+ GCRYCTL_DISABLE_ALGO            CHANGED: Not anymore thread-safe.
  gcry_md_hash_buffers            NEW.
  gcry_buffer_t                   NEW.
  GCRYCTL_SET_ENFORCED_FIPS_FLAG  NEW.
@@ -105,7 +113,6 @@ Noteworthy changes in version 1.6.0 (unreleased)
  GCRY_MD_GOSTR3411_94            NEW.
  GCRY_MD_STRIBOG256              NEW.
  GCRY_MD_STRIBOG512              NEW.
- GCRYCTL_DISABLE_ALGO            CHANGED: Not anymore thread-safe.
  GCRY_PK_ECC                     NEW.
  gcry_log_debug                  NEW.
  gcry_log_debughex               NEW.
index ca61375..75d42d1 100644 (file)
@@ -918,14 +918,6 @@ gcry_cipher_ctl( gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
 
   switch (cmd)
     {
-    case GCRYCTL_SET_KEY:  /* Deprecated; use gcry_cipher_setkey.  */
-      rc = cipher_setkey( h, buffer, buflen );
-      break;
-
-    case GCRYCTL_SET_IV:   /* Deprecated; use gcry_cipher_setiv.  */
-      cipher_setiv( h, buffer, buflen );
-      break;
-
     case GCRYCTL_RESET:
       cipher_reset (h);
       break;
@@ -962,10 +954,6 @@ gcry_cipher_ctl( gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
       disable_cipher_algo( *(int*)buffer );
       break;
 
-    case GCRYCTL_SET_CTR: /* Deprecated; use gcry_cipher_setctr.  */
-      rc = gpg_err_code (_gcry_cipher_setctr (h, buffer, buflen));
-      break;
-
     case 61:  /* Disable weak key detection (private).  */
       if (h->spec->set_extra_info)
         rc = h->spec->set_extra_info
index e3cc6c6..5c66397 100644 (file)
@@ -717,14 +717,13 @@ gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen)
 {
   gcry_err_code_t rc = 0;
 
+  (void)buflen; /* Currently not used.  */
+
   switch (cmd)
     {
     case GCRYCTL_FINALIZE:
       md_final (hd);
       break;
-    case GCRYCTL_SET_KEY:
-      rc = gcry_err_code (gcry_md_setkey (hd, buffer, buflen));
-      break;
     case GCRYCTL_START_DUMP:
       md_start_debug (hd, buffer);
       break;
index 8fca52e..719b951 100644 (file)
@@ -257,8 +257,7 @@ const char *gcry_check_version (const char *req_version);
 /* Codes used with the gcry_control function. */
 enum gcry_ctl_cmds
   {
-    GCRYCTL_SET_KEY  = 1,
-    GCRYCTL_SET_IV   = 2,
+    /* Note: 1 .. 2 are not anymore used. */
     GCRYCTL_CFB_SYNC = 3,
     GCRYCTL_RESET    = 4,   /* e.g. for MDs */
     GCRYCTL_FINALIZE = 5,
@@ -298,7 +297,7 @@ enum gcry_ctl_cmds
     GCRYCTL_ANY_INITIALIZATION_P = 40,
     GCRYCTL_SET_CBC_CTS = 41,
     GCRYCTL_SET_CBC_MAC = 42,
-    GCRYCTL_SET_CTR = 43,
+    /* Note: 43 is not anymore used. */
     GCRYCTL_ENABLE_QUICK_RANDOM = 44,
     GCRYCTL_SET_RANDOM_SEED_FILE = 45,
     GCRYCTL_UPDATE_RANDOM_SEED_FILE = 46,