summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-05-13 15:03:02 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-05-13 15:03:02 +0000
commitd60885953639850fb308b5aee669189abcb90572 (patch)
tree0246816127b8fb089705a83d88509b5e6dbc2395 /lib
parent2070373ac47094857b394f1875b79cea6a8d1d3f (diff)
Add const qualifiers to the char *zone and char *user arguments of
SXNET_add_id_INTEGER(3), SXNET_add_id_asc(3), SXNET_add_id_ulong(3) tested in a bulk by sthen ok jsing
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/x509v3/v3_sxnet.c10
-rw-r--r--lib/libcrypto/x509v3/x509v3.h11
2 files changed, 13 insertions, 8 deletions
diff --git a/lib/libcrypto/x509v3/v3_sxnet.c b/lib/libcrypto/x509v3/v3_sxnet.c
index e113d5f7e20..53db28248a2 100644
--- a/lib/libcrypto/x509v3/v3_sxnet.c
+++ b/lib/libcrypto/x509v3/v3_sxnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_sxnet.c,v 1.20 2018/04/25 11:48:21 tb Exp $ */
+/* $OpenBSD: v3_sxnet.c,v 1.21 2018/05/13 15:03:01 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -253,7 +253,7 @@ sxnet_v2i(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
/* Add an id given the zone as an ASCII number */
int
-SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen)
+SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen)
{
ASN1_INTEGER *izone = NULL;
@@ -267,7 +267,8 @@ SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen)
/* Add an id given the zone as an unsigned long */
int
-SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen)
+SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
+ int userlen)
{
ASN1_INTEGER *izone = NULL;
@@ -286,7 +287,8 @@ SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen)
*/
int
-SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, char *user, int userlen)
+SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user,
+ int userlen)
{
SXNET *sx = NULL;
SXNETID *id = NULL;
diff --git a/lib/libcrypto/x509v3/x509v3.h b/lib/libcrypto/x509v3/x509v3.h
index abf126996ac..3efb4ef25de 100644
--- a/lib/libcrypto/x509v3/x509v3.h
+++ b/lib/libcrypto/x509v3/x509v3.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509v3.h,v 1.23 2018/04/25 11:48:21 tb Exp $ */
+/* $OpenBSD: x509v3.h,v 1.24 2018/05/13 15:03:01 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -524,9 +524,12 @@ SXNETID *d2i_SXNETID(SXNETID **a, const unsigned char **in, long len);
int i2d_SXNETID(SXNETID *a, unsigned char **out);
extern const ASN1_ITEM SXNETID_it;
-int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen);
-int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen);
-int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user, int userlen);
+int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user,
+ int userlen);
+int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
+ int userlen);
+int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user,
+ int userlen);
ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone);
ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);