diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:40:39 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:40:39 +0000 |
commit | f7f65f083ed325ac3aec14f4025922bf923da52e (patch) | |
tree | d88af2233b87b908ffce68f4182c9fc78d638051 /lib/libcrypto/x509 | |
parent | f4340dad520aa139cd348de683f00a36901115b1 (diff) |
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 'lib/libcrypto/x509')
-rw-r--r-- | lib/libcrypto/x509/x509.h | 10 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_trs.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index 2be1e3c0007..56c1b8a1a03 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.61 2018/05/18 18:37:23 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.62 2018/05/18 18:40:38 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1318,11 +1318,11 @@ int X509_TRUST_get_count(void); X509_TRUST * X509_TRUST_get0(int idx); int X509_TRUST_get_by_id(int id); int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), - char *name, int arg1, void *arg2); + const char *name, int arg1, void *arg2); void X509_TRUST_cleanup(void); -int X509_TRUST_get_flags(X509_TRUST *xp); -char *X509_TRUST_get0_name(X509_TRUST *xp); -int X509_TRUST_get_trust(X509_TRUST *xp); +int X509_TRUST_get_flags(const X509_TRUST *xp); +char *X509_TRUST_get0_name(const X509_TRUST *xp); +int X509_TRUST_get_trust(const X509_TRUST *xp); int X509_up_ref(X509 *x); STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); diff --git a/lib/libcrypto/x509/x509_trs.c b/lib/libcrypto/x509/x509_trs.c index 9af74de1ca9..651dc82a520 100644 --- a/lib/libcrypto/x509/x509_trs.c +++ b/lib/libcrypto/x509/x509_trs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_trs.c,v 1.22 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: x509_trs.c,v 1.23 2018/05/18 18:40:38 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -187,7 +187,7 @@ X509_TRUST_set(int *t, int trust) int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), - char *name, int arg1, void *arg2) + const char *name, int arg1, void *arg2) { int idx; X509_TRUST *trtmp; @@ -274,19 +274,19 @@ X509_TRUST_cleanup(void) } int -X509_TRUST_get_flags(X509_TRUST *xp) +X509_TRUST_get_flags(const X509_TRUST *xp) { return xp->flags; } char * -X509_TRUST_get0_name(X509_TRUST *xp) +X509_TRUST_get0_name(const X509_TRUST *xp) { return xp->name; } int -X509_TRUST_get_trust(X509_TRUST *xp) +X509_TRUST_get_trust(const X509_TRUST *xp) { return xp->trust; } |