summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/x509v3
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2018-05-18 18:30:03 +0000
committertb <tb@openbsd.org>2018-05-18 18:30:03 +0000
commit994e4cb15c973d904be77c040de8aab368f22bd1 (patch)
treef855a048376dbca981199b1c558ee4c0587a55f6 /lib/libcrypto/x509v3
parentAdd a const qualifier to the 'X509_NAME *' argument of (diff)
downloadwireguard-openbsd-994e4cb15c973d904be77c040de8aab368f22bd1.tar.xz
wireguard-openbsd-994e4cb15c973d904be77c040de8aab368f22bd1.zip
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/libcrypto/x509v3')
-rw-r--r--lib/libcrypto/x509v3/v3_purp.c16
-rw-r--r--lib/libcrypto/x509v3/x509v3.h14
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);