diff options
author | tb <> | 2023-02-16 08:38:17 +0000 |
---|---|---|
committer | tb <> | 2023-02-16 08:38:17 +0000 |
commit | b1fbdd21532891fac5b0f128e57331894bd69d84 (patch) | |
tree | 689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libcrypto/x509/x509_trs.c | |
parent | ee0f647faa09f91cb79b628dcb818adaa381af90 (diff) | |
download | openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.gz openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.tar.bz2 openbsd-b1fbdd21532891fac5b0f128e57331894bd69d84.zip |
libressl *_namespace.h: adjust *_ALIAS() to require a semicolon
LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h
fix suggested by & ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_trs.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index 10995801b1..e3265918a4 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_trs.c,v 1.30 2022/11/26 16:08:55 tb Exp $ */ | 1 | /* $OpenBSD: x509_trs.c,v 1.31 2023/02/16 08:38:17 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -109,7 +109,7 @@ int | |||
109 | default_trust = trust; | 109 | default_trust = trust; |
110 | return oldtrust; | 110 | return oldtrust; |
111 | } | 111 | } |
112 | LCRYPTO_ALIAS(X509_TRUST_set_default) | 112 | LCRYPTO_ALIAS(X509_TRUST_set_default); |
113 | 113 | ||
114 | int | 114 | int |
115 | X509_check_trust(X509 *x, int id, int flags) | 115 | X509_check_trust(X509 *x, int id, int flags) |
@@ -141,7 +141,7 @@ X509_check_trust(X509 *x, int id, int flags) | |||
141 | pt = X509_TRUST_get0(idx); | 141 | pt = X509_TRUST_get0(idx); |
142 | return pt->check_trust(pt, x, flags); | 142 | return pt->check_trust(pt, x, flags); |
143 | } | 143 | } |
144 | LCRYPTO_ALIAS(X509_check_trust) | 144 | LCRYPTO_ALIAS(X509_check_trust); |
145 | 145 | ||
146 | int | 146 | int |
147 | X509_TRUST_get_count(void) | 147 | X509_TRUST_get_count(void) |
@@ -150,7 +150,7 @@ X509_TRUST_get_count(void) | |||
150 | return X509_TRUST_COUNT; | 150 | return X509_TRUST_COUNT; |
151 | return sk_X509_TRUST_num(trtable) + X509_TRUST_COUNT; | 151 | return sk_X509_TRUST_num(trtable) + X509_TRUST_COUNT; |
152 | } | 152 | } |
153 | LCRYPTO_ALIAS(X509_TRUST_get_count) | 153 | LCRYPTO_ALIAS(X509_TRUST_get_count); |
154 | 154 | ||
155 | X509_TRUST * | 155 | X509_TRUST * |
156 | X509_TRUST_get0(int idx) | 156 | X509_TRUST_get0(int idx) |
@@ -161,7 +161,7 @@ X509_TRUST_get0(int idx) | |||
161 | return trstandard + idx; | 161 | return trstandard + idx; |
162 | return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT); | 162 | return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT); |
163 | } | 163 | } |
164 | LCRYPTO_ALIAS(X509_TRUST_get0) | 164 | LCRYPTO_ALIAS(X509_TRUST_get0); |
165 | 165 | ||
166 | int | 166 | int |
167 | X509_TRUST_get_by_id(int id) | 167 | X509_TRUST_get_by_id(int id) |
@@ -179,7 +179,7 @@ X509_TRUST_get_by_id(int id) | |||
179 | return -1; | 179 | return -1; |
180 | return idx + X509_TRUST_COUNT; | 180 | return idx + X509_TRUST_COUNT; |
181 | } | 181 | } |
182 | LCRYPTO_ALIAS(X509_TRUST_get_by_id) | 182 | LCRYPTO_ALIAS(X509_TRUST_get_by_id); |
183 | 183 | ||
184 | int | 184 | int |
185 | X509_TRUST_set(int *t, int trust) | 185 | X509_TRUST_set(int *t, int trust) |
@@ -191,7 +191,7 @@ X509_TRUST_set(int *t, int trust) | |||
191 | *t = trust; | 191 | *t = trust; |
192 | return 1; | 192 | return 1; |
193 | } | 193 | } |
194 | LCRYPTO_ALIAS(X509_TRUST_set) | 194 | LCRYPTO_ALIAS(X509_TRUST_set); |
195 | 195 | ||
196 | int | 196 | int |
197 | X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | 197 | X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), |
@@ -257,7 +257,7 @@ err: | |||
257 | X509error(ERR_R_MALLOC_FAILURE); | 257 | X509error(ERR_R_MALLOC_FAILURE); |
258 | return 0; | 258 | return 0; |
259 | } | 259 | } |
260 | LCRYPTO_ALIAS(X509_TRUST_add) | 260 | LCRYPTO_ALIAS(X509_TRUST_add); |
261 | 261 | ||
262 | static void | 262 | static void |
263 | trtable_free(X509_TRUST *p) | 263 | trtable_free(X509_TRUST *p) |
@@ -277,28 +277,28 @@ X509_TRUST_cleanup(void) | |||
277 | sk_X509_TRUST_pop_free(trtable, trtable_free); | 277 | sk_X509_TRUST_pop_free(trtable, trtable_free); |
278 | trtable = NULL; | 278 | trtable = NULL; |
279 | } | 279 | } |
280 | LCRYPTO_ALIAS(X509_TRUST_cleanup) | 280 | LCRYPTO_ALIAS(X509_TRUST_cleanup); |
281 | 281 | ||
282 | int | 282 | int |
283 | X509_TRUST_get_flags(const X509_TRUST *xp) | 283 | X509_TRUST_get_flags(const X509_TRUST *xp) |
284 | { | 284 | { |
285 | return xp->flags; | 285 | return xp->flags; |
286 | } | 286 | } |
287 | LCRYPTO_ALIAS(X509_TRUST_get_flags) | 287 | LCRYPTO_ALIAS(X509_TRUST_get_flags); |
288 | 288 | ||
289 | char * | 289 | char * |
290 | X509_TRUST_get0_name(const X509_TRUST *xp) | 290 | X509_TRUST_get0_name(const X509_TRUST *xp) |
291 | { | 291 | { |
292 | return xp->name; | 292 | return xp->name; |
293 | } | 293 | } |
294 | LCRYPTO_ALIAS(X509_TRUST_get0_name) | 294 | LCRYPTO_ALIAS(X509_TRUST_get0_name); |
295 | 295 | ||
296 | int | 296 | int |
297 | X509_TRUST_get_trust(const X509_TRUST *xp) | 297 | X509_TRUST_get_trust(const X509_TRUST *xp) |
298 | { | 298 | { |
299 | return xp->trust; | 299 | return xp->trust; |
300 | } | 300 | } |
301 | LCRYPTO_ALIAS(X509_TRUST_get_trust) | 301 | LCRYPTO_ALIAS(X509_TRUST_get_trust); |
302 | 302 | ||
303 | static int | 303 | static int |
304 | trust_1oidany(X509_TRUST *trust, X509 *x, int flags) | 304 | trust_1oidany(X509_TRUST *trust, X509 *x, int flags) |