summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509v3
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-05-19 10:41:54 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-05-19 10:41:54 +0000
commit60c8f21f8db86ecc60a672299b37bf4311865906 (patch)
treecd89dca4e2c56a2fcaec3ede32a470724c19d757 /lib/libcrypto/x509v3
parentf70b308120e8b77994d9e1e4feb6efa0716045a4 (diff)
Add a const qualifier to the STACK_OF(X509_EXTENSION) * arguments of
X509V3_get_d2i() and X509V3_extensions_print(), and one to the 'title' argument of the latter function. tested in a bulk build by sthen ok jsing
Diffstat (limited to 'lib/libcrypto/x509v3')
-rw-r--r--lib/libcrypto/x509v3/v3_lib.c4
-rw-r--r--lib/libcrypto/x509v3/v3_prn.c6
-rw-r--r--lib/libcrypto/x509v3/x509v3.h8
3 files changed, 10 insertions, 8 deletions
diff --git a/lib/libcrypto/x509v3/v3_lib.c b/lib/libcrypto/x509v3/v3_lib.c
index f0cc93bda6b..94f3e4b753b 100644
--- a/lib/libcrypto/x509v3/v3_lib.c
+++ b/lib/libcrypto/x509v3/v3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_lib.c,v 1.17 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: v3_lib.c,v 1.18 2018/05/19 10:41:53 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -227,7 +227,7 @@ X509V3_EXT_d2i(X509_EXTENSION *ext)
*/
void *
-X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx)
+X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx)
{
int lastpos, i;
X509_EXTENSION *ex, *found_ex = NULL;
diff --git a/lib/libcrypto/x509v3/v3_prn.c b/lib/libcrypto/x509v3/v3_prn.c
index f65c7aaa8ad..f294c36b3ed 100644
--- a/lib/libcrypto/x509v3/v3_prn.c
+++ b/lib/libcrypto/x509v3/v3_prn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_prn.c,v 1.19 2016/12/30 15:54:49 jsing Exp $ */
+/* $OpenBSD: v3_prn.c,v 1.20 2018/05/19 10:41:53 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -152,8 +152,8 @@ err:
}
int
-X509V3_extensions_print(BIO *bp, char *title, STACK_OF(X509_EXTENSION) *exts,
- unsigned long flag, int indent)
+X509V3_extensions_print(BIO *bp, const char *title,
+ const STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent)
{
int i, j;
diff --git a/lib/libcrypto/x509v3/x509v3.h b/lib/libcrypto/x509v3/x509v3.h
index 34b3dd9e899..a41250bf5cb 100644
--- a/lib/libcrypto/x509v3/x509v3.h
+++ b/lib/libcrypto/x509v3/x509v3.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509v3.h,v 1.28 2018/05/19 10:37:02 tb Exp $ */
+/* $OpenBSD: x509v3.h,v 1.29 2018/05/19 10:41:53 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
@@ -761,7 +761,8 @@ const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid);
int X509V3_add_standard_extensions(void);
STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line);
void *X509V3_EXT_d2i(X509_EXTENSION *ext);
-void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx);
+void *X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit,
+ int *idx);
X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);
@@ -776,7 +777,8 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent,
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent);
int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
-int X509V3_extensions_print(BIO *out, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent);
+int X509V3_extensions_print(BIO *out, const char *title,
+ const STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent);
int X509_check_ca(X509 *x);
int X509_check_purpose(X509 *x, int id, int ca);