From fddd7fb7f11a3f4399e90ee52f874f65718eb348 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Thu, 26 May 2016 09:26:09 +0100 Subject: [PATCH] server/: Rename `bulkcrypto' structure to `bulkops'. Organization: Straylight/Edgeware From: Mark Wooding We shall want a structure to collect up a bulk transform's state later. No functional change. Basically sed -i s/bulkcrypto/bulkops/g server/*.[ch] and some reformatting. --- server/bulkcrypto.c | 2 +- server/keymgmt.c | 2 +- server/tripe.h | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/bulkcrypto.c b/server/bulkcrypto.c index 144a8301..b528bb5d 100644 --- a/server/bulkcrypto.c +++ b/server/bulkcrypto.c @@ -358,7 +358,7 @@ static int iiv_decrypt(keyset *ks, unsigned ty, buf *b, buf *bb, uint32 *seq) /*----- Bulk crypto transform table ---------------------------------------*/ -const bulkcrypto bulktab[] = { +const bulkops bulktab[] = { #define BULK(name, pre, prim) \ { name, prim, pre##_check, pre##_overhead, pre##_encrypt, pre##_decrypt } diff --git a/server/keymgmt.c b/server/keymgmt.c index 50abd5d1..837bc6ef 100644 --- a/server/keymgmt.c +++ b/server/keymgmt.c @@ -178,7 +178,7 @@ static const kgops *kgtab[] = { static int algs_get(algswitch *a, dstr *e, key_file *kf, key *k) { const char *p; - const bulkcrypto *bulk; + const bulkops *bulk; char *q, *qq; dstr d = DSTR_INIT, dd = DSTR_INIT; int rc = -1; diff --git a/server/tripe.h b/server/tripe.h index 86d3779e..cb892208 100644 --- a/server/tripe.h +++ b/server/tripe.h @@ -159,7 +159,7 @@ typedef struct keyset keyset; typedef struct algswitch algswitch; -typedef struct bulkcrypto { +typedef struct bulkops { const char *name; unsigned prim; int (*check)(const algswitch */*a*/, dstr */*e*/); @@ -167,7 +167,7 @@ typedef struct bulkcrypto { int (*encrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/); int (*decrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/, uint32 */*seq*/); -} bulkcrypto; +} bulkops; #define BCP_CIPHER 1 #define BCP_MAC 2 @@ -176,7 +176,7 @@ typedef struct bulkcrypto { struct algswitch { const gchash *h; /* Hash function */ const gccipher *mgf; /* Mask-generation function */ - const bulkcrypto *bulk; /* Bulk crypto transformation */ + const bulkops *bulk; /* Bulk crypto transformation */ const gccipher *c; /* Symmetric encryption scheme */ const gcmac *m; /* Message authentication code */ const gccipher *b; /* Block cipher */ @@ -210,7 +210,7 @@ typedef struct knode { #define HASH_STRING(h, s) GH_HASH((h), (s), sizeof(s)) -extern const bulkcrypto bulktab[]; +extern const bulkops bulktab[]; /*----- Data structures ---------------------------------------------------*/ @@ -266,7 +266,7 @@ struct keyset { unsigned long sz_exp, sz_regen; /* Data limits for the keyset */ T( unsigned seq; ) /* Sequence number for tracing */ unsigned f; /* Various useful flags */ - const bulkcrypto *bulk; /* Bulk crypto transform */ + const bulkops *bulk; /* Bulk crypto transform */ size_t tagsz; /* Length to truncate MAC tags */ struct ksdir { gcipher *c; /* Keyset cipher for encryption */ -- [mdw]