Ticket #62132: 0001-cipher-proto-remove-forward-typedef-of-cipher_bulk_MP.patch

File 0001-cipher-proto-remove-forward-typedef-of-cipher_bulk_MP.patch, 4.3 KB (added by ballapete (Peter "Pete" Dyballa), 4 years ago)

Patch set to correct the typdef problem

  • cipher/arcfour.c

    old new  
    3030#include "types.h"
    3131#include "g10lib.h"
    3232#include "cipher.h"
     33#include "cipher-internal.h"
    3334
    3435/* USE_AMD64_ASM indicates whether to use AMD64 assembly code. */
    3536#undef USE_AMD64_ASM
  • cipher/gost28147.c

    old new  
    3535#include "cipher.h"
    3636#include "mac-internal.h"
    3737#include "bufhelp.h"
     38#include "cipher-internal.h"
    3839
    3940#include "gost.h"
    4041#include "gost-sb.h"
  • cipher/idea.c

    old new  
    4848#include "types.h"  /* for byte and u32 typedefs */
    4949#include "g10lib.h"
    5050#include "cipher.h"
     51#include "cipher-internal.h"
    5152
    5253
    5354#define IDEA_KEYSIZE 16
  • cipher/mac-cmac.c

    old new  
    6969{
    7070  gcry_err_code_t err;
    7171  gcry_cipher_hd_t hd;
    72   int secure = (h->magic == CTX_MAGIC_SECURE);
     72  int secure = (h->magic == CTX_MAC_MAGIC_SECURE);
    7373  int cipher_algo;
    7474  unsigned int flags;
    7575
  • cipher/mac-gmac.c

    old new  
    5454{
    5555  gcry_err_code_t err;
    5656  gcry_cipher_hd_t hd;
    57   int secure = (h->magic == CTX_MAGIC_SECURE);
     57  int secure = (h->magic == CTX_MAC_MAGIC_SECURE);
    5858  int cipher_algo;
    5959  unsigned int flags;
    6060
  • cipher/mac-hmac.c

    old new  
    107107{
    108108  gcry_err_code_t err;
    109109  gcry_md_hd_t hd;
    110   int secure = (h->magic == CTX_MAGIC_SECURE);
     110  int secure = (h->magic == CTX_MAC_MAGIC_SECURE);
    111111  unsigned int flags;
    112112  int md_algo;
    113113
  • cipher/mac-internal.h

    old new  
    3939
    4040
    4141/* Magic values for the context structure.  */
    42 #define CTX_MAGIC_NORMAL 0x59d9b8af
    43 #define CTX_MAGIC_SECURE 0x12c27cd0
     42#define CTX_MAC_MAGIC_NORMAL 0x59d9b8af
     43#define CTX_MAC_MAGIC_SECURE 0x12c27cd0
    4444
    4545
    4646/* MAC module functions. */
  • cipher/mac-poly1305.c

    old new  
    4545poly1305mac_open (gcry_mac_hd_t h)
    4646{
    4747  struct poly1305mac_context_s *mac_ctx;
    48   int secure = (h->magic == CTX_MAGIC_SECURE);
     48  int secure = (h->magic == CTX_MAC_MAGIC_SECURE);
    4949  unsigned int flags = (secure ? GCRY_CIPHER_SECURE : 0);
    5050  gcry_err_code_t err;
    5151  int cipher_algo;
  • cipher/mac.c

    old new  
    517517  if (!h)
    518518    return gpg_err_code_from_syserror ();
    519519
    520   h->magic = secure ? CTX_MAGIC_SECURE : CTX_MAGIC_NORMAL;
     520  h->magic = secure ? CTX_MAC_MAGIC_SECURE : CTX_MAC_MAGIC_NORMAL;
    521521  h->spec = spec;
    522522  h->algo = algo;
    523523  h->gcry_ctx = ctx;
  • cipher/rfc2268.c

    old new  
    3535#include "g10lib.h"
    3636#include "types.h"
    3737#include "cipher.h"
     38#include "cipher-internal.h"
    3839
    3940#define RFC2268_BLOCKSIZE 8
    4041
  • cipher/salsa20.c

    old new  
    3939#include "g10lib.h"
    4040#include "cipher.h"
    4141#include "bufhelp.h"
     42#include "cipher-internal.h"
    4243
    4344
    4445/* USE_AMD64 indicates whether to compile with AMD64 code. */
  • cipher/seed.c

    old new  
    3030#include "g10lib.h"
    3131#include "cipher.h"
    3232#include "bufhelp.h"
     33#include "cipher-internal.h"
    3334
    3435#define NUMKC   16
    3536
  • src/cipher-proto.h

    old new  
    129129 *
    130130 */
    131131
    132 typedef struct cipher_bulk_ops cipher_bulk_ops_t;
     132struct cipher_bulk_ops;
    133133
    134134/* Type for the cipher_setkey function.  */
    135135typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
    136136                                                 const unsigned char *key,
    137137                                                 unsigned keylen,
    138                                                  cipher_bulk_ops_t *bulk_ops);
     138                                                 struct cipher_bulk_ops *bulk_ops);
    139139
    140140/* Type for the cipher_encrypt function.  */
    141141typedef unsigned int (*gcry_cipher_encrypt_t) (void *c,