RT4660: BIO_METHODs should be const.
authorDavid Benjamin <davidben@google.com>
Sat, 19 Mar 2016 16:32:14 +0000 (12:32 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 21 Mar 2016 20:49:10 +0000 (16:49 -0400)
BIO_new, etc., don't need a non-const BIO_METHOD. This allows all the
built-in method tables to live in .rodata.

Reviewed-by: Richard Levitte <levitte@openssl.org>
43 files changed:
apps/s_server.c
crypto/asn1/bio_asn1.c
crypto/bio/bf_buff.c
crypto/bio/bf_lbuf.c
crypto/bio/bf_nbio.c
crypto/bio/bf_null.c
crypto/bio/bio_lib.c
crypto/bio/bss_acpt.c
crypto/bio/bss_bio.c
crypto/bio/bss_conn.c
crypto/bio/bss_dgram.c
crypto/bio/bss_fd.c
crypto/bio/bss_file.c
crypto/bio/bss_log.c
crypto/bio/bss_mem.c
crypto/bio/bss_null.c
crypto/bio/bss_sock.c
crypto/comp/c_zlib.c
crypto/evp/bio_b64.c
crypto/evp/bio_enc.c
crypto/evp/bio_md.c
crypto/evp/bio_ok.c
doc/crypto/BIO_f_base64.pod
doc/crypto/BIO_f_buffer.pod
doc/crypto/BIO_f_cipher.pod
doc/crypto/BIO_f_md.pod
doc/crypto/BIO_f_null.pod
doc/crypto/BIO_f_ssl.pod
doc/crypto/BIO_new.pod
doc/crypto/BIO_s_accept.pod
doc/crypto/BIO_s_bio.pod
doc/crypto/BIO_s_connect.pod
doc/crypto/BIO_s_fd.pod
doc/crypto/BIO_s_file.pod
doc/crypto/BIO_s_mem.pod
doc/crypto/BIO_s_null.pod
doc/crypto/BIO_s_socket.pod
include/openssl/asn1.h
include/openssl/bio.h
include/openssl/comp.h
include/openssl/evp.h
include/openssl/ssl.h
ssl/bio_ssl.c

index b33d76860c7205bb6e53c1d2f38dc7aee26d91f8..08acc476a7ab6f293d132339e07986192916d310 100644 (file)
@@ -421,7 +421,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size);
 static int ebcdic_puts(BIO *bp, const char *str);
 
 # define BIO_TYPE_EBCDIC_FILTER  (18|0x0200)
 static int ebcdic_puts(BIO *bp, const char *str);
 
 # define BIO_TYPE_EBCDIC_FILTER  (18|0x0200)
-static BIO_METHOD methods_ebcdic = {
+static const BIO_METHOD methods_ebcdic = {
     BIO_TYPE_EBCDIC_FILTER,
     "EBCDIC/ASCII filter",
     ebcdic_write,
     BIO_TYPE_EBCDIC_FILTER,
     "EBCDIC/ASCII filter",
     ebcdic_write,
@@ -439,7 +439,7 @@ typedef struct {
     char buff[1];
 } EBCDIC_OUTBUFF;
 
     char buff[1];
 } EBCDIC_OUTBUFF;
 
-BIO_METHOD *BIO_f_ebcdic_filter()
+const BIO_METHOD *BIO_f_ebcdic_filter()
 {
     return (&methods_ebcdic);
 }
 {
     return (&methods_ebcdic);
 }
index 33998e72648cd1d2e7e8e77609cd3154f92db6e5..80206aa4f64a06d4ebe1b65d07055902af75d9c3 100644 (file)
@@ -124,7 +124,7 @@ static int asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx,
                              asn1_bio_state_t ex_state,
                              asn1_bio_state_t other_state);
 
                              asn1_bio_state_t ex_state,
                              asn1_bio_state_t other_state);
 
