Skip to content

Commit 125e598

Browse files
committed
Remove more unused definitions
1 parent 2181e8a commit 125e598

File tree

3 files changed

+6
-132
lines changed

3 files changed

+6
-132
lines changed

libopenarc/arc-tables.c

+1-53
Original file line numberDiff line numberDiff line change
@@ -109,56 +109,4 @@ static struct nametable prv_settypes[] = /* set types */
109109
{"ARC results", ARC_KVSETTYPE_AR },
110110
{NULL, -1 },
111111
};
112-
struct nametable *settypes = prv_settypes;
113-
114-
static struct nametable prv_sigerrors[] = /* signature parsing errors */
115-
{
116-
{"no signature error", ARC_SIGERROR_OK },
117-
{"unsupported signature version", ARC_SIGERROR_VERSION },
118-
{"invalid domain coverage", ARC_SIGERROR_DOMAIN },
119-
{"signature expired", ARC_SIGERROR_EXPIRED },
120-
{"signature timestamp in the future", ARC_SIGERROR_FUTURE },
121-
{"signature timestamp order error", ARC_SIGERROR_TIMESTAMPS },
122-
{"invalid header canonicalization", ARC_SIGERROR_INVALID_HC },
123-
{"invalid body canonicalization", ARC_SIGERROR_INVALID_BC },
124-
{"signature algorithm missing", ARC_SIGERROR_MISSING_A },
125-
{"signature algorithm invalid", ARC_SIGERROR_INVALID_A },
126-
{"header list missing", ARC_SIGERROR_MISSING_H },
127-
{"body length value invalid", ARC_SIGERROR_INVALID_L },
128-
{"query method invalid", ARC_SIGERROR_INVALID_Q },
129-
{"query option invalid", ARC_SIGERROR_INVALID_QO },
130-
{"domain tag missing", ARC_SIGERROR_MISSING_D },
131-
{"domain tag empty", ARC_SIGERROR_EMPTY_D },
132-
{"selector tag missing", ARC_SIGERROR_MISSING_S },
133-
{"selector tag empty", ARC_SIGERROR_EMPTY_S },
134-
{"signature data missing", ARC_SIGERROR_MISSING_B },
135-
{"signature data empty", ARC_SIGERROR_EMPTY_B },
136-
{"signature data corrupt", ARC_SIGERROR_CORRUPT_B },
137-
{"key not found in DNS", ARC_SIGERROR_NOKEY },
138-
{"key DNS reply corrupt", ARC_SIGERROR_DNSSYNTAX },
139-
{"key DNS query failed", ARC_SIGERROR_KEYFAIL },
140-
{"body hash missing", ARC_SIGERROR_MISSING_BH },
141-
{"body hash empty", ARC_SIGERROR_EMPTY_BH },
142-
{"body hash corrupt", ARC_SIGERROR_CORRUPT_BH },
143-
{"signature verification failed", ARC_SIGERROR_BADSIG },
144-
{"unauthorized subdomain", ARC_SIGERROR_SUBDOMAIN },
145-
{"multiple keys found", ARC_SIGERROR_MULTIREPLY },
146-
{"header list tag empty", ARC_SIGERROR_EMPTY_H },
147-
{"header list missing required entries", ARC_SIGERROR_INVALID_H },
148-
{"length tag value exceeds body size", ARC_SIGERROR_TOOLARGE_L },
149-
{"unprotected header field", ARC_SIGERROR_MBSFAILED },
150-
{"unknown key version", ARC_SIGERROR_KEYVERSION },
151-
{"unknown key hash", ARC_SIGERROR_KEYUNKNOWNHASH },
152-
{"signature-key hash mismatch", ARC_SIGERROR_KEYHASHMISMATCH},
153-
{"not an e-mail key", ARC_SIGERROR_NOTEMAILKEY },
154-
{"key type missing", ARC_SIGERROR_KEYTYPEMISSING },
155-
{"unknown key type", ARC_SIGERROR_KEYTYPEUNKNOWN },
156-
{"key revoked", ARC_SIGERROR_KEYREVOKED },
157-
{"unable to apply public key", ARC_SIGERROR_KEYDECODE },
158-
{"version missing", ARC_SIGERROR_MISSING_V },
159-
{"version empty", ARC_SIGERROR_EMPTY_V },
160-
{"signing key too small", ARC_SIGERROR_KEYTOOSMALL },
161-
{"duplicate instance", ARC_SIGERROR_DUPINSTANCE },
162-
{NULL, -1 },
163-
};
164-
struct nametable *sigerrors = prv_sigerrors;
112+
struct nametable *settypes = prv_settypes;

