summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio')
-rw-r--r--src/lib/libcrypto/bio/bf_buff.c20
-rw-r--r--src/lib/libcrypto/bio/bf_lbuf.c20
-rw-r--r--src/lib/libcrypto/bio/bf_nbio.c20
-rw-r--r--src/lib/libcrypto/bio/bf_null.c20
-rw-r--r--src/lib/libcrypto/bio/bss_acpt.c18
-rw-r--r--src/lib/libcrypto/bio/bss_bio.c18
-rw-r--r--src/lib/libcrypto/bio/bss_conn.c19
-rw-r--r--src/lib/libcrypto/bio/bss_dgram.c36
-rw-r--r--src/lib/libcrypto/bio/bss_fd.c18
-rw-r--r--src/lib/libcrypto/bio/bss_file.c19
-rw-r--r--src/lib/libcrypto/bio/bss_log.c16
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c19
-rw-r--r--src/lib/libcrypto/bio/bss_null.c19
-rw-r--r--src/lib/libcrypto/bio/bss_sock.c18
14 files changed, 132 insertions, 148 deletions
diff --git a/src/lib/libcrypto/bio/bf_buff.c b/src/lib/libcrypto/bio/bf_buff.c
index 99be1a629e..e96da40a58 100644
--- a/src/lib/libcrypto/bio/bf_buff.c
+++ b/src/lib/libcrypto/bio/bf_buff.c
@@ -72,16 +72,16 @@ static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
72#define DEFAULT_BUFFER_SIZE 4096 72#define DEFAULT_BUFFER_SIZE 4096
73 73
74static BIO_METHOD methods_buffer = { 74static BIO_METHOD methods_buffer = {
75 BIO_TYPE_BUFFER, 75 .type = BIO_TYPE_BUFFER,
76 "buffer", 76 .name = "buffer",
77 buffer_write, 77 .bwrite = buffer_write,
78 buffer_read, 78 .bread = buffer_read,
79 buffer_puts, 79 .bputs = buffer_puts,
80 buffer_gets, 80 .bgets = buffer_gets,
81 buffer_ctrl, 81 .ctrl = buffer_ctrl,
82 buffer_new, 82 .create = buffer_new,
83 buffer_free, 83 .destroy = buffer_free,
84 buffer_callback_ctrl, 84 .callback_ctrl = buffer_callback_ctrl
85}; 85};
86 86
87BIO_METHOD * 87BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bf_lbuf.c b/src/lib/libcrypto/bio/bf_lbuf.c
index f0bd0d709e..54c370d038 100644
--- a/src/lib/libcrypto/bio/bf_lbuf.c
+++ b/src/lib/libcrypto/bio/bf_lbuf.c
@@ -77,16 +77,16 @@ static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
77/* #define DEBUG */ 77/* #define DEBUG */
78 78
79static BIO_METHOD methods_linebuffer = { 79static BIO_METHOD methods_linebuffer = {
80 BIO_TYPE_LINEBUFFER, 80 .type = BIO_TYPE_LINEBUFFER,
81 "linebuffer", 81 .name = "linebuffer",
82 linebuffer_write, 82 .bwrite = linebuffer_write,
83 linebuffer_read, 83 .bread = linebuffer_read,
84 linebuffer_puts, 84 .bputs = linebuffer_puts,
85 linebuffer_gets, 85 .bgets = linebuffer_gets,
86 linebuffer_ctrl, 86 .ctrl = linebuffer_ctrl,
87 linebuffer_new, 87 .create = linebuffer_new,
88 linebuffer_free, 88 .destroy = linebuffer_free,
89 linebuffer_callback_ctrl, 89 .callback_ctrl = linebuffer_callback_ctrl
90}; 90};
91 91
92BIO_METHOD * 92BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c
index 048e6892cc..5a0f6b276a 100644
--- a/src/lib/libcrypto/bio/bf_nbio.c
+++ b/src/lib/libcrypto/bio/bf_nbio.c
@@ -81,16 +81,16 @@ typedef struct nbio_test_st {
81} NBIO_TEST; 81} NBIO_TEST;
82 82
83static BIO_METHOD methods_nbiof = { 83static BIO_METHOD methods_nbiof = {
84 BIO_TYPE_NBIO_TEST, 84 .type = BIO_TYPE_NBIO_TEST,
85 "non-blocking IO test filter", 85 .name = "non-blocking IO test filter",
86 nbiof_write, 86 .bwrite = nbiof_write,
87 nbiof_read, 87 .bread = nbiof_read,
88 nbiof_puts, 88 .bputs = nbiof_puts,
89 nbiof_gets, 89 .bgets = nbiof_gets,
90 nbiof_ctrl, 90 .ctrl = nbiof_ctrl,
91 nbiof_new, 91 .create = nbiof_new,
92 nbiof_free, 92 .destroy = nbiof_free,
93 nbiof_callback_ctrl, 93 .callback_ctrl = nbiof_callback_ctrl
94}; 94};
95 95
96BIO_METHOD * 96BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c
index 3bba2afe98..7554ed9cf5 100644
--- a/src/lib/libcrypto/bio/bf_null.c
+++ b/src/lib/libcrypto/bio/bf_null.c
@@ -74,16 +74,16 @@ static 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 BIO_METHOD methods_nullf = {
77 BIO_TYPE_NULL_FILTER, 77 .type = BIO_TYPE_NULL_FILTER,
78 "NULL filter", 78 .name = "NULL filter",
79 nullf_write, 79 .bwrite = nullf_write,
80 nullf_read, 80 .bread = nullf_read,
81 nullf_puts, 81 .bputs = nullf_puts,
82 nullf_gets, 82 .bgets = nullf_gets,
83 nullf_ctrl, 83 .ctrl = nullf_ctrl,
84 nullf_new, 84 .create = nullf_new,
85 nullf_free, 85 .destroy = nullf_free,
86 nullf_callback_ctrl, 86 .callback_ctrl = nullf_callback_ctrl
87}; 87};
88 88
89BIO_METHOD * 89BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c
index 916af3cb20..943d3d9d96 100644
--- a/src/lib/libcrypto/bio/bss_acpt.c
+++ b/src/lib/libcrypto/bio/bss_acpt.c
@@ -98,16 +98,14 @@ static void BIO_ACCEPT_free(BIO_ACCEPT *a);
98#define ACPT_S_OK 3 98#define ACPT_S_OK 3
99 99
100static BIO_METHOD methods_acceptp = { 100static BIO_METHOD methods_acceptp = {
101 BIO_TYPE_ACCEPT, 101 .type = BIO_TYPE_ACCEPT,
102 "socket accept", 102 .name = "socket accept",
103 acpt_write, 103 .bwrite = acpt_write,
104 acpt_read, 104 .bread = acpt_read,
105 acpt_puts, 105 .bputs = acpt_puts,
106 NULL, /* connect_gets, */ 106 .ctrl = acpt_ctrl,
107 acpt_ctrl, 107 .create = acpt_new,
108 acpt_new, 108 .destroy = acpt_free
109 acpt_free,
110 NULL,
111}; 109};
112 110
113BIO_METHOD * 111BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c
index d31e59872e..1a17cdf275 100644
--- a/src/lib/libcrypto/bio/bss_bio.c
+++ b/src/lib/libcrypto/bio/bss_bio.c
@@ -94,16 +94,14 @@ static int bio_make_pair(BIO *bio1, BIO *bio2);
94static void bio_destroy_pair(BIO *bio); 94static void bio_destroy_pair(BIO *bio);
95 95
96static BIO_METHOD methods_biop = { 96static BIO_METHOD methods_biop = {
97 BIO_TYPE_BIO, 97 .type = BIO_TYPE_BIO,
98 "BIO pair", 98 .name = "BIO pair",
99 bio_write, 99 .bwrite = bio_write,
100 bio_read, 100 .bread = bio_read,
101 bio_puts, 101 .bputs = bio_puts,
102 NULL /* no bio_gets */, 102 .ctrl = bio_ctrl,
103 bio_ctrl, 103 .create = bio_new,
104 bio_new, 104 .destroy = bio_free
105 bio_free,
106 NULL /* no bio_callback_ctrl */
107}; 105};
108 106
109BIO_METHOD * 107BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c
index d7a8619b38..7ed8f1fe31 100644
--- a/src/lib/libcrypto/bio/bss_conn.c
+++ b/src/lib/libcrypto/bio/bss_conn.c
@@ -103,16 +103,15 @@ BIO_CONNECT *BIO_CONNECT_new(void);
103void BIO_CONNECT_free(BIO_CONNECT *a); 103void BIO_CONNECT_free(BIO_CONNECT *a);
104 104
105static BIO_METHOD methods_connectp = { 105static BIO_METHOD methods_connectp = {
106 BIO_TYPE_CONNECT, 106 .type = BIO_TYPE_CONNECT,
107 "socket connect", 107 .name = "socket connect",
108 conn_write, 108 .bwrite = conn_write,
109 conn_read, 109 .bread = conn_read,
110 conn_puts, 110 .bputs = conn_puts,
111 NULL, /* connect_gets, */ 111 .ctrl = conn_ctrl,
112 conn_ctrl, 112 .create = conn_new,
113 conn_new, 113 .destroy = conn_free,
114 conn_free, 114 .callback_ctrl = conn_callback_ctrl
115 conn_callback_ctrl,
116}; 115};
117 116
118static int 117static int
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c
index 8c08eff352..8f7439c51e 100644
--- a/src/lib/libcrypto/bio/bss_dgram.c
+++ b/src/lib/libcrypto/bio/bss_dgram.c
@@ -106,30 +106,26 @@ static int BIO_dgram_should_retry(int s);
106static void get_current_time(struct timeval *t); 106static void get_current_time(struct timeval *t);
107 107
108static BIO_METHOD methods_dgramp = { 108static BIO_METHOD methods_dgramp = {
109 BIO_TYPE_DGRAM, 109 .type = BIO_TYPE_DGRAM,
110 "datagram socket", 110 .name = "datagram socket",
111 dgram_write, 111 .bwrite = dgram_write,
112 dgram_read, 112 .bread = dgram_read,
113 dgram_puts, 113 .bputs = dgram_puts,
114 NULL, /* dgram_gets, */ 114 .ctrl = dgram_ctrl,
115 dgram_ctrl, 115 .create = dgram_new,
116 dgram_new, 116 .destroy = dgram_free
117 dgram_free,
118 NULL,
119}; 117};
120 118
121#ifndef OPENSSL_NO_SCTP 119#ifndef OPENSSL_NO_SCTP
122static BIO_METHOD methods_dgramp_sctp = { 120static BIO_METHOD methods_dgramp_sctp = {
123 BIO_TYPE_DGRAM_SCTP, 121 .type = BIO_TYPE_DGRAM_SCTP,
124 "datagram sctp socket", 122 .name = "datagram sctp socket",
125 dgram_sctp_write, 123 .bwrite = dgram_sctp_write,
126 dgram_sctp_read, 124 .bread = dgram_sctp_read,
127 dgram_sctp_puts, 125 .bputs = dgram_sctp_puts,
128 NULL, /* dgram_gets, */ 126 .ctrl = dgram_sctp_ctrl,
129 dgram_sctp_ctrl, 127 .create = dgram_sctp_new,
130 dgram_sctp_new, 128 .destroy = dgram_sctp_free
131 dgram_sctp_free,
132 NULL,
133}; 129};
134#endif 130#endif
135 131
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c
index 8ea80f1f65..04a88a155b 100644
--- a/src/lib/libcrypto/bio/bss_fd.c
+++ b/src/lib/libcrypto/bio/bss_fd.c
@@ -79,15 +79,15 @@ static int fd_free(BIO *data);
79int BIO_fd_should_retry(int s); 79int BIO_fd_should_retry(int s);
80 80
81static BIO_METHOD methods_fdp = { 81static BIO_METHOD methods_fdp = {
82 BIO_TYPE_FD, "file descriptor", 82 .type = BIO_TYPE_FD,
83 fd_write, 83 .name = "file descriptor",
84 fd_read, 84 .bwrite = fd_write,
85 fd_puts, 85 .bread = fd_read,
86 fd_gets, 86 .bputs = fd_puts,
87 fd_ctrl, 87 .bgets = fd_gets,
88 fd_new, 88 .ctrl = fd_ctrl,
89 fd_free, 89 .create = fd_new,
90 NULL, 90 .destroy = fd_free
91}; 91};
92 92
93BIO_METHOD * 93BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c
index 6d5444f666..6f81a45a47 100644
--- a/src/lib/libcrypto/bio/bss_file.c
+++ b/src/lib/libcrypto/bio/bss_file.c
@@ -100,16 +100,15 @@ static int file_new(BIO *h);
100static int file_free(BIO *data); 100static int file_free(BIO *data);
101 101
102static BIO_METHOD methods_filep = { 102static BIO_METHOD methods_filep = {
103 BIO_TYPE_FILE, 103 .type = BIO_TYPE_FILE,
104 "FILE pointer", 104 .name = "FILE pointer",
105 file_write, 105 .bwrite = file_write,
106 file_read, 106 .bread = file_read,
107 file_puts, 107 .bputs = file_puts,
108 file_gets, 108 .bgets = file_gets,
109 file_ctrl, 109 .ctrl = file_ctrl,
110 file_new, 110 .create = file_new,
111 file_free, 111 .destroy = file_free
112 NULL,
113}; 112};
114 113
115BIO * 114BIO *
diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c
index 6aa2d8b0a4..ac1cbc5087 100644
--- a/src/lib/libcrypto/bio/bss_log.c
+++ b/src/lib/libcrypto/bio/bss_log.c
@@ -86,15 +86,13 @@ static void xsyslog(BIO* bp, int priority, const char* string);
86static void xcloselog(BIO* bp); 86static void xcloselog(BIO* bp);
87 87
88static BIO_METHOD methods_slg = { 88static BIO_METHOD methods_slg = {
89 BIO_TYPE_MEM, "syslog", 89 .type = BIO_TYPE_MEM,
90 slg_write, 90 .name = "syslog",
91 NULL, 91 .bwrite = slg_write,
92 slg_puts, 92 .bputs = slg_puts,
93 NULL, 93 .ctrl = slg_ctrl,
94 slg_ctrl, 94 .create = slg_new,
95 slg_new, 95 .destroy = slg_free
96 slg_free,
97 NULL,
98}; 96};
99 97
100BIO_METHOD * 98BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index 1a477c12be..b147a8eccb 100644
--- a/src/lib/libcrypto/bio/bss_mem.c
+++ b/src/lib/libcrypto/bio/bss_mem.c
@@ -70,16 +70,15 @@ static int mem_new(BIO *h);
70static int mem_free(BIO *data); 70static int mem_free(BIO *data);
71 71
72static BIO_METHOD mem_method = { 72static BIO_METHOD mem_method = {
73 BIO_TYPE_MEM, 73 .type = BIO_TYPE_MEM,
74 "memory buffer", 74 .name = "memory buffer",
75 mem_write, 75 .bwrite = mem_write,
76 mem_read, 76 .bread = mem_read,
77 mem_puts, 77 .bputs = mem_puts,
78 mem_gets, 78 .bgets = mem_gets,
79 mem_ctrl, 79 .ctrl = mem_ctrl,
80 mem_new, 80 .create = mem_new,
81 mem_free, 81 .destroy = mem_free
82 NULL,
83}; 82};
84 83
85/* bio->num is used to hold the value to return on 'empty', if it is 84/* bio->num is used to hold the value to return on 'empty', if it is
diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c
index c7289725d9..a5796ea87a 100644
--- a/src/lib/libcrypto/bio/bss_null.c
+++ b/src/lib/libcrypto/bio/bss_null.c
@@ -70,16 +70,15 @@ static int null_new(BIO *h);
70static int null_free(BIO *data); 70static int null_free(BIO *data);
71 71
72static BIO_METHOD null_method = { 72static BIO_METHOD null_method = {
73 BIO_TYPE_NULL, 73 .type = BIO_TYPE_NULL,
74 "NULL", 74 .name = "NULL",
75 null_write, 75 .bwrite = null_write,
76 null_read, 76 .bread = null_read,
77 null_puts, 77 .bputs = null_puts,
78 null_gets, 78 .bgets = null_gets,
79 null_ctrl, 79 .ctrl = null_ctrl,
80 null_new, 80 .create = null_new,
81 null_free, 81 .destroy = null_free
82 NULL,
83}; 82};
84 83
85BIO_METHOD * 84BIO_METHOD *
diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c
index 3dae2562bf..757e1dbb8f 100644
--- a/src/lib/libcrypto/bio/bss_sock.c
+++ b/src/lib/libcrypto/bio/bss_sock.c
@@ -74,16 +74,14 @@ static 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 BIO_METHOD methods_sockp = {
77 BIO_TYPE_SOCKET, 77 .type = BIO_TYPE_SOCKET,
78 "socket", 78 .name = "socket",
79 sock_write, 79 .bwrite = sock_write,
80 sock_read, 80 .bread = sock_read,
81 sock_puts, 81 .bputs = sock_puts,
82 NULL, /* sock_gets, */ 82 .ctrl = sock_ctrl,
83 sock_ctrl, 83 .create = sock_new,
84 sock_new, 84 .destroy = sock_free
85 sock_free,
86 NULL,
87}; 85};
88 86
89BIO_METHOD * 87BIO_METHOD *