-static BIO_METHOD methods_asn1 = {
+static const BIO_METHOD methods_asn1 = {
     BIO_TYPE_ASN1,
     "asn1",
     asn1_bio_write,
     BIO_TYPE_ASN1,
     "asn1",
     asn1_bio_write,
@@ -137,7 +137,7 @@ static BIO_METHOD methods_asn1 = {
     asn1_bio_callback_ctrl,
 };
 
     asn1_bio_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_asn1(void)
+const BIO_METHOD *BIO_f_asn1(void)
 {
     return (&methods_asn1);
 }
 {
     return (&methods_asn1);
 }
index 1486a18335510c3f24dd38f68a5b858726555210..6040c85119b79783a65b1f4296d78eb72f352c43 100644 (file)
@@ -70,7 +70,7 @@ static int buffer_free(BIO *data);
 static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 #define DEFAULT_BUFFER_SIZE     4096
 
 static long buffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 #define DEFAULT_BUFFER_SIZE     4096
 
-static BIO_METHOD methods_buffer = {
+static const BIO_METHOD methods_buffer = {
     BIO_TYPE_BUFFER,
     "buffer",
     buffer_write,
     BIO_TYPE_BUFFER,
     "buffer",
     buffer_write,
@@ -83,7 +83,7 @@ static BIO_METHOD methods_buffer = {
     buffer_callback_ctrl,
 };
 
     buffer_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_buffer(void)
+const BIO_METHOD *BIO_f_buffer(void)
 {
     return (&methods_buffer);
 }
 {
     return (&methods_buffer);
 }
index 96ee9206af15be4deea80f4745a2f5e780080c8f..77462f2445f21f7f6d5002fe88e792ba38212d0a 100644 (file)
@@ -75,7 +75,7 @@ static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 
 /* #define DEBUG */
 
 
 /* #define DEBUG */
 
-static BIO_METHOD methods_linebuffer = {
+static const BIO_METHOD methods_linebuffer = {
     BIO_TYPE_LINEBUFFER,
     "linebuffer",
     linebuffer_write,
     BIO_TYPE_LINEBUFFER,
     "linebuffer",
     linebuffer_write,
@@ -88,7 +88,7 @@ static BIO_METHOD methods_linebuffer = {
     linebuffer_callback_ctrl,
 };
 
     linebuffer_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_linebuffer(void)
+const BIO_METHOD *BIO_f_linebuffer(void)
 {
     return (&methods_linebuffer);
 }
 {
     return (&methods_linebuffer);
 }
index e78bca50597c0ec81f56f71b57f999345a9b71c5..c8bf580e1d709b5aa817e00563ecc7a1a7351d4d 100644 (file)
@@ -79,7 +79,7 @@ typedef struct nbio_test_st {
     int lwn;
 } NBIO_TEST;
 
     int lwn;
 } NBIO_TEST;
 
-static BIO_METHOD methods_nbiof = {
+static const BIO_METHOD methods_nbiof = {
     BIO_TYPE_NBIO_TEST,
     "non-blocking IO test filter",
     nbiof_write,
     BIO_TYPE_NBIO_TEST,
     "non-blocking IO test filter",
     nbiof_write,
@@ -92,7 +92,7 @@ static BIO_METHOD methods_nbiof = {
     nbiof_callback_ctrl,
 };
 
     nbiof_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_nbio_test(void)
+const BIO_METHOD *BIO_f_nbio_test(void)
 {
     return (&methods_nbiof);
 }
 {
     return (&methods_nbiof);
 }
index 1481445486f3fa04a73e74441a54f70cd8e9a09f..e3b87d24e5204a5ff93b9744cd3492b022956c93 100644 (file)
@@ -72,7 +72,7 @@ static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int nullf_new(BIO *h);
 static int nullf_free(BIO *data);
 static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 static int nullf_new(BIO *h);
 static int nullf_free(BIO *data);
 static long nullf_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
-static BIO_METHOD methods_nullf = {
+static const BIO_METHOD methods_nullf = {
     BIO_TYPE_NULL_FILTER,
     "NULL filter",
     nullf_write,
     BIO_TYPE_NULL_FILTER,
     "NULL filter",
     nullf_write,
@@ -85,7 +85,7 @@ static BIO_METHOD methods_nullf = {
     nullf_callback_ctrl,
 };
 
     nullf_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_null(void)
+const BIO_METHOD *BIO_f_null(void)
 {
     return (&methods_nullf);
 }
 {
     return (&methods_nullf);
 }
index 522525b1296b243749c2343a63c3028fd39f58b1..9357553d3649247941f7345e83e5f8483df88d01 100644 (file)
@@ -62,7 +62,7 @@
 #include <openssl/bio.h>
 #include <openssl/stack.h>
 
 #include <openssl/bio.h>
 #include <openssl/stack.h>
 
-BIO *BIO_new(BIO_METHOD *method)
+BIO *BIO_new(const BIO_METHOD *method)
 {
     BIO *ret = OPENSSL_malloc(sizeof(*ret));
 
 {
     BIO *ret = OPENSSL_malloc(sizeof(*ret));
 
@@ -77,7 +77,7 @@ BIO *BIO_new(BIO_METHOD *method)
     return (ret);
 }
 
     return (ret);
 }
 
-int BIO_set(BIO *bio, BIO_METHOD *method)
+int BIO_set(BIO *bio, const BIO_METHOD *method)
 {
     bio->method = method;
     bio->callback = NULL;
 {
     bio->method = method;
     bio->callback = NULL;
index a0a70c4484eabc039000ff27819d36808a17ae40..8cd66fe1ee0757200e2fe29f60657e15e24397ab 100644 (file)
@@ -99,7 +99,7 @@ static void BIO_ACCEPT_free(BIO_ACCEPT *a);
 # define ACPT_S_ACCEPT                   5
 # define ACPT_S_OK                       6
 
 # define ACPT_S_ACCEPT                   5
 # define ACPT_S_OK                       6
 
-static BIO_METHOD methods_acceptp = {
+static const BIO_METHOD methods_acceptp = {
     BIO_TYPE_ACCEPT,
     "socket accept",
     acpt_write,
     BIO_TYPE_ACCEPT,
     "socket accept",
     acpt_write,
@@ -112,7 +112,7 @@ static BIO_METHOD methods_acceptp = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_accept(void)
+const BIO_METHOD *BIO_s_accept(void)
 {
     return (&methods_acceptp);
 }
 {
     return (&methods_acceptp);
 }
index 4caa2331ffd4b289d52b5a1cafb2fc4b9c91945e..518fa35c2f9cc28be4a102aa009486f6e4726920 100644 (file)
@@ -81,7 +81,7 @@ static int bio_puts(BIO *bio, const char *str);
 static int bio_make_pair(BIO *bio1, BIO *bio2);
 static void bio_destroy_pair(BIO *bio);
 
 static int bio_make_pair(BIO *bio1, BIO *bio2);
 static void bio_destroy_pair(BIO *bio);
 
-static BIO_METHOD methods_biop = {
+static const BIO_METHOD methods_biop = {
     BIO_TYPE_BIO,
     "BIO pair",
     bio_write,
     BIO_TYPE_BIO,
     "BIO pair",
     bio_write,
@@ -94,7 +94,7 @@ static BIO_METHOD methods_biop = {
     NULL                        /* no bio_callback_ctrl */
 };
 
     NULL                        /* no bio_callback_ctrl */
 };
 
-BIO_METHOD *BIO_s_bio(void)
+const BIO_METHOD *BIO_s_bio(void)
 {
     return &methods_biop;
 }
 {
     return &methods_biop;
 }
index 492fe01c03f01bffd35d73610a7f7e05ca9b4b49..a4949b3d60700b46039073f865660f4e087a0417 100644 (file)
@@ -103,7 +103,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a);
 #define BIO_CONN_S_OK                    5
 #define BIO_CONN_S_BLOCKED_CONNECT       6
 
 #define BIO_CONN_S_OK                    5
 #define BIO_CONN_S_BLOCKED_CONNECT       6
 
-static BIO_METHOD methods_connectp = {
+static const BIO_METHOD methods_connectp = {
     BIO_TYPE_CONNECT,
     "socket connect",
     conn_write,
     BIO_TYPE_CONNECT,
     "socket connect",
     conn_write,
@@ -285,7 +285,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a)
     OPENSSL_free(a);
 }
 
     OPENSSL_free(a);
 }
 
-BIO_METHOD *BIO_s_connect(void)
+const BIO_METHOD *BIO_s_connect(void)
 {
     return (&methods_connectp);
 }
 {
     return (&methods_connectp);
 }
index 5a52e7c3cb575a2fcf6731b7f4b35acbf6bd1802..cf2f9f66b5346fd45dc8146f85c68cbe23051ed4 100644 (file)
@@ -125,7 +125,7 @@ static int BIO_dgram_should_retry(int s);
 
 static void get_current_time(struct timeval *t);
 
 
 static void get_current_time(struct timeval *t);
 
-static BIO_METHOD methods_dgramp = {
+static const BIO_METHOD methods_dgramp = {
     BIO_TYPE_DGRAM,
     "datagram socket",
     dgram_write,
     BIO_TYPE_DGRAM,
     "datagram socket",
     dgram_write,
@@ -139,7 +139,7 @@ static BIO_METHOD methods_dgramp = {
 };
 
 # ifndef OPENSSL_NO_SCTP
 };
 
 # ifndef OPENSSL_NO_SCTP
-static BIO_METHOD methods_dgramp_sctp = {
+static const BIO_METHOD methods_dgramp_sctp = {
     BIO_TYPE_DGRAM_SCTP,
     "datagram sctp socket",
     dgram_sctp_write,
     BIO_TYPE_DGRAM_SCTP,
     "datagram sctp socket",
     dgram_sctp_write,
@@ -189,7 +189,7 @@ typedef struct bio_dgram_sctp_data_st {
 } bio_dgram_sctp_data;
 # endif
 
 } bio_dgram_sctp_data;
 # endif
 
-BIO_METHOD *BIO_s_datagram(void)
+const BIO_METHOD *BIO_s_datagram(void)
 {
     return (&methods_dgramp);
 }
 {
     return (&methods_dgramp);
 }
@@ -858,7 +858,7 @@ static int dgram_puts(BIO *bp, const char *str)
 }
 
 # ifndef OPENSSL_NO_SCTP
 }
 
 # ifndef OPENSSL_NO_SCTP
-BIO_METHOD *BIO_s_datagram_sctp(void)
+const BIO_METHOD *BIO_s_datagram_sctp(void)
 {
     return (&methods_dgramp_sctp);
 }
 {
     return (&methods_dgramp_sctp);
 }
index 48921eee995daf31f1cbf5c6097f4cc511df5db4..983e9fe08c762afdb2397c47f9bd526758f00078 100644 (file)
@@ -79,7 +79,7 @@ int BIO_fd_should_retry(int i)
     return 0;
 }
 
     return 0;
 }
 
-BIO_METHOD *BIO_s_fd(void)
+const BIO_METHOD *BIO_s_fd(void)
 {
     return NULL;
 }
 {
     return NULL;
 }
@@ -105,7 +105,7 @@ static int fd_new(BIO *h);
 static int fd_free(BIO *data);
 int BIO_fd_should_retry(int s);
 
 static int fd_free(BIO *data);
 int BIO_fd_should_retry(int s);
 
-static BIO_METHOD methods_fdp = {
+static const BIO_METHOD methods_fdp = {
     BIO_TYPE_FD, "file descriptor",
     fd_write,
     fd_read,
     BIO_TYPE_FD, "file descriptor",
     fd_write,
     fd_read,
@@ -117,7 +117,7 @@ static BIO_METHOD methods_fdp = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_fd(void)
+const BIO_METHOD *BIO_s_fd(void)
 {
     return (&methods_fdp);
 }
 {
     return (&methods_fdp);
 }
index d53d52bd142838e122ac0bfd7df4a828b4adf951..643a855a8d4ebc466d6e6e788800d43fb6021fd4 100644 (file)
@@ -96,7 +96,7 @@ static int file_gets(BIO *h, char *str, int size);
 static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int file_new(BIO *h);
 static int file_free(BIO *data);
 static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int file_new(BIO *h);
 static int file_free(BIO *data);
-static BIO_METHOD methods_filep = {
+static const BIO_METHOD methods_filep = {
     BIO_TYPE_FILE,
     "FILE pointer",
     file_write,
     BIO_TYPE_FILE,
     "FILE pointer",
     file_write,
@@ -198,7 +198,7 @@ BIO *BIO_new_fp(FILE *stream, int close_flag)
     return (ret);
 }
 
     return (ret);
 }
 
-BIO_METHOD *BIO_s_file(void)
+const BIO_METHOD *BIO_s_file(void)
 {
     return (&methods_filep);
 }
 {
     return (&methods_filep);
 }
@@ -479,7 +479,7 @@ static int file_free(BIO *a)
     return 0;
 }
 
     return 0;
 }
 
-static BIO_METHOD methods_filep = {
+static const BIO_METHOD methods_filep = {
     BIO_TYPE_FILE,
     "FILE pointer",
     file_write,
     BIO_TYPE_FILE,
     "FILE pointer",
     file_write,
@@ -492,7 +492,7 @@ static BIO_METHOD methods_filep = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_file(void)
+const BIO_METHOD *BIO_s_file(void)
 {
     return (&methods_filep);
 }
 {
     return (&methods_filep);
 }
index 560f1b7aa3798df779cda63fbc7e2c9fc159523d..a6bc0e779ad22f774a90ae3c98e5b63837d429ba 100644 (file)
@@ -128,7 +128,7 @@ static void xopenlog(BIO *bp, char *name, int level);
 static void xsyslog(BIO *bp, int priority, const char *string);
 static void xcloselog(BIO *bp);
 
 static void xsyslog(BIO *bp, int priority, const char *string);
 static void xcloselog(BIO *bp);
 
-static BIO_METHOD methods_slg = {
+static const BIO_METHOD methods_slg = {
     BIO_TYPE_MEM, "syslog",
     slg_write,
     NULL,
     BIO_TYPE_MEM, "syslog",
     slg_write,
     NULL,
@@ -140,7 +140,7 @@ static BIO_METHOD methods_slg = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_log(void)
+const BIO_METHOD *BIO_s_log(void)
 {
     return (&methods_slg);
 }
 {
     return (&methods_slg);
 }
index 4d4554719ca4856838c3dc2d76b4c6cc07d65f57..68ac90d0af3ec6f042667a2542e4d54d9f6706b1 100644 (file)
@@ -68,7 +68,7 @@ static long mem_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int mem_new(BIO *h);
 static int secmem_new(BIO *h);
 static int mem_free(BIO *data);
 static int mem_new(BIO *h);
 static int secmem_new(BIO *h);
 static int mem_free(BIO *data);
-static BIO_METHOD mem_method = {
+static const BIO_METHOD mem_method = {
     BIO_TYPE_MEM,
     "memory buffer",
     mem_write,
     BIO_TYPE_MEM,
     "memory buffer",
     mem_write,
@@ -80,7 +80,7 @@ static BIO_METHOD mem_method = {
     mem_free,
     NULL,
 };
     mem_free,
     NULL,
 };
-static BIO_METHOD secmem_method = {
+static const BIO_METHOD secmem_method = {
     BIO_TYPE_MEM,
     "secure memory buffer",
     mem_write,
     BIO_TYPE_MEM,
     "secure memory buffer",
     mem_write,
@@ -98,12 +98,12 @@ static BIO_METHOD secmem_method = {
  * should_retry is not set
  */
 
  * should_retry is not set
  */
 
-BIO_METHOD *BIO_s_mem(void)
+const BIO_METHOD *BIO_s_mem(void)
 {
     return (&mem_method);
 }
 
 {
     return (&mem_method);
 }
 
-BIO_METHOD *BIO_s_secmem(void)
+const BIO_METHOD *BIO_s_secmem(void)
 {
     return(&secmem_method);
 }
 {
     return(&secmem_method);
 }
index 3a1d77d254e91f2cd079798f20c8a165bf092537..c5e24844d1a0a1b701f0b1b558da17c39a00c6f7 100644 (file)
@@ -67,7 +67,7 @@ static int null_gets(BIO *h, char *str, int size);
 static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int null_new(BIO *h);
 static int null_free(BIO *data);
 static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int null_new(BIO *h);
 static int null_free(BIO *data);
-static BIO_METHOD null_method = {
+static const BIO_METHOD null_method = {
     BIO_TYPE_NULL,
     "NULL",
     null_write,
     BIO_TYPE_NULL,
     "NULL",
     null_write,
@@ -80,7 +80,7 @@ static BIO_METHOD null_method = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_null(void)
+const BIO_METHOD *BIO_s_null(void)
 {
     return (&null_method);
 }
 {
     return (&null_method);
 }
index 8d87c8c338809e807f6116e4a902a7d0ed839e5e..85d7d661fb3a8443ad13023364e1e6a5db71a271 100644 (file)
@@ -78,7 +78,7 @@ static int sock_new(BIO *h);
 static int sock_free(BIO *data);
 int BIO_sock_should_retry(int s);
 
 static int sock_free(BIO *data);
 int BIO_sock_should_retry(int s);
 
-static BIO_METHOD methods_sockp = {
+static const BIO_METHOD methods_sockp = {
     BIO_TYPE_SOCKET,
     "socket",
     sock_write,
     BIO_TYPE_SOCKET,
     "socket",
     sock_write,
@@ -91,7 +91,7 @@ static BIO_METHOD methods_sockp = {
     NULL,
 };
 
     NULL,
 };
 
-BIO_METHOD *BIO_s_socket(void)
+const BIO_METHOD *BIO_s_socket(void)
 {
     return (&methods_sockp);
 }
 {
     return (&methods_sockp);
 }
index c78bbcfde8ae1008868663f85577efcbe3d49202..138d6866017810f93e5cf2711811a1da0c6ede2e 100644 (file)
@@ -331,7 +331,7 @@ static int bio_zlib_write(BIO *b, const char *in, int inl);
 static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr);
 static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp);
 
 static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr);
 static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp);
 
-static BIO_METHOD bio_meth_zlib = {
+static const BIO_METHOD bio_meth_zlib = {
     BIO_TYPE_COMP,
     "zlib",
     bio_zlib_write,
     BIO_TYPE_COMP,
     "zlib",
     bio_zlib_write,
@@ -344,7 +344,7 @@ static BIO_METHOD bio_meth_zlib = {
     bio_zlib_callback_ctrl
 };
 
     bio_zlib_callback_ctrl
 };
 
-BIO_METHOD *BIO_f_zlib(void)
+const BIO_METHOD *BIO_f_zlib(void)
 {
     return &bio_meth_zlib;
 }
 {
     return &bio_meth_zlib;
 }
index 097b0958f1efc7699beb5492975ed1b2915f4b27..93e4166b48e9a2dcd798de94fba92f3bdf5c9c6f 100644 (file)
@@ -93,7 +93,7 @@ typedef struct b64_struct {
     char tmp[B64_BLOCK_SIZE];
 } BIO_B64_CTX;
 
     char tmp[B64_BLOCK_SIZE];
 } BIO_B64_CTX;
 
-static BIO_METHOD methods_b64 = {
+static const BIO_METHOD methods_b64 = {
     BIO_TYPE_BASE64, "base64 encoding",
     b64_write,
     b64_read,
     BIO_TYPE_BASE64, "base64 encoding",
     b64_write,
     b64_read,
@@ -105,7 +105,7 @@ static BIO_METHOD methods_b64 = {
     b64_callback_ctrl,
 };
 
     b64_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_base64(void)
+const BIO_METHOD *BIO_f_base64(void)
 {
     return (&methods_b64);
 }
 {
     return (&methods_b64);
 }
index 9754031e2bda5ce30485dfe546d8c01ebeeea95f..e89c1df098ce2665b7b399624d12132c33988c19 100644 (file)
@@ -90,7 +90,7 @@ typedef struct enc_struct {
     char buf[ENC_BLOCK_SIZE + BUF_OFFSET + 2];
 } BIO_ENC_CTX;
 
     char buf[ENC_BLOCK_SIZE + BUF_OFFSET + 2];
 } BIO_ENC_CTX;
 
-static BIO_METHOD methods_enc = {
+static const BIO_METHOD methods_enc = {
     BIO_TYPE_CIPHER, "cipher",
     enc_write,
     enc_read,
     BIO_TYPE_CIPHER, "cipher",
     enc_write,
     enc_read,
@@ -102,7 +102,7 @@ static BIO_METHOD methods_enc = {
     enc_callback_ctrl,
 };
 
     enc_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_cipher(void)
+const BIO_METHOD *BIO_f_cipher(void)
 {
     return (&methods_enc);
 }
 {
     return (&methods_enc);
 }
index 30a506ebbaab43976d366d08afc56ca77b0733e0..90dffa13135d054926fc19bcb3193cdaffad57d9 100644 (file)
@@ -78,7 +78,7 @@ static int md_new(BIO *h);
 static int md_free(BIO *data);
 static long md_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 
 static int md_free(BIO *data);
 static long md_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 
-static BIO_METHOD methods_md = {
+static const BIO_METHOD methods_md = {
     BIO_TYPE_MD, "message digest",
     md_write,
     md_read,
     BIO_TYPE_MD, "message digest",
     md_write,
     md_read,
@@ -90,7 +90,7 @@ static BIO_METHOD methods_md = {
     md_callback_ctrl,
 };
 
     md_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_md(void)
+const BIO_METHOD *BIO_f_md(void)
 {
     return (&methods_md);
 }
 {
     return (&methods_md);
 }
index ec5d7199f527d599ac492bfebfd063b8bad9cc62..a29777ced0337e05b02519a9b22abcd55a155662 100644 (file)
@@ -155,7 +155,7 @@ typedef struct ok_struct {
     unsigned char buf[IOBS];
 } BIO_OK_CTX;
 
     unsigned char buf[IOBS];
 } BIO_OK_CTX;
 
-static BIO_METHOD methods_ok = {
+static const BIO_METHOD methods_ok = {
     BIO_TYPE_CIPHER, "reliable",
     ok_write,
     ok_read,
     BIO_TYPE_CIPHER, "reliable",
     ok_write,
     ok_read,
@@ -167,7 +167,7 @@ static BIO_METHOD methods_ok = {
     ok_callback_ctrl,
 };
 
     ok_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_reliable(void)
+const BIO_METHOD *BIO_f_reliable(void)
 {
     return (&methods_ok);
 }
 {
     return (&methods_ok);
 }
index d1d7bf0bd0662345e81cd541691c433effe1950e..c25ac51124f0bbae75e5f61fe79ef3fdf9f66483 100644 (file)
@@ -9,7 +9,7 @@ BIO_f_base64 - base64 BIO filter
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
BIO_METHOD *  BIO_f_base64(void);
const BIO_METHOD *    BIO_f_base64(void);
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
index d07c41917f6954eaeaf53fb7e4b8c1854574a9c2..edaa3513df26a9c8b2a706bc65036d608a9bb621 100644 (file)
@@ -8,7 +8,7 @@ BIO_f_buffer - buffering BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO_METHOD * BIO_f_buffer(void);
const BIO_METHOD * BIO_f_buffer(void);
 
  #define BIO_get_buffer_num_lines(b)
  #define BIO_set_read_buffer_size(b,size)
 
  #define BIO_get_buffer_num_lines(b)
  #define BIO_set_read_buffer_size(b,size)
index fd8762a4feb935fe32ece116f79bc756fd283f7b..947d1523e31abd345e964e4c5718ee2258157178 100644 (file)
@@ -9,7 +9,7 @@ BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
BIO_METHOD *  BIO_f_cipher(void);
const BIO_METHOD *    BIO_f_cipher(void);
  void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher,
                unsigned char *key, unsigned char *iv, int enc);
  int BIO_get_cipher_status(BIO *b)
  void BIO_set_cipher(BIO *b,const EVP_CIPHER *cipher,
                unsigned char *key, unsigned char *iv, int enc);
  int BIO_get_cipher_status(BIO *b)
index d9aec082f8af907f4db9e2a31d14a325b97fbfca..b0fe0143bdd46ad6d8f379fcd03aa2a8cb0e54af 100644 (file)
@@ -9,7 +9,7 @@ BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
  #include <openssl/bio.h>
  #include <openssl/evp.h>
 
BIO_METHOD *  BIO_f_md(void);
const BIO_METHOD *    BIO_f_md(void);
  int BIO_set_md(BIO *b,EVP_MD *md);
  int BIO_get_md(BIO *b,EVP_MD **mdp);
  int BIO_get_md_ctx(BIO *b,EVP_MD_CTX **mdcp);
  int BIO_set_md(BIO *b,EVP_MD *md);
  int BIO_get_md(BIO *b,EVP_MD **mdp);
  int BIO_get_md_ctx(BIO *b,EVP_MD_CTX **mdcp);
index b057c1840832f1629549523b35a9c078cad9a478..6ee84915e10259ebb4399d34be93a1e22818e4d5 100644 (file)
@@ -8,7 +8,7 @@ BIO_f_null - null filter
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
BIO_METHOD *  BIO_f_null(void);
const BIO_METHOD *    BIO_f_null(void);
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
index 4d49dc789bc23a0f22591d5bfa953a98b1f8449b..46eecd11e22debcf303811f8f7ff58ab351ae188 100644 (file)
@@ -12,7 +12,7 @@ BIO_ssl_shutdown - SSL BIO
  #include <openssl/bio.h>
  #include <openssl/ssl.h>
 
  #include <openssl/bio.h>
  #include <openssl/ssl.h>
 
- BIO_METHOD *BIO_f_ssl(void);
const BIO_METHOD *BIO_f_ssl(void);
 
  #define BIO_set_ssl(b,ssl,c)  BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
  #define BIO_get_ssl(b,sslp)   BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
 
  #define BIO_set_ssl(b,ssl,c)  BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
  #define BIO_get_ssl(b,sslp)   BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
index d6d87c3901ff8d59f13ef6465dcc32d4f8d19176..4c9299bb3c1a55c0b2f154fed3feba2cec963815 100644 (file)
@@ -8,8 +8,8 @@ BIO_new, BIO_set, BIO_up_ref, BIO_free, BIO_vfree, BIO_free_all - BIO allocation
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO * BIO_new(BIO_METHOD *type);
- int   BIO_set(BIO *a,BIO_METHOD *type);
+ BIO * BIO_new(const BIO_METHOD *type);
+ int   BIO_set(BIO *a,const BIO_METHOD *type);
  int   BIO_up_ref(BIO *a);
  int   BIO_free(BIO *a);
  void  BIO_vfree(BIO *a);
  int   BIO_up_ref(BIO *a);
  int   BIO_free(BIO *a);
  void  BIO_vfree(BIO *a);
index ec8fa3a0caf2c2bb6d86267a5b21c228524683cf..e0877e0d8e058d34a5843b6c2f48628e791bf5b0 100644 (file)
@@ -10,7 +10,7 @@ BIO_get_bind_mode, BIO_do_accept - accept BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO_METHOD *BIO_s_accept(void);
const BIO_METHOD *BIO_s_accept(void);
 
  long BIO_set_accept_port(BIO *b, char *name);
  char *BIO_get_accept_port(BIO *b);
 
  long BIO_set_accept_port(BIO *b, char *name);
  char *BIO_get_accept_port(BIO *b);
index 0daa518a15d4a47b60f13dc0953ca095e4792629..ce3cf6e3830870b35a1c126f9c1c4f22f92989e0 100644 (file)
@@ -11,7 +11,7 @@ BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO_METHOD *BIO_s_bio(void);
const BIO_METHOD *BIO_s_bio(void);
 
  #define BIO_make_bio_pair(b1,b2)   (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
  #define BIO_destroy_bio_pair(b)    (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
 
  #define BIO_make_bio_pair(b1,b2)   (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
  #define BIO_destroy_bio_pair(b)    (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
index 7adb78da702f6cdb26d2d181f32868e421a7ae0b..bd3cf81d5bbd42e7d6bdc4819e6683790280e8b7 100644 (file)
@@ -11,7 +11,7 @@ BIO_set_nbio, BIO_do_connect - connect BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO_METHOD * BIO_s_connect(void);
const BIO_METHOD * BIO_s_connect(void);
 
  BIO *BIO_new_connect(char *name);
 
 
  BIO *BIO_new_connect(char *name);
 
index 2f6b033f0abbb86ce07bcf5d29383aa26a205fed..7c7cee9843ec5fbddfc369c108b1bc88463fb6e1 100644 (file)
@@ -8,7 +8,7 @@ BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
BIO_METHOD *  BIO_s_fd(void);
const BIO_METHOD *    BIO_s_fd(void);
 
  #define BIO_set_fd(b,fd,c)    BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
  #define BIO_get_fd(b,c)       BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
 
  #define BIO_set_fd(b,fd,c)    BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
  #define BIO_get_fd(b,c)       BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
index 5adc5697933ad50c16c0eaed712c3c13bdb1b11e..5ba0d34dd4d492b5beec3b036149aeedab9379e1 100644 (file)
@@ -10,7 +10,7 @@ BIO_rw_filename - FILE bio
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
BIO_METHOD *  BIO_s_file(void);
const BIO_METHOD *    BIO_s_file(void);
  BIO *BIO_new_file(const char *filename, const char *mode);
  BIO *BIO_new_fp(FILE *stream, int flags);
 
  BIO *BIO_new_file(const char *filename, const char *mode);
  BIO *BIO_new_fp(FILE *stream, int flags);
 
index b9ce5da6e2e3fab3bc83a640e040949e1b239a8e..03e291dce303ef036643a66eb09ff536052ebae9 100644 (file)
@@ -9,8 +9,8 @@ BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
BIO_METHOD *  BIO_s_mem(void);
BIO_METHOD *  BIO_s_secmem(void);
const BIO_METHOD *    BIO_s_mem(void);
const BIO_METHOD *    BIO_s_secmem(void);
 
  BIO_set_mem_eof_return(BIO *b,int v)
  long BIO_get_mem_data(BIO *b, char **pp)
 
  BIO_set_mem_eof_return(BIO *b,int v)
  long BIO_get_mem_data(BIO *b, char **pp)
index e5514f723898c4d51beb37cd083ae04db2d514a5..00905ecbea634595ed9bf30e7c4b048a5e9e2642 100644 (file)
@@ -8,7 +8,7 @@ BIO_s_null - null data sink
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
BIO_METHOD *  BIO_s_null(void);
const BIO_METHOD *    BIO_s_null(void);
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
index 1c8d3a91102745b581b284d2d8114945dab43a46..13efb50edcc4545cda330c5f6ee838444b2ce995 100644 (file)
@@ -8,7 +8,7 @@ BIO_s_socket, BIO_new_socket - socket BIO
 
  #include <openssl/bio.h>
 
 
  #include <openssl/bio.h>
 
- BIO_METHOD *BIO_s_socket(void);
const BIO_METHOD *BIO_s_socket(void);
 
  long BIO_set_fd(BIO *b, int fd, long close_flag);
  long BIO_get_fd(BIO *b, int *c);
 
  long BIO_set_fd(BIO *b, int fd, long close_flag);
  long BIO_get_fd(BIO *b, int *c);
index 360914d7d287a8f21959b948ac90e2802558ae80..4c30a74400112f93bc853ca8eae7a599c0a5a6cf 100644 (file)
@@ -887,7 +887,7 @@ unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
 void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
 void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
 
 void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
 void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
 
-BIO_METHOD *BIO_f_asn1(void);
+const BIO_METHOD *BIO_f_asn1(void);
 
 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
 
 
 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
 
index 3b2265fbabd1b24620f3f508ee9ed6d0ccc88527..5389770b6a2d4595f7e0de254a22f43e41e53575 100644 (file)
@@ -310,7 +310,7 @@ typedef struct bio_method_st {
 } BIO_METHOD;
 
 struct bio_st {
 } BIO_METHOD;
 
 struct bio_st {
-    BIO_METHOD *method;
+    const BIO_METHOD *method;
     /* bio, mode, argp, argi, argl, ret */
     long (*callback) (struct bio_st *, int, const char *, int, long, long);
     char *cb_arg;               /* first argument for the callback */
     /* bio, mode, argp, argi, argl, ret */
     long (*callback) (struct bio_st *, int, const char *, int, long, long);
     char *cb_arg;               /* first argument for the callback */
@@ -627,13 +627,13 @@ int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
                         asn1_ps_func **psuffix_free);
 
 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
                         asn1_ps_func **psuffix_free);
 
-BIO_METHOD *BIO_s_file(void);
+const BIO_METHOD *BIO_s_file(void);
 BIO *BIO_new_file(const char *filename, const char *mode);
 # ifndef OPENSSL_NO_STDIO
 BIO *BIO_new_fp(FILE *stream, int close_flag);
 # endif
 BIO *BIO_new_file(const char *filename, const char *mode);
 # ifndef OPENSSL_NO_STDIO
 BIO *BIO_new_fp(FILE *stream, int close_flag);
 # endif
-BIO *BIO_new(BIO_METHOD *type);
-int BIO_set(BIO *a, BIO_METHOD *type);
+BIO *BIO_new(const BIO_METHOD *type);
+int BIO_set(BIO *a, const BIO_METHOD *type);
 int BIO_free(BIO *a);
 void BIO_vfree(BIO *a);
 int BIO_up_ref(BIO *a);
 int BIO_free(BIO *a);
 void BIO_vfree(BIO *a);
 int BIO_up_ref(BIO *a);
@@ -665,31 +665,29 @@ int BIO_nwrite(BIO *bio, char **buf, int num);
 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
                         long argl, long ret);
 
 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
                         long argl, long ret);
 
-BIO_METHOD *BIO_s_mem(void);
-BIO_METHOD *BIO_s_secmem(void);
+const BIO_METHOD *BIO_s_mem(void);
+const BIO_METHOD *BIO_s_secmem(void);
 BIO *BIO_new_mem_buf(const void *buf, int len);
 BIO *BIO_new_mem_buf(const void *buf, int len);
-BIO_METHOD *BIO_s_socket(void);
-BIO_METHOD *BIO_s_connect(void);
-BIO_METHOD *BIO_s_accept(void);
-BIO_METHOD *BIO_s_fd(void);
-BIO_METHOD *BIO_s_log(void);
-BIO_METHOD *BIO_s_bio(void);
-BIO_METHOD *BIO_s_null(void);
-BIO_METHOD *BIO_f_null(void);
-BIO_METHOD *BIO_f_buffer(void);
+const BIO_METHOD *BIO_s_socket(void);
+const BIO_METHOD *BIO_s_connect(void);
+const BIO_METHOD *BIO_s_accept(void);
+const BIO_METHOD *BIO_s_fd(void);
+const BIO_METHOD *BIO_s_log(void);
+const BIO_METHOD *BIO_s_bio(void);
+const BIO_METHOD *BIO_s_null(void);
+const BIO_METHOD *BIO_f_null(void);
+const BIO_METHOD *BIO_f_buffer(void);
 # ifdef OPENSSL_SYS_VMS
 # ifdef OPENSSL_SYS_VMS
-BIO_METHOD *BIO_f_linebuffer(void);
+const BIO_METHOD *BIO_f_linebuffer(void);
 # endif
 # endif
-BIO_METHOD *BIO_f_nbio_test(void);
+const BIO_METHOD *BIO_f_nbio_test(void);
 # ifndef OPENSSL_NO_DGRAM
 # ifndef OPENSSL_NO_DGRAM
-BIO_METHOD *BIO_s_datagram(void);
+const BIO_METHOD *BIO_s_datagram(void);
 #  ifndef OPENSSL_NO_SCTP
 #  ifndef OPENSSL_NO_SCTP
-BIO_METHOD *BIO_s_datagram_sctp(void);
+const BIO_METHOD *BIO_s_datagram_sctp(void);
 #  endif
 # endif
 
 #  endif
 # endif
 
-/* BIO_METHOD *BIO_f_ber(void); */
-
 int BIO_sock_should_retry(int i);
 int BIO_sock_non_fatal_error(int error);
 int BIO_dgram_non_fatal_error(int error);
 int BIO_sock_should_retry(int i);
 int BIO_sock_non_fatal_error(int error);
 int BIO_dgram_non_fatal_error(int error);
index de4eb325612d443e6fe2941db0f5b576a983bcb5..9fa71efd5587f28e48c6f160898aaf7b23d8af4c 100644 (file)
@@ -83,7 +83,7 @@ void COMP_zlib_cleanup(void);
 
 # ifdef HEADER_BIO_H
 #  ifdef ZLIB
 
 # ifdef HEADER_BIO_H
 #  ifdef ZLIB
-BIO_METHOD *BIO_f_zlib(void);
+const BIO_METHOD *BIO_f_zlib(void);
 #  endif
 # endif
 
 #  endif
 # endif
 
index af05e66481bb392af062d4dc560c228a0795b0e4..25a3e6f9378dc082c17ae0720e58193cb7731bce 100644 (file)
@@ -682,10 +682,10 @@ int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
 
 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
 
-BIO_METHOD *BIO_f_md(void);
-BIO_METHOD *BIO_f_base64(void);
-BIO_METHOD *BIO_f_cipher(void);
-BIO_METHOD *BIO_f_reliable(void);
+const BIO_METHOD *BIO_f_md(void);
+const BIO_METHOD *BIO_f_base64(void);
+const BIO_METHOD *BIO_f_cipher(void);
+const BIO_METHOD *BIO_f_reliable(void);
 __owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
                           const unsigned char *i, int enc);
 
 __owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
                           const unsigned char *i, int enc);
 
index 980cb6226f0d9451fb9deca136f8dba509fbdfb7..87d9e11accaae8e864508f7aa244b1e2aa0d2f32 100644 (file)
@@ -1367,7 +1367,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
         SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
 
 
         SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
 
 
-__owur BIO_METHOD *BIO_f_ssl(void);
+__owur const BIO_METHOD *BIO_f_ssl(void);
 __owur BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
 __owur BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
 __owur BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
 __owur BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
 __owur BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
 __owur BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
index c433cf507369a5b053c274f315e46fd05bf456d8..c3afc57f5f2159695b961c93c8f8c4dbf9f0a9f7 100644 (file)
@@ -81,7 +81,7 @@ typedef struct bio_ssl_st {
     unsigned long last_time;
 } BIO_SSL;
 
     unsigned long last_time;
 } BIO_SSL;
 
-static BIO_METHOD methods_sslp = {
+static const BIO_METHOD methods_sslp = {
     BIO_TYPE_SSL, "ssl",
     ssl_write,
     ssl_read,
     BIO_TYPE_SSL, "ssl",
     ssl_write,
     ssl_read,
@@ -93,7 +93,7 @@ static BIO_METHOD methods_sslp = {
     ssl_callback_ctrl,
 };
 
     ssl_callback_ctrl,
 };
 
-BIO_METHOD *BIO_f_ssl(void)
+const BIO_METHOD *BIO_f_ssl(void)
 {
     return (&methods_sslp);
 }
 {
     return (&methods_sslp);
 }