diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:30:04 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:30:04 +0000 |
commit | cb30101b66e06102e1137a0748e3aa0864e2a3aa (patch) | |
tree | 0492e141853d14a04a4a47928497cb6d09d93734 /lib | |
parent | 2f7f9ff4ecef633fac471a0fe04e4d06db05af28 (diff) |
Add const qualifiers to the 'name', 'sname' and 'X509_PURPOSE *'
arguments of X509_PURPOSE_add(3), X509_PURPOSE_get0_name(3),
X509_PURPOSE_get0_sname(3), X509_PURPOSE_get_by_sname(3),
X509_PURPOSE_get_id(3), X509_PURPOSE_get_trust(3).
tested in a bulk build by sthen
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/x509v3/v3_purp.c | 16 | ||||
-rw-r--r-- | lib/libcrypto/x509v3/x509v3.h | 14 |
2 files changed, 15 insertions, 15 deletions
diff --git a/lib/libcrypto/x509v3/v3_purp.c b/lib/libcrypto/x509v3/v3_purp.c index d692a19c25d..0fdec224a38 100644 --- a/lib/libcrypto/x509v3/v3_purp.c +++ b/lib/libcrypto/x509v3/v3_purp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v3_purp.c,v 1.30 2017/06/22 17:28:00 jsing Exp $ */ +/* $OpenBSD: v3_purp.c,v 1.31 2018/05/18 18:30:03 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -172,7 +172,7 @@ X509_PURPOSE_get0(int idx) } int -X509_PURPOSE_get_by_sname(char *sname) +X509_PURPOSE_get_by_sname(const char *sname) { int i; X509_PURPOSE *xptmp; @@ -204,8 +204,8 @@ X509_PURPOSE_get_by_id(int purpose) int X509_PURPOSE_add(int id, int trust, int flags, - int (*ck)(const X509_PURPOSE *, const X509 *, int), char *name, - char *sname, void *arg) + int (*ck)(const X509_PURPOSE *, const X509 *, int), const char *name, + const char *sname, void *arg) { int idx; X509_PURPOSE *ptmp; @@ -302,25 +302,25 @@ X509_PURPOSE_cleanup(void) } int -X509_PURPOSE_get_id(X509_PURPOSE *xp) +X509_PURPOSE_get_id(const X509_PURPOSE *xp) { return xp->purpose; } char * -X509_PURPOSE_get0_name(X509_PURPOSE *xp) +X509_PURPOSE_get0_name(const X509_PURPOSE *xp) { return xp->name; } char * -X509_PURPOSE_get0_sname(X509_PURPOSE *xp) +X509_PURPOSE_get0_sname(const X509_PURPOSE *xp) { return xp->sname; } int -X509_PURPOSE_get_trust(X509_PURPOSE *xp) +X509_PURPOSE_get_trust(const X509_PURPOSE *xp) { return xp->trust; } diff --git a/lib/libcrypto/x509v3/x509v3.h b/lib/libcrypto/x509v3/x509v3.h index 429239424cd..0d636d7bf46 100644 --- a/lib/libcrypto/x509v3/x509v3.h +++ b/lib/libcrypto/x509v3/x509v3.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509v3.h,v 1.25 2018/05/13 17:49:03 tb Exp $ */ +/* $OpenBSD: x509v3.h,v 1.26 2018/05/18 18:30:03 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -782,16 +782,16 @@ int X509_check_issued(X509 *issuer, X509 *subject); int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); int X509_PURPOSE_get_count(void); X509_PURPOSE * X509_PURPOSE_get0(int idx); -int X509_PURPOSE_get_by_sname(char *sname); +int X509_PURPOSE_get_by_sname(const char *sname); int X509_PURPOSE_get_by_id(int id); int X509_PURPOSE_add(int id, int trust, int flags, int (*ck)(const X509_PURPOSE *, const X509 *, int), - char *name, char *sname, void *arg); -char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); -char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); -int X509_PURPOSE_get_trust(X509_PURPOSE *xp); + const char *name, const char *sname, void *arg); +char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp); +char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); +int X509_PURPOSE_get_trust(const X509_PURPOSE *xp); void X509_PURPOSE_cleanup(void); -int X509_PURPOSE_get_id(X509_PURPOSE *); +int X509_PURPOSE_get_id(const X509_PURPOSE *); STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); |