diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:23:25 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:23:25 +0000 |
commit | 2f7f9ff4ecef633fac471a0fe04e4d06db05af28 (patch) | |
tree | 3bd6bba16eeecefc9764c91c102e52fe49241c62 /lib | |
parent | b8329ea4b77326872bedc77aebb7f74e7b97bacf (diff) |
Add a const qualifier to the 'X509_NAME *' argument of
X509_NAME_print{,_ex{,_fp}}(3).
tested in a bulk build by sthen
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/asn1/a_strex.c | 10 | ||||
-rw-r--r-- | lib/libcrypto/asn1/t_x509.c | 4 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509.h | 10 |
3 files changed, 14 insertions, 10 deletions
diff --git a/lib/libcrypto/asn1/a_strex.c b/lib/libcrypto/asn1/a_strex.c index c0f0d7634d6..a8b5595db96 100644 --- a/lib/libcrypto/asn1/a_strex.c +++ b/lib/libcrypto/asn1/a_strex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_strex.c,v 1.26 2018/04/25 11:48:21 tb Exp $ */ +/* $OpenBSD: a_strex.c,v 1.27 2018/05/18 18:23:24 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -440,7 +440,7 @@ do_indent(char_io *io_ch, void *arg, int indent) #define FN_WIDTH_SN 10 static int -do_name_ex(char_io *io_ch, void *arg, X509_NAME *n, int indent, +do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n, int indent, unsigned long flags) { int i, prev = -1, orflags, cnt; @@ -582,7 +582,8 @@ do_name_ex(char_io *io_ch, void *arg, X509_NAME *n, int indent, /* Wrappers round the main functions */ int -X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags) +X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, + unsigned long flags) { if (flags == XN_FLAG_COMPAT) return X509_NAME_print(out, nm, indent); @@ -590,7 +591,8 @@ X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags) } int -X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags) +X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, + unsigned long flags) { if (flags == XN_FLAG_COMPAT) { BIO *btmp; diff --git a/lib/libcrypto/asn1/t_x509.c b/lib/libcrypto/asn1/t_x509.c index 59b308e763b..e287a6cf6a4 100644 --- a/lib/libcrypto/asn1/t_x509.c +++ b/lib/libcrypto/asn1/t_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_x509.c,v 1.30 2018/05/01 19:01:27 tb Exp $ */ +/* $OpenBSD: t_x509.c,v 1.31 2018/05/18 18:23:24 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -490,7 +490,7 @@ err: } int -X509_NAME_print(BIO *bp, X509_NAME *name, int obase) +X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) { char *s, *c, *b; int ret = 0, l, i; diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index bbbb174eb13..d4efaf3eca0 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.59 2018/05/18 18:19:31 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.60 2018/05/18 18:23:24 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1076,11 +1076,13 @@ int X509_print_ex_fp(FILE *bp,X509 *x, unsigned long nmflag, unsigned long cfla int X509_print_fp(FILE *bp,X509 *x); int X509_CRL_print_fp(FILE *bp,X509_CRL *x); int X509_REQ_print_fp(FILE *bp,X509_REQ *req); -int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); +int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, + unsigned long flags); #ifndef OPENSSL_NO_BIO -int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); -int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); +int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase); +int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, + unsigned long flags); int X509_print_ex(BIO *bp,X509 *x, unsigned long nmflag, unsigned long cflag); int X509_print(BIO *bp,X509 *x); int X509_ocspid_print(BIO *bp,X509 *x); |