summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2018-05-30 00:23:04 +0000
committertb <>2018-05-30 00:23:04 +0000
commit404620984af378ba4d050f61e4216c4e72f62f8b (patch)
tree814ed62063ff21a384142de872598d0baf677d1e /src
parente0129afbf70b6a10e2a50fb9fd4e1f76ed4c3c82 (diff)
downloadopenbsd-404620984af378ba4d050f61e4216c4e72f62f8b.tar.gz
openbsd-404620984af378ba4d050f61e4216c4e72f62f8b.tar.bz2
openbsd-404620984af378ba4d050f61e4216c4e72f62f8b.zip
Add a const qualifier to the return value of BIO_s_file().
tested in a bulk build by sthen ok bcook, jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bio/bio.h4
-rw-r--r--src/lib/libcrypto/bio/bss_file.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 105d3ff3af..2847d3729e 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio.h,v 1.43 2018/05/12 18:51:59 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.44 2018/05/30 00:23:04 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -597,7 +597,7 @@ BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
597asn1_ps_func **psuffix_free); 597asn1_ps_func **psuffix_free);
598 598
599int BIO_get_new_index(void); 599int BIO_get_new_index(void);
600BIO_METHOD *BIO_s_file(void ); 600const BIO_METHOD *BIO_s_file(void);
601BIO *BIO_new_file(const char *filename, const char *mode); 601BIO *BIO_new_file(const char *filename, const char *mode);
602BIO *BIO_new_fp(FILE *stream, int close_flag); 602BIO *BIO_new_fp(FILE *stream, int close_flag);
603# define BIO_s_file_internal BIO_s_file 603# define BIO_s_file_internal BIO_s_file
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c
index 01f4a3ff3b..fe937388b2 100644
--- a/src/lib/libcrypto/bio/bss_file.c
+++ b/src/lib/libcrypto/bio/bss_file.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_file.c,v 1.32 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bss_file.c,v 1.33 2018/05/30 00:23:04 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -98,7 +98,7 @@ static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2);
98static int file_new(BIO *h); 98static int file_new(BIO *h);
99static int file_free(BIO *data); 99static int file_free(BIO *data);
100 100
101static BIO_METHOD methods_filep = { 101static const BIO_METHOD methods_filep = {
102 .type = BIO_TYPE_FILE, 102 .type = BIO_TYPE_FILE,
103 .name = "FILE pointer", 103 .name = "FILE pointer",
104 .bwrite = file_write, 104 .bwrite = file_write,
@@ -148,7 +148,7 @@ BIO_new_fp(FILE *stream, int close_flag)
148 return (ret); 148 return (ret);
149} 149}
150 150
151BIO_METHOD * 151const BIO_METHOD *
152BIO_s_file(void) 152BIO_s_file(void)
153{ 153{
154 return (&methods_filep); 154 return (&methods_filep);