From 21029eda6d5dcfa0cfc148233cc5ee760f435323 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 18 May 2018 18:40:38 +0000 Subject: 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 --- src/lib/libcrypto/x509/x509.h | 10 +++++----- src/lib/libcrypto/x509/x509_trs.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lib') 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 @@ -/* $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/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 @@ -/* $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; } -- cgit v1.2.3-55-g6feb