libopenarc/arc-types.h

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ struct arc_msghandle
143143
arc_canon_t arc_canonhdr;
144144
arc_canon_t arc_canonbody;
145145
ARC_CHAIN arc_cstate;
146-
ARC_SIGERROR arc_sigerror;
147146
unsigned char *arc_key;
148147
char *arc_error;
149148
char *arc_hdrlist;

libopenarc/arc.h

+5-78
Original file line numberDiff line numberDiff line change
@@ -94,68 +94,12 @@ typedef int arc_canon_t;
9494
#define ARC_CANON_SIMPLE 0
9595
#define ARC_CANON_RELAXED 1
9696

97-
/*
98-
** ARC_SIGERROR -- signature errors
99-
*/
100-
101-
typedef int ARC_SIGERROR;
102-
103-
#define ARC_SIGERROR_UNKNOWN (-1) /* unknown error */
104-
#define ARC_SIGERROR_OK 0 /* no error */
105-
#define ARC_SIGERROR_VERSION 1 /* unsupported version */
106-
#define ARC_SIGERROR_DOMAIN 2 /* invalid domain (d=/i=) */
107-
#define ARC_SIGERROR_EXPIRED 3 /* signature expired */
108-
#define ARC_SIGERROR_FUTURE 4 /* signature in the future */
109-
#define ARC_SIGERROR_TIMESTAMPS 5 /* x= < t= */
110-
#define ARC_SIGERROR_UNUSED 6 /* OBSOLETE */
111-
#define ARC_SIGERROR_INVALID_HC 7 /* c= invalid (header) */
112-
#define ARC_SIGERROR_INVALID_BC 8 /* c= invalid (body) */
113-
#define ARC_SIGERROR_MISSING_A 9 /* a= missing */
114-
#define ARC_SIGERROR_INVALID_A 10 /* a= invalid */
115-
#define ARC_SIGERROR_MISSING_H 11 /* h= missing */
116-
#define ARC_SIGERROR_INVALID_L 12 /* l= invalid */
117-
#define ARC_SIGERROR_INVALID_Q 13 /* q= invalid */
118-
#define ARC_SIGERROR_INVALID_QO 14 /* q= option invalid */
119-
#define ARC_SIGERROR_MISSING_D 15 /* d= missing */
120-
#define ARC_SIGERROR_EMPTY_D 16 /* d= empty */
121-
#define ARC_SIGERROR_MISSING_S 17 /* s= missing */
122-
#define ARC_SIGERROR_EMPTY_S 18 /* s= empty */
123-
#define ARC_SIGERROR_MISSING_B 19 /* b= missing */
124-
#define ARC_SIGERROR_EMPTY_B 20 /* b= empty */
125-
#define ARC_SIGERROR_CORRUPT_B 21 /* b= corrupt */
126-
#define ARC_SIGERROR_NOKEY 22 /* no key found in DNS */
127-
#define ARC_SIGERROR_DNSSYNTAX 23 /* DNS reply corrupt */
128-
#define ARC_SIGERROR_KEYFAIL 24 /* DNS query failed */
129-
#define ARC_SIGERROR_MISSING_BH 25 /* bh= missing */
130-
#define ARC_SIGERROR_EMPTY_BH 26 /* bh= empty */
131-
#define ARC_SIGERROR_CORRUPT_BH 27 /* bh= corrupt */
132-
#define ARC_SIGERROR_BADSIG 28 /* signature mismatch */
133-
#define ARC_SIGERROR_SUBDOMAIN 29 /* unauthorized subdomain */
134-
#define ARC_SIGERROR_MULTIREPLY 30 /* multiple records returned */
135-
#define ARC_SIGERROR_EMPTY_H 31 /* h= empty */
136-
#define ARC_SIGERROR_INVALID_H 32 /* h= missing req'd entries */
137-
#define ARC_SIGERROR_TOOLARGE_L 33 /* l= value exceeds body size */
138-
#define ARC_SIGERROR_MBSFAILED 34 /* "must be signed" failure */
139-
#define ARC_SIGERROR_KEYVERSION 35 /* unknown key version */
140-
#define ARC_SIGERROR_KEYUNKNOWNHASH 36 /* unknown key hash */
141-
#define ARC_SIGERROR_KEYHASHMISMATCH 37 /* sig-key hash mismatch */
142-
#define ARC_SIGERROR_NOTEMAILKEY 38 /* not an e-mail key */
143-
#define ARC_SIGERROR_UNUSED2 39 /* OBSOLETE */
144-
#define ARC_SIGERROR_KEYTYPEMISSING 40 /* key type missing */
145-
#define ARC_SIGERROR_KEYTYPEUNKNOWN 41 /* key type unknown */
146-
#define ARC_SIGERROR_KEYREVOKED 42 /* key revoked */
147-
#define ARC_SIGERROR_KEYDECODE 43 /* key couldn't be decoded */
148-
#define ARC_SIGERROR_MISSING_V 44 /* v= tag missing */
149-
#define ARC_SIGERROR_EMPTY_V 45 /* v= tag empty */
150-
#define ARC_SIGERROR_KEYTOOSMALL 46 /* too few key bits */
151-
#define ARC_SIGERROR_DUPINSTANCE 47 /* duplicate instance */
152-
15397
/* generic DNS error codes */
154-
#define ARC_DNS_ERROR (-1) /* error in transit */
155-
#define ARC_DNS_SUCCESS 0 /* reply available */
156-
#define ARC_DNS_NOREPLY 1 /* reply not available (yet) */
157-
#define ARC_DNS_EXPIRED 2 /* no reply, query expired */
158-
#define ARC_DNS_INVALID 3 /* invalid request */
98+
#define ARC_DNS_ERROR (-1) /* error in transit */
99+
#define ARC_DNS_SUCCESS 0 /* reply available */
100+
#define ARC_DNS_NOREPLY 1 /* reply not available (yet) */
101+
#define ARC_DNS_EXPIRED 2 /* no reply, query expired */
102+
#define ARC_DNS_INVALID 3 /* invalid request */
159103

160104
/*
161105
** ARC_SIGN -- signing method
@@ -180,23 +124,6 @@ typedef int arc_query_t;
180124

181125
#define ARC_QUERY_DEFAULT ARC_QUERY_DNS
182126

183-
/*
184-
** ARC_PARAM -- known signature parameters
185-
*/
186-
187-
typedef int arc_param_t;
188-
189-
#define ARC_PARAM_UNKNOWN (-1) /* unknown */
190-
#define ARC_PARAM_SIGNATURE 0 /* b */
191-
#define ARC_PARAM_SIGNALG 1 /* a */
192-
#define ARC_PARAM_DOMAIN 2 /* d */
193-
#define ARC_PARAM_SELECTOR 5 /* s */
194-
#define ARC_PARAM_VERSION 7 /* v */
195-
#define ARC_PARAM_INSTANCE 8 /* i */
196-
#define ARC_PARAM_TIMESTAMP 9 /* t */
197-
#define ARC_PARAM_CHAINSTATUS 10 /* cv */
198-
#define ARC_PARAM_KEYPATH 11 /* k */
199-
200127
/*
201128
** ARC_OPTS -- library-specific options
202129
*/

0 commit comments

Comments
 (0)