mirror of
https://github.com/openssl/openssl.git
synced 2025-04-18 20:40:45 +08:00
RT4660: BIO_METHODs should be const.
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>
This commit is contained in:
parent
52d86d9b8d
commit
04f6b0fd91
apps
crypto
asn1
bio
bf_buff.cbf_lbuf.cbf_nbio.cbf_null.cbio_lib.cbss_acpt.cbss_bio.cbss_conn.cbss_dgram.cbss_fd.cbss_file.cbss_log.cbss_mem.cbss_null.cbss_sock.c
comp
evp
doc/crypto
BIO_f_base64.podBIO_f_buffer.podBIO_f_cipher.podBIO_f_md.podBIO_f_null.podBIO_f_ssl.podBIO_new.podBIO_s_accept.podBIO_s_bio.podBIO_s_connect.podBIO_s_fd.podBIO_s_file.podBIO_s_mem.podBIO_s_null.podBIO_s_socket.pod
include/openssl
ssl
@ -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 BIO_METHOD methods_ebcdic = {
|
||||
static const BIO_METHOD methods_ebcdic = {
|
||||
BIO_TYPE_EBCDIC_FILTER,
|
||||
"EBCDIC/ASCII filter",
|
||||
ebcdic_write,
|
||||
@ -439,7 +439,7 @@ typedef struct {
|
||||
char buff[1];
|
||||
} EBCDIC_OUTBUFF;
|
||||
|
||||
BIO_METHOD *BIO_f_ebcdic_filter()
|
||||
const BIO_METHOD *BIO_f_ebcdic_filter()
|
||||
{
|
||||
return (&methods_ebcdic);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
static BIO_METHOD methods_asn1 = {
|
||||
static const BIO_METHOD methods_asn1 = {
|
||||
BIO_TYPE_ASN1,
|
||||
"asn1",
|
||||
asn1_bio_write,
|
||||
@ -137,7 +137,7 @@ static BIO_METHOD methods_asn1 = {
|
||||
asn1_bio_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_asn1(void)
|
||||
const BIO_METHOD *BIO_f_asn1(void)
|
||||
{
|
||||
return (&methods_asn1);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_buffer = {
|
||||
static const BIO_METHOD methods_buffer = {
|
||||
BIO_TYPE_BUFFER,
|
||||
"buffer",
|
||||
buffer_write,
|
||||
@ -83,7 +83,7 @@ static BIO_METHOD methods_buffer = {
|
||||
buffer_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_buffer(void)
|
||||
const BIO_METHOD *BIO_f_buffer(void)
|
||||
{
|
||||
return (&methods_buffer);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
|
||||
|
||||
/* #define DEBUG */
|
||||
|
||||
static BIO_METHOD methods_linebuffer = {
|
||||
static const BIO_METHOD methods_linebuffer = {
|
||||
BIO_TYPE_LINEBUFFER,
|
||||
"linebuffer",
|
||||
linebuffer_write,
|
||||
@ -88,7 +88,7 @@ static BIO_METHOD methods_linebuffer = {
|
||||
linebuffer_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_linebuffer(void)
|
||||
const BIO_METHOD *BIO_f_linebuffer(void)
|
||||
{
|
||||
return (&methods_linebuffer);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ typedef struct nbio_test_st {
|
||||
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,
|
||||
@ -92,7 +92,7 @@ static BIO_METHOD methods_nbiof = {
|
||||
nbiof_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_nbio_test(void)
|
||||
const BIO_METHOD *BIO_f_nbio_test(void)
|
||||
{
|
||||
return (&methods_nbiof);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_nullf = {
|
||||
static const BIO_METHOD methods_nullf = {
|
||||
BIO_TYPE_NULL_FILTER,
|
||||
"NULL filter",
|
||||
nullf_write,
|
||||
@ -85,7 +85,7 @@ static BIO_METHOD methods_nullf = {
|
||||
nullf_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_null(void)
|
||||
const BIO_METHOD *BIO_f_null(void)
|
||||
{
|
||||
return (&methods_nullf);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@
|
||||
#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));
|
||||
|
||||
@ -77,7 +77,7 @@ BIO *BIO_new(BIO_METHOD *method)
|
||||
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;
|
||||
|
@ -99,7 +99,7 @@ static void BIO_ACCEPT_free(BIO_ACCEPT *a);
|
||||
# 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,
|
||||
@ -112,7 +112,7 @@ static BIO_METHOD methods_acceptp = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_accept(void)
|
||||
const BIO_METHOD *BIO_s_accept(void)
|
||||
{
|
||||
return (&methods_acceptp);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_biop = {
|
||||
static const BIO_METHOD methods_biop = {
|
||||
BIO_TYPE_BIO,
|
||||
"BIO pair",
|
||||
bio_write,
|
||||
@ -94,7 +94,7 @@ static BIO_METHOD methods_biop = {
|
||||
NULL /* no bio_callback_ctrl */
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_bio(void)
|
||||
const BIO_METHOD *BIO_s_bio(void)
|
||||
{
|
||||
return &methods_biop;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a);
|
||||
#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,
|
||||
@ -285,7 +285,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a)
|
||||
OPENSSL_free(a);
|
||||
}
|
||||
|
||||
BIO_METHOD *BIO_s_connect(void)
|
||||
const BIO_METHOD *BIO_s_connect(void)
|
||||
{
|
||||
return (&methods_connectp);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ static int BIO_dgram_should_retry(int s);
|
||||
|
||||
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,
|
||||
@ -139,7 +139,7 @@ static BIO_METHOD methods_dgramp = {
|
||||
};
|
||||
|
||||
# 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,
|
||||
@ -189,7 +189,7 @@ typedef struct bio_dgram_sctp_data_st {
|
||||
} bio_dgram_sctp_data;
|
||||
# endif
|
||||
|
||||
BIO_METHOD *BIO_s_datagram(void)
|
||||
const BIO_METHOD *BIO_s_datagram(void)
|
||||
{
|
||||
return (&methods_dgramp);
|
||||
}
|
||||
@ -858,7 +858,7 @@ static int dgram_puts(BIO *bp, const char *str)
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
BIO_METHOD *BIO_s_datagram_sctp(void)
|
||||
const BIO_METHOD *BIO_s_datagram_sctp(void)
|
||||
{
|
||||
return (&methods_dgramp_sctp);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ int BIO_fd_should_retry(int i)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BIO_METHOD *BIO_s_fd(void)
|
||||
const BIO_METHOD *BIO_s_fd(void)
|
||||
{
|
||||
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 BIO_METHOD methods_fdp = {
|
||||
static const BIO_METHOD methods_fdp = {
|
||||
BIO_TYPE_FD, "file descriptor",
|
||||
fd_write,
|
||||
fd_read,
|
||||
@ -117,7 +117,7 @@ static BIO_METHOD methods_fdp = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_fd(void)
|
||||
const BIO_METHOD *BIO_s_fd(void)
|
||||
{
|
||||
return (&methods_fdp);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_filep = {
|
||||
static const BIO_METHOD methods_filep = {
|
||||
BIO_TYPE_FILE,
|
||||
"FILE pointer",
|
||||
file_write,
|
||||
@ -198,7 +198,7 @@ BIO *BIO_new_fp(FILE *stream, int close_flag)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
BIO_METHOD *BIO_s_file(void)
|
||||
const BIO_METHOD *BIO_s_file(void)
|
||||
{
|
||||
return (&methods_filep);
|
||||
}
|
||||
@ -479,7 +479,7 @@ static int file_free(BIO *a)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BIO_METHOD methods_filep = {
|
||||
static const BIO_METHOD methods_filep = {
|
||||
BIO_TYPE_FILE,
|
||||
"FILE pointer",
|
||||
file_write,
|
||||
@ -492,7 +492,7 @@ static BIO_METHOD methods_filep = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_file(void)
|
||||
const BIO_METHOD *BIO_s_file(void)
|
||||
{
|
||||
return (&methods_filep);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_slg = {
|
||||
static const BIO_METHOD methods_slg = {
|
||||
BIO_TYPE_MEM, "syslog",
|
||||
slg_write,
|
||||
NULL,
|
||||
@ -140,7 +140,7 @@ static BIO_METHOD methods_slg = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_log(void)
|
||||
const BIO_METHOD *BIO_s_log(void)
|
||||
{
|
||||
return (&methods_slg);
|
||||
}
|
||||
|
@ -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 BIO_METHOD mem_method = {
|
||||
static const BIO_METHOD mem_method = {
|
||||
BIO_TYPE_MEM,
|
||||
"memory buffer",
|
||||
mem_write,
|
||||
@ -80,7 +80,7 @@ static BIO_METHOD mem_method = {
|
||||
mem_free,
|
||||
NULL,
|
||||
};
|
||||
static BIO_METHOD secmem_method = {
|
||||
static const BIO_METHOD secmem_method = {
|
||||
BIO_TYPE_MEM,
|
||||
"secure memory buffer",
|
||||
mem_write,
|
||||
@ -98,12 +98,12 @@ static BIO_METHOD secmem_method = {
|
||||
* should_retry is not set
|
||||
*/
|
||||
|
||||
BIO_METHOD *BIO_s_mem(void)
|
||||
const BIO_METHOD *BIO_s_mem(void)
|
||||
{
|
||||
return (&mem_method);
|
||||
}
|
||||
|
||||
BIO_METHOD *BIO_s_secmem(void)
|
||||
const BIO_METHOD *BIO_s_secmem(void)
|
||||
{
|
||||
return(&secmem_method);
|
||||
}
|
||||
|
@ -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 BIO_METHOD null_method = {
|
||||
static const BIO_METHOD null_method = {
|
||||
BIO_TYPE_NULL,
|
||||
"NULL",
|
||||
null_write,
|
||||
@ -80,7 +80,7 @@ static BIO_METHOD null_method = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_null(void)
|
||||
const BIO_METHOD *BIO_s_null(void)
|
||||
{
|
||||
return (&null_method);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ static int sock_new(BIO *h);
|
||||
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,
|
||||
@ -91,7 +91,7 @@ static BIO_METHOD methods_sockp = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_s_socket(void)
|
||||
const BIO_METHOD *BIO_s_socket(void)
|
||||
{
|
||||
return (&methods_sockp);
|
||||
}
|
||||
|
@ -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 BIO_METHOD bio_meth_zlib = {
|
||||
static const BIO_METHOD bio_meth_zlib = {
|
||||
BIO_TYPE_COMP,
|
||||
"zlib",
|
||||
bio_zlib_write,
|
||||
@ -344,7 +344,7 @@ static BIO_METHOD bio_meth_zlib = {
|
||||
bio_zlib_callback_ctrl
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_zlib(void)
|
||||
const BIO_METHOD *BIO_f_zlib(void)
|
||||
{
|
||||
return &bio_meth_zlib;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ typedef struct b64_struct {
|
||||
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,
|
||||
@ -105,7 +105,7 @@ static BIO_METHOD methods_b64 = {
|
||||
b64_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_base64(void)
|
||||
const BIO_METHOD *BIO_f_base64(void)
|
||||
{
|
||||
return (&methods_b64);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ typedef struct enc_struct {
|
||||
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,
|
||||
@ -102,7 +102,7 @@ static BIO_METHOD methods_enc = {
|
||||
enc_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_cipher(void)
|
||||
const BIO_METHOD *BIO_f_cipher(void)
|
||||
{
|
||||
return (&methods_enc);
|
||||
}
|
||||
|
@ -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 BIO_METHOD methods_md = {
|
||||
static const BIO_METHOD methods_md = {
|
||||
BIO_TYPE_MD, "message digest",
|
||||
md_write,
|
||||
md_read,
|
||||
@ -90,7 +90,7 @@ static BIO_METHOD methods_md = {
|
||||
md_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_md(void)
|
||||
const BIO_METHOD *BIO_f_md(void)
|
||||
{
|
||||
return (&methods_md);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ typedef struct ok_struct {
|
||||
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,
|
||||
@ -167,7 +167,7 @@ static BIO_METHOD methods_ok = {
|
||||
ok_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_reliable(void)
|
||||
const BIO_METHOD *BIO_f_reliable(void)
|
||||
{
|
||||
return (&methods_ok);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ BIO_f_base64 - base64 BIO filter
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
BIO_METHOD * BIO_f_base64(void);
|
||||
const BIO_METHOD * BIO_f_base64(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -8,7 +8,7 @@ BIO_f_buffer - buffering BIO
|
||||
|
||||
#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)
|
||||
|
@ -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>
|
||||
|
||||
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)
|
||||
|
@ -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>
|
||||
|
||||
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);
|
||||
|
@ -8,7 +8,7 @@ BIO_f_null - null filter
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_f_null(void);
|
||||
const BIO_METHOD * BIO_f_null(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -12,7 +12,7 @@ BIO_ssl_shutdown - SSL BIO
|
||||
#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)
|
||||
|
@ -8,8 +8,8 @@ BIO_new, BIO_set, BIO_up_ref, BIO_free, BIO_vfree, BIO_free_all - BIO allocation
|
||||
|
||||
#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);
|
||||
|
@ -10,7 +10,7 @@ BIO_get_bind_mode, BIO_do_accept - accept BIO
|
||||
|
||||
#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);
|
||||
|
@ -11,7 +11,7 @@ BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO
|
||||
|
||||
#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)
|
||||
|
@ -11,7 +11,7 @@ BIO_set_nbio, BIO_do_connect - connect BIO
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_connect(void);
|
||||
const BIO_METHOD * BIO_s_connect(void);
|
||||
|
||||
BIO *BIO_new_connect(char *name);
|
||||
|
||||
|
@ -8,7 +8,7 @@ BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO
|
||||
|
||||
#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)
|
||||
|
@ -10,7 +10,7 @@ BIO_rw_filename - FILE bio
|
||||
|
||||
#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);
|
||||
|
||||
|
@ -9,8 +9,8 @@ BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
|
||||
|
||||
#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)
|
||||
|
@ -8,7 +8,7 @@ BIO_s_null - null data sink
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_null(void);
|
||||
const BIO_METHOD * BIO_s_null(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
@ -8,7 +8,7 @@ BIO_s_socket, BIO_new_socket - socket BIO
|
||||
|
||||
#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);
|
||||
|
@ -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);
|
||||
|
||||
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);
|
||||
|
||||
|
@ -310,7 +310,7 @@ typedef struct bio_method_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 */
|
||||
@ -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);
|
||||
|
||||
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(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);
|
||||
@ -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);
|
||||
|
||||
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_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
|
||||
BIO_METHOD *BIO_f_linebuffer(void);
|
||||
const BIO_METHOD *BIO_f_linebuffer(void);
|
||||
# endif
|
||||
BIO_METHOD *BIO_f_nbio_test(void);
|
||||
const BIO_METHOD *BIO_f_nbio_test(void);
|
||||
# ifndef OPENSSL_NO_DGRAM
|
||||
BIO_METHOD *BIO_s_datagram(void);
|
||||
const BIO_METHOD *BIO_s_datagram(void);
|
||||
# ifndef OPENSSL_NO_SCTP
|
||||
BIO_METHOD *BIO_s_datagram_sctp(void);
|
||||
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
||||
# 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);
|
||||
|
@ -83,7 +83,7 @@ void COMP_zlib_cleanup(void);
|
||||
|
||||
# ifdef HEADER_BIO_H
|
||||
# ifdef ZLIB
|
||||
BIO_METHOD *BIO_f_zlib(void);
|
||||
const BIO_METHOD *BIO_f_zlib(void);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
@ -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);
|
||||
|
||||
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);
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
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);
|
||||
|
@ -81,7 +81,7 @@ typedef struct bio_ssl_st {
|
||||
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,
|
||||
@ -93,7 +93,7 @@ static BIO_METHOD methods_sslp = {
|
||||
ssl_callback_ctrl,
|
||||
};
|
||||
|
||||
BIO_METHOD *BIO_f_ssl(void)
|
||||
const BIO_METHOD *BIO_f_ssl(void)
|
||||
{
|
||||
return (&methods_sslp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user