summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_strex.c
diff options
context:
space:
mode:
authortb <>2018-04-25 11:48:21 +0000
committertb <>2018-04-25 11:48:21 +0000
commitb32b7334e82988558a84760f424f8dd93d902393 (patch)
tree2706fdfa25b0fa2dc71fc06b437d687057013dcc /src/lib/libcrypto/asn1/a_strex.c
parent2225014e9e21b521735cd7db7cea4d899863d67b (diff)
downloadopenbsd-b32b7334e82988558a84760f424f8dd93d902393.tar.gz
openbsd-b32b7334e82988558a84760f424f8dd93d902393.tar.bz2
openbsd-b32b7334e82988558a84760f424f8dd93d902393.zip
Add const to functions in asn1/asn1.h as they did in OpenSSL.
BIO_f_asn1() will be taken care of later. Tested in a bulk by sthen ok bcook jca jsing
Diffstat (limited to 'src/lib/libcrypto/asn1/a_strex.c')
-rw-r--r--src/lib/libcrypto/asn1/a_strex.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c
index f60a70d94d..c0f0d7634d 100644
--- a/src/lib/libcrypto/asn1/a_strex.c
+++ b/src/lib/libcrypto/asn1/a_strex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_strex.c,v 1.25 2015/02/07 13:19:15 doug Exp $ */ 1/* $OpenBSD: a_strex.c,v 1.26 2018/04/25 11:48:21 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -289,7 +289,7 @@ do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen)
289 */ 289 */
290 290
291static int 291static int
292do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str) 292do_dump(unsigned long lflags, char_io *io_ch, void *arg, const ASN1_STRING *str)
293{ 293{
294 /* Placing the ASN1_STRING in a temp ASN1_TYPE allows 294 /* Placing the ASN1_STRING in a temp ASN1_TYPE allows
295 * the DER encoding to readily obtained 295 * the DER encoding to readily obtained
@@ -346,7 +346,8 @@ static const signed char tag2nbyte[] = {
346 */ 346 */
347 347
348static int 348static int
349do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, ASN1_STRING *str) 349do_print_ex(char_io *io_ch, void *arg, unsigned long lflags,
350 const ASN1_STRING *str)
350{ 351{
351 int outlen, len; 352 int outlen, len;
352 int type; 353 int type;
@@ -605,13 +606,13 @@ X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
605} 606}
606 607
607int 608int
608ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags) 609ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags)
609{ 610{
610 return do_print_ex(send_bio_chars, out, flags, str); 611 return do_print_ex(send_bio_chars, out, flags, str);
611} 612}
612 613
613int 614int
614ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags) 615ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags)
615{ 616{
616 return do_print_ex(send_fp_chars, fp, flags, str); 617 return do_print_ex(send_fp_chars, fp, flags, str);
617} 618}