summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2018-05-18 18:40:38 +0000
committertb <>2018-05-18 18:40:38 +0000
commit7c1bacfd1e2180b7fa9c03c8eb8a8d3217490562 (patch)
treeebe15260dde954184f5b5302492ee3852c60f51d /src
parent55c786007a2c2ee78f6409dc2a0c3dbc7a8ed7df (diff)
downloadopenbsd-7c1bacfd1e2180b7fa9c03c8eb8a8d3217490562.tar.gz
openbsd-7c1bacfd1e2180b7fa9c03c8eb8a8d3217490562.tar.bz2
openbsd-7c1bacfd1e2180b7fa9c03c8eb8a8d3217490562.zip
Add const qualifiers to the name and xp arguments of X509_TRUST_add(3),
X509_TRUST_get0_name(3), X509_TRUST_get_flags(3), and X509_TRUST_get_trust(3). tested in a bulk build by sthen ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509.h10
-rw-r--r--src/lib/libcrypto/x509/x509_trs.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h
index 2be1e3c000..56c1b8a1a0 100644
--- a/src/lib/libcrypto/x509/x509.h
+++ b/src/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509.h,v 1.61 2018/05/18 18:37:23 tb Exp $ */ 1/* $OpenBSD: x509.h,v 1.62 2018/05/18 18:40:38 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1318,11 +1318,11 @@ int X509_TRUST_get_count(void);
1318X509_TRUST * X509_TRUST_get0(int idx); 1318X509_TRUST * X509_TRUST_get0(int idx);
1319int X509_TRUST_get_by_id(int id); 1319int X509_TRUST_get_by_id(int id);
1320int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), 1320int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
1321 char *name, int arg1, void *arg2); 1321 const char *name, int arg1, void *arg2);
1322void X509_TRUST_cleanup(void); 1322void X509_TRUST_cleanup(void);
1323int X509_TRUST_get_flags(X509_TRUST *xp); 1323int X509_TRUST_get_flags(const X509_TRUST *xp);
1324char *X509_TRUST_get0_name(X509_TRUST *xp); 1324char *X509_TRUST_get0_name(const X509_TRUST *xp);
1325int X509_TRUST_get_trust(X509_TRUST *xp); 1325int X509_TRUST_get_trust(const X509_TRUST *xp);
1326 1326
1327int X509_up_ref(X509 *x); 1327int X509_up_ref(X509 *x);
1328STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); 1328STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain);
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c
index 9af74de1ca..651dc82a52 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.22 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: x509_trs.c,v 1.23 2018/05/18 18:40:38 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 */
@@ -187,7 +187,7 @@ X509_TRUST_set(int *t, int trust)
187 187
188int 188int
189X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), 189X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
190 char *name, int arg1, void *arg2) 190 const char *name, int arg1, void *arg2)
191{ 191{
192 int idx; 192 int idx;
193 X509_TRUST *trtmp; 193 X509_TRUST *trtmp;
@@ -274,19 +274,19 @@ X509_TRUST_cleanup(void)
274} 274}
275 275
276int 276int
277X509_TRUST_get_flags(X509_TRUST *xp) 277X509_TRUST_get_flags(const X509_TRUST *xp)
278{ 278{
279 return xp->flags; 279 return xp->flags;
280} 280}
281 281
282char * 282char *
283X509_TRUST_get0_name(X509_TRUST *xp) 283X509_TRUST_get0_name(const X509_TRUST *xp)
284{ 284{
285 return xp->name; 285 return xp->name;
286} 286}
287 287
288int 288int
289X509_TRUST_get_trust(X509_TRUST *xp) 289X509_TRUST_get_trust(const X509_TRUST *xp)
290{ 290{
291 return xp->trust; 291 return xp->trust;
292} 292}