summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2018-05-01 13:29:10 +0000
committertb <>2018-05-01 13:29:10 +0000
commit82267b005082127062ce8593ce4963d09c361e2e (patch)
tree7876885f1d21e5b53f5a28cdd2d502808082a4fc /src/lib
parent8b1e85eca7f06a392dbd8ae9b560599523c8de07 (diff)
downloadopenbsd-82267b005082127062ce8593ce4963d09c361e2e.tar.gz
openbsd-82267b005082127062ce8593ce4963d09c361e2e.tar.bz2
openbsd-82267b005082127062ce8593ce4963d09c361e2e.zip
const for BIO_{new,set}() and most of the BIO_{f,s}_*() family of
functions. ok beck, jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/asn1.h4
-rw-r--r--src/lib/libcrypto/asn1/bio_asn1.c6
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c6
-rw-r--r--src/lib/libcrypto/bio/bf_nbio.c6
-rw-r--r--src/lib/libcrypto/bio/bf_null.c6
-rw-r--r--src/lib/libcrypto/bio/bio.h28
-rw-r--r--src/lib/libcrypto/bio/bio_lib.c6
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c6
-rw-r--r--src/lib/libcrypto/bio/bss_bio.c6
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c6
-rw-r--r--src/lib/libcrypto/bio/bss_fd.c6
-rw-r--r--src/lib/libcrypto/bio/bss_log.c6
-rw-r--r--src/lib/libcrypto/bio/bss_null.c6
-rw-r--r--src/lib/libcrypto/bio/bss_sock.c6
14 files changed, 52 insertions, 52 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index 80923ad6e4..b1bf40dc63 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.47 2018/04/25 12:07:40 tb Exp $ */ 1/* $OpenBSD: asn1.h,v 1.48 2018/05/01 13:29:09 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 *
@@ -1187,7 +1187,7 @@ void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
1187unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p); 1187unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
1188void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); 1188void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
1189 1189
1190BIO_METHOD *BIO_f_asn1(void); 1190const BIO_METHOD *BIO_f_asn1(void);
1191 1191
1192BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); 1192BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
1193 1193
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c
index 02ad310639..93bcb33888 100644
--- a/src/lib/libcrypto/asn1/bio_asn1.c
+++ b/src/lib/libcrypto/asn1/bio_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_asn1.c,v 1.12 2015/12/23 01:46:33 mmcc Exp $ */ 1/* $OpenBSD: bio_asn1.c,v 1.13 2018/05/01 13:29:09 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. 3 * project.
4 */ 4 */
@@ -125,7 +125,7 @@ static int asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx,
125 asn1_ps_func *setup, asn1_bio_state_t ex_state, 125 asn1_ps_func *setup, asn1_bio_state_t ex_state,
126 asn1_bio_state_t other_state); 126 asn1_bio_state_t other_state);
127 127
128static BIO_METHOD methods_asn1 = { 128static const BIO_METHOD methods_asn1 = {
129 .type = BIO_TYPE_ASN1, 129 .type = BIO_TYPE_ASN1,
130 .name = "asn1", 130 .name = "asn1",
131 .bwrite = asn1_bio_write, 131 .bwrite = asn1_bio_write,
@@ -138,7 +138,7 @@ static BIO_METHOD methods_asn1 = {
138 .callback_ctrl = asn1_bio_callback_ctrl 138 .callback_ctrl = asn1_bio_callback_ctrl
139}; 139};
140 140
141BIO_METHOD * 141const BIO_METHOD *
142BIO_f_asn1(void) 142BIO_f_asn1(void)
143{ 143{
144 return (&methods_asn1); 144 return (&methods_asn1);
diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c
index 30765b03ca..5b9ee35da8 100644
--- a/src/lib/libcrypto/bio/bf_buff.c
+++ b/src/lib/libcrypto/bio/bf_buff.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_buff.c,v 1.24 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bf_buff.c,v 1.25 2018/05/01 13:29:09 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 *
@@ -73,7 +73,7 @@ static int buffer_free(BIO *data);
73static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); 73static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
74#define DEFAULT_BUFFER_SIZE 4096 74#define DEFAULT_BUFFER_SIZE 4096
75 75
76static BIO_METHOD methods_buffer = { 76static const BIO_METHOD methods_buffer = {
77 .type = BIO_TYPE_BUFFER, 77 .type = BIO_TYPE_BUFFER,
78 .name = "buffer", 78 .name = "buffer",
79 .bwrite = buffer_write, 79 .bwrite = buffer_write,
@@ -86,7 +86,7 @@ static BIO_METHOD methods_buffer = {
86 .callback_ctrl = buffer_callback_ctrl 86 .callback_ctrl = buffer_callback_ctrl
87}; 87};
88 88
89BIO_METHOD * 89const BIO_METHOD *
90BIO_f_buffer(void) 90BIO_f_buffer(void)
91{ 91{
92 return (&methods_buffer); 92 return (&methods_buffer);
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c
index 24e2e7e8b9..05fa9161fb 100644
--- a/src/lib/libcrypto/bio/bf_nbio.c
+++ b/src/lib/libcrypto/bio/bf_nbio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_nbio.c,v 1.19 2015/02/07 13:19:15 doug Exp $ */ 1/* $OpenBSD: bf_nbio.c,v 1.20 2018/05/01 13:29:09 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 *
@@ -80,7 +80,7 @@ typedef struct nbio_test_st {
80 int lwn; 80 int lwn;
81} NBIO_TEST; 81} NBIO_TEST;
82 82
83static BIO_METHOD methods_nbiof = { 83static const BIO_METHOD methods_nbiof = {
84 .type = BIO_TYPE_NBIO_TEST, 84 .type = BIO_TYPE_NBIO_TEST,
85 .name = "non-blocking IO test filter", 85 .name = "non-blocking IO test filter",
86 .bwrite = nbiof_write, 86 .bwrite = nbiof_write,
@@ -93,7 +93,7 @@ static BIO_METHOD methods_nbiof = {
93 .callback_ctrl = nbiof_callback_ctrl 93 .callback_ctrl = nbiof_callback_ctrl
94}; 94};
95 95
96BIO_METHOD * 96const BIO_METHOD *
97BIO_f_nbio_test(void) 97BIO_f_nbio_test(void)
98{ 98{
99 return (&methods_nbiof); 99 return (&methods_nbiof);
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c
index 09d54b6b21..25abb8a574 100644
--- a/src/lib/libcrypto/bio/bf_null.c
+++ b/src/lib/libcrypto/bio/bf_null.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_null.c,v 1.11 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bf_null.c,v 1.12 2018/05/01 13:29:09 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 *
@@ -73,7 +73,7 @@ static int nullf_new(BIO *h);
73static int nullf_free(BIO *data); 73static int nullf_free(BIO *data);
74static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); 74static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
75 75
76static BIO_METHOD methods_nullf = { 76static const BIO_METHOD methods_nullf = {
77 .type = BIO_TYPE_NULL_FILTER, 77 .type = BIO_TYPE_NULL_FILTER,
78 .name = "NULL filter", 78 .name = "NULL filter",
79 .bwrite = nullf_write, 79 .bwrite = nullf_write,
@@ -86,7 +86,7 @@ static BIO_METHOD methods_nullf = {
86 .callback_ctrl = nullf_callback_ctrl 86 .callback_ctrl = nullf_callback_ctrl
87}; 87};
88 88
89BIO_METHOD * 89const BIO_METHOD *
90BIO_f_null(void) 90BIO_f_null(void)
91{ 91{
92 return (&methods_nullf); 92 return (&methods_nullf);
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index d0e2f3550c..8a473ca20a 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.40 2018/03/17 15:05:55 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.41 2018/05/01 13:29:09 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 *
@@ -286,7 +286,7 @@ typedef struct bio_method_st {
286} BIO_METHOD; 286} BIO_METHOD;
287 287
288struct bio_st { 288struct bio_st {
289 BIO_METHOD *method; 289 const BIO_METHOD *method;
290 /* bio, mode, argp, argi, argl, ret */ 290 /* bio, mode, argp, argi, argl, ret */
291 long (*callback)(struct bio_st *, int, const char *, int, long, long); 291 long (*callback)(struct bio_st *, int, const char *, int, long, long);
292 char *cb_arg; /* first argument for the callback */ 292 char *cb_arg; /* first argument for the callback */
@@ -601,8 +601,8 @@ 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
604BIO * BIO_new(BIO_METHOD *type); 604BIO *BIO_new(const BIO_METHOD *type);
605int BIO_set(BIO *a, BIO_METHOD *type); 605int BIO_set(BIO *a, const BIO_METHOD *type);
606int BIO_free(BIO *a); 606int BIO_free(BIO *a);
607int BIO_up_ref(BIO *bio); 607int BIO_up_ref(BIO *bio);
608void *BIO_get_data(BIO *a); 608void *BIO_get_data(BIO *a);
@@ -643,16 +643,16 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
643 643
644BIO_METHOD *BIO_s_mem(void); 644BIO_METHOD *BIO_s_mem(void);
645BIO *BIO_new_mem_buf(void *buf, int len); 645BIO *BIO_new_mem_buf(void *buf, int len);
646BIO_METHOD *BIO_s_socket(void); 646const BIO_METHOD *BIO_s_socket(void);
647BIO_METHOD *BIO_s_connect(void); 647const BIO_METHOD *BIO_s_connect(void);
648BIO_METHOD *BIO_s_accept(void); 648const BIO_METHOD *BIO_s_accept(void);
649BIO_METHOD *BIO_s_fd(void); 649const BIO_METHOD *BIO_s_fd(void);
650BIO_METHOD *BIO_s_log(void); 650const BIO_METHOD *BIO_s_log(void);
651BIO_METHOD *BIO_s_bio(void); 651const BIO_METHOD *BIO_s_bio(void);
652BIO_METHOD *BIO_s_null(void); 652const BIO_METHOD *BIO_s_null(void);
653BIO_METHOD *BIO_f_null(void); 653const BIO_METHOD *BIO_f_null(void);
654BIO_METHOD *BIO_f_buffer(void); 654const BIO_METHOD *BIO_f_buffer(void);
655BIO_METHOD *BIO_f_nbio_test(void); 655const BIO_METHOD *BIO_f_nbio_test(void);
656#ifndef OPENSSL_NO_DGRAM 656#ifndef OPENSSL_NO_DGRAM
657BIO_METHOD *BIO_s_datagram(void); 657BIO_METHOD *BIO_s_datagram(void);
658#endif 658#endif
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c
index ddab542881..de039a7f5d 100644
--- a/src/lib/libcrypto/bio/bio_lib.c
+++ b/src/lib/libcrypto/bio/bio_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_lib.c,v 1.27 2018/02/22 16:38:43 jsing Exp $ */ 1/* $OpenBSD: bio_lib.c,v 1.28 2018/05/01 13:29:09 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 *
@@ -79,7 +79,7 @@ BIO_get_new_index(void)
79} 79}
80 80
81BIO * 81BIO *
82BIO_new(BIO_METHOD *method) 82BIO_new(const BIO_METHOD *method)
83{ 83{
84 BIO *ret = NULL; 84 BIO *ret = NULL;
85 85
@@ -96,7 +96,7 @@ BIO_new(BIO_METHOD *method)
96} 96}
97 97
98int 98int
99BIO_set(BIO *bio, BIO_METHOD *method) 99BIO_set(BIO *bio, const BIO_METHOD *method)
100{ 100{
101 bio->method = method; 101 bio->method = method;
102 bio->callback = NULL; 102 bio->callback = NULL;
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c
index 20508a7d5e..b270199da1 100644
--- a/src/lib/libcrypto/bio/bss_acpt.c
+++ b/src/lib/libcrypto/bio/bss_acpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_acpt.c,v 1.27 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bss_acpt.c,v 1.28 2018/05/01 13:29:09 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 *
@@ -100,7 +100,7 @@ static void BIO_ACCEPT_free(BIO_ACCEPT *a);
100#define ACPT_S_GET_ACCEPT_SOCKET 2 100#define ACPT_S_GET_ACCEPT_SOCKET 2
101#define ACPT_S_OK 3 101#define ACPT_S_OK 3
102 102
103static BIO_METHOD methods_acceptp = { 103static const BIO_METHOD methods_acceptp = {
104 .type = BIO_TYPE_ACCEPT, 104 .type = BIO_TYPE_ACCEPT,
105 .name = "socket accept", 105 .name = "socket accept",
106 .bwrite = acpt_write, 106 .bwrite = acpt_write,
@@ -111,7 +111,7 @@ static BIO_METHOD methods_acceptp = {
111 .destroy = acpt_free 111 .destroy = acpt_free
112}; 112};
113 113
114BIO_METHOD * 114const BIO_METHOD *
115BIO_s_accept(void) 115BIO_s_accept(void)
116{ 116{
117 return (&methods_acceptp); 117 return (&methods_acceptp);
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c
index 20eb9a9829..74f86a51ee 100644
--- a/src/lib/libcrypto/bio/bss_bio.c
+++ b/src/lib/libcrypto/bio/bss_bio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_bio.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bss_bio.c,v 1.24 2018/05/01 13:29:09 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -94,7 +94,7 @@ static int bio_puts(BIO *bio, const char *str);
94static int bio_make_pair(BIO *bio1, BIO *bio2); 94static int bio_make_pair(BIO *bio1, BIO *bio2);
95static void bio_destroy_pair(BIO *bio); 95static void bio_destroy_pair(BIO *bio);
96 96
97static BIO_METHOD methods_biop = { 97static const BIO_METHOD methods_biop = {
98 .type = BIO_TYPE_BIO, 98 .type = BIO_TYPE_BIO,
99 .name = "BIO pair", 99 .name = "BIO pair",
100 .bwrite = bio_write, 100 .bwrite = bio_write,
@@ -105,7 +105,7 @@ static BIO_METHOD methods_biop = {
105 .destroy = bio_free 105 .destroy = bio_free
106}; 106};
107 107
108BIO_METHOD * 108const BIO_METHOD *
109BIO_s_bio(void) 109BIO_s_bio(void)
110{ 110{
111 return &methods_biop; 111 return &methods_biop;
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index 555273882c..575d163371 100644
--- a/src/lib/libcrypto/bio/bss_conn.c
+++ b/src/lib/libcrypto/bio/bss_conn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_conn.c,v 1.33 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: bss_conn.c,v 1.34 2018/05/01 13:29:09 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 *
@@ -106,7 +106,7 @@ static void conn_close_socket(BIO *data);
106BIO_CONNECT *BIO_CONNECT_new(void); 106BIO_CONNECT *BIO_CONNECT_new(void);
107void BIO_CONNECT_free(BIO_CONNECT *a); 107void BIO_CONNECT_free(BIO_CONNECT *a);
108 108
109static BIO_METHOD methods_connectp = { 109static const BIO_METHOD methods_connectp = {
110 .type = BIO_TYPE_CONNECT, 110 .type = BIO_TYPE_CONNECT,
111 .name = "socket connect", 111 .name = "socket connect",
112 .bwrite = conn_write, 112 .bwrite = conn_write,
@@ -319,7 +319,7 @@ BIO_CONNECT_free(BIO_CONNECT *a)
319 free(a); 319 free(a);
320} 320}
321 321
322BIO_METHOD * 322const BIO_METHOD *
323BIO_s_connect(void) 323BIO_s_connect(void)
324{ 324{
325 return (&methods_connectp); 325 return (&methods_connectp);
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c
index b21dbd92ed..bbe08efc4e 100644
--- a/src/lib/libcrypto/bio/bss_fd.c
+++ b/src/lib/libcrypto/bio/bss_fd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_fd.c,v 1.18 2015/02/12 03:54:07 jsing Exp $ */ 1/* $OpenBSD: bss_fd.c,v 1.19 2018/05/01 13:29:09 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 *
@@ -74,7 +74,7 @@ static int fd_new(BIO *h);
74static int fd_free(BIO *data); 74static int fd_free(BIO *data);
75int BIO_fd_should_retry(int s); 75int BIO_fd_should_retry(int s);
76 76
77static BIO_METHOD methods_fdp = { 77static const BIO_METHOD methods_fdp = {
78 .type = BIO_TYPE_FD, 78 .type = BIO_TYPE_FD,
79 .name = "file descriptor", 79 .name = "file descriptor",
80 .bwrite = fd_write, 80 .bwrite = fd_write,
@@ -86,7 +86,7 @@ static BIO_METHOD methods_fdp = {
86 .destroy = fd_free 86 .destroy = fd_free
87}; 87};
88 88
89BIO_METHOD * 89const BIO_METHOD *
90BIO_s_fd(void) 90BIO_s_fd(void)
91{ 91{
92 return (&methods_fdp); 92 return (&methods_fdp);
diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c
index fcaa985aa0..7ef1312d79 100644
--- a/src/lib/libcrypto/bio/bss_log.c
+++ b/src/lib/libcrypto/bio/bss_log.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_log.c,v 1.21 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bss_log.c,v 1.22 2018/05/01 13:29:10 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -81,7 +81,7 @@ static void xopenlog(BIO* bp, char* name, int level);
81static void xsyslog(BIO* bp, int priority, const char* string); 81static void xsyslog(BIO* bp, int priority, const char* string);
82static void xcloselog(BIO* bp); 82static void xcloselog(BIO* bp);
83 83
84static BIO_METHOD methods_slg = { 84static const BIO_METHOD methods_slg = {
85 .type = BIO_TYPE_MEM, 85 .type = BIO_TYPE_MEM,
86 .name = "syslog", 86 .name = "syslog",
87 .bwrite = slg_write, 87 .bwrite = slg_write,
@@ -91,7 +91,7 @@ static BIO_METHOD methods_slg = {
91 .destroy = slg_free 91 .destroy = slg_free
92}; 92};
93 93
94BIO_METHOD * 94const BIO_METHOD *
95BIO_s_log(void) 95BIO_s_log(void)
96{ 96{
97 return (&methods_slg); 97 return (&methods_slg);
diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c
index 42ee626b13..c6de844da5 100644
--- a/src/lib/libcrypto/bio/bss_null.c
+++ b/src/lib/libcrypto/bio/bss_null.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_null.c,v 1.10 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bss_null.c,v 1.11 2018/05/01 13:29:10 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 *
@@ -70,7 +70,7 @@ static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2);
70static int null_new(BIO *h); 70static int null_new(BIO *h);
71static int null_free(BIO *data); 71static int null_free(BIO *data);
72 72
73static BIO_METHOD null_method = { 73static const BIO_METHOD null_method = {
74 .type = BIO_TYPE_NULL, 74 .type = BIO_TYPE_NULL,
75 .name = "NULL", 75 .name = "NULL",
76 .bwrite = null_write, 76 .bwrite = null_write,
@@ -82,7 +82,7 @@ static BIO_METHOD null_method = {
82 .destroy = null_free 82 .destroy = null_free
83}; 83};
84 84
85BIO_METHOD * 85const BIO_METHOD *
86BIO_s_null(void) 86BIO_s_null(void)
87{ 87{
88 return (&null_method); 88 return (&null_method);
diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c
index dd470eb65e..9c650a8041 100644
--- a/src/lib/libcrypto/bio/bss_sock.c
+++ b/src/lib/libcrypto/bio/bss_sock.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_sock.c,v 1.23 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bss_sock.c,v 1.24 2018/05/01 13:29:10 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 *
@@ -73,7 +73,7 @@ static int sock_new(BIO *h);
73static int sock_free(BIO *data); 73static int sock_free(BIO *data);
74int BIO_sock_should_retry(int s); 74int BIO_sock_should_retry(int s);
75 75
76static BIO_METHOD methods_sockp = { 76static const BIO_METHOD methods_sockp = {
77 .type = BIO_TYPE_SOCKET, 77 .type = BIO_TYPE_SOCKET,
78 .name = "socket", 78 .name = "socket",
79 .bwrite = sock_write, 79 .bwrite = sock_write,
@@ -84,7 +84,7 @@ static BIO_METHOD methods_sockp = {
84 .destroy = sock_free 84 .destroy = sock_free
85}; 85};
86 86
87BIO_METHOD * 87const BIO_METHOD *
88BIO_s_socket(void) 88BIO_s_socket(void)
89{ 89{
90 return (&methods_sockp); 90 return (&methods_sockp);