summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_trs.c
diff options
context:
space:
mode:
authortb <>2023-02-16 08:38:17 +0000
committertb <>2023-02-16 08:38:17 +0000
commitb1fbdd21532891fac5b0f128e57331894bd69d84 (patch)
tree689defafde66dbfa38a7854af566bd9a05f191b7 /src/lib/libcrypto/x509/x509_trs.c
parentee0f647faa09f91cb79b628dcb818adaa381af90 (diff)
downloadopenbsd-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.c24
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}
112LCRYPTO_ALIAS(X509_TRUST_set_default) 112LCRYPTO_ALIAS(X509_TRUST_set_default);
113 113
114int 114int
115X509_check_trust(X509 *x, int id, int flags) 115X509_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}
144LCRYPTO_ALIAS(X509_check_trust) 144LCRYPTO_ALIAS(X509_check_trust);
145 145
146int 146int
147X509_TRUST_get_count(void) 147X509_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}
153LCRYPTO_ALIAS(X509_TRUST_get_count) 153LCRYPTO_ALIAS(X509_TRUST_get_count);
154 154
155X509_TRUST * 155X509_TRUST *
156X509_TRUST_get0(int idx) 156X509_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}
164LCRYPTO_ALIAS(X509_TRUST_get0) 164LCRYPTO_ALIAS(X509_TRUST_get0);
165 165
166int 166int
167X509_TRUST_get_by_id(int id) 167X509_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}
182LCRYPTO_ALIAS(X509_TRUST_get_by_id) 182LCRYPTO_ALIAS(X509_TRUST_get_by_id);
183 183
184int 184int
185X509_TRUST_set(int *t, int trust) 185X509_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}
194LCRYPTO_ALIAS(X509_TRUST_set) 194LCRYPTO_ALIAS(X509_TRUST_set);
195 195
196int 196int
197X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), 197X509_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}
260LCRYPTO_ALIAS(X509_TRUST_add) 260LCRYPTO_ALIAS(X509_TRUST_add);
261 261
262static void 262static void
263trtable_free(X509_TRUST *p) 263trtable_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}
280LCRYPTO_ALIAS(X509_TRUST_cleanup) 280LCRYPTO_ALIAS(X509_TRUST_cleanup);
281 281
282int 282int
283X509_TRUST_get_flags(const X509_TRUST *xp) 283X509_TRUST_get_flags(const X509_TRUST *xp)
284{ 284{
285 return xp->flags; 285 return xp->flags;
286} 286}
287LCRYPTO_ALIAS(X509_TRUST_get_flags) 287LCRYPTO_ALIAS(X509_TRUST_get_flags);
288 288
289char * 289char *
290X509_TRUST_get0_name(const X509_TRUST *xp) 290X509_TRUST_get0_name(const X509_TRUST *xp)
291{ 291{
292 return xp->name; 292 return xp->name;
293} 293}
294LCRYPTO_ALIAS(X509_TRUST_get0_name) 294LCRYPTO_ALIAS(X509_TRUST_get0_name);
295 295
296int 296int
297X509_TRUST_get_trust(const X509_TRUST *xp) 297X509_TRUST_get_trust(const X509_TRUST *xp)
298{ 298{
299 return xp->trust; 299 return xp->trust;
300} 300}
301LCRYPTO_ALIAS(X509_TRUST_get_trust) 301LCRYPTO_ALIAS(X509_TRUST_get_trust);
302 302
303static int 303static int
304trust_1oidany(X509_TRUST *trust, X509 *x, int flags) 304trust_1oidany(X509_TRUST *trust, X509 *x, int flags)