summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bio.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bio.h')
-rw-r--r--src/lib/libcrypto/bio/bio.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 97003b503c..b122c7069d 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -59,12 +59,13 @@
59#ifndef HEADER_BIO_H 59#ifndef HEADER_BIO_H
60#define HEADER_BIO_H 60#define HEADER_BIO_H
61 61
62#ifndef NO_FP_API 62#ifndef OPENSSL_NO_FP_API
63# include <stdio.h> 63# include <stdio.h>
64#endif 64#endif
65#include <stdarg.h> 65#include <stdarg.h>
66 66
67#include <openssl/crypto.h> 67#include <openssl/crypto.h>
68#include <openssl/e_os2.h>
68 69
69#ifdef __cplusplus 70#ifdef __cplusplus
70extern "C" { 71extern "C" {
@@ -179,7 +180,7 @@ extern "C" {
179#define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS) 180#define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS)
180#define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY) 181#define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY)
181 182
182/* The next two are used in conjunction with the 183/* The next three are used in conjunction with the
183 * BIO_should_io_special() condition. After this returns true, 184 * BIO_should_io_special() condition. After this returns true,
184 * BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO 185 * BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO
185 * stack and return the 'reason' for the special and the offending BIO. 186 * stack and return the 'reason' for the special and the offending BIO.
@@ -188,6 +189,8 @@ extern "C" {
188#define BIO_RR_SSL_X509_LOOKUP 0x01 189#define BIO_RR_SSL_X509_LOOKUP 0x01
189/* Returned from the connect BIO when a connect would have blocked */ 190/* Returned from the connect BIO when a connect would have blocked */
190#define BIO_RR_CONNECT 0x02 191#define BIO_RR_CONNECT 0x02
192/* Returned from the accept BIO when an accept would have blocked */
193#define BIO_RR_ACCEPT 0x03
191 194
192/* These are passed by the BIO callback */ 195/* These are passed by the BIO callback */
193#define BIO_CB_FREE 0x01 196#define BIO_CB_FREE 0x01
@@ -215,7 +218,7 @@ typedef struct bio_st BIO;
215 218
216typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long); 219typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long);
217 220
218#ifndef WIN16 221#ifndef OPENSSL_SYS_WIN16
219typedef struct bio_method_st 222typedef struct bio_method_st
220 { 223 {
221 int type; 224 int type;
@@ -356,8 +359,8 @@ typedef struct bio_f_buffer_ctx_struct
356#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port) 359#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
357#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) 360#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
358#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) 361#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
359#define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2) 362#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
360#define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port) 363#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3)
361 364
362 365
363#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) 366#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
@@ -431,7 +434,7 @@ int BIO_read_filename(BIO *b,const char *name);
431#define BIO_set_ssl_renegotiate_bytes(b,num) \ 434#define BIO_set_ssl_renegotiate_bytes(b,num) \
432 BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL); 435 BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);
433#define BIO_get_num_renegotiates(b) \ 436#define BIO_get_num_renegotiates(b) \
434 BIO_ctrl(b,BIO_C_SET_SSL_NUM_RENEGOTIATES,0,NULL); 437 BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL);
435#define BIO_set_ssl_renegotiate_timeout(b,seconds) \ 438#define BIO_set_ssl_renegotiate_timeout(b,seconds) \
436 BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL); 439 BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);
437 440
@@ -464,8 +467,9 @@ int BIO_read_filename(BIO *b,const char *name);
464size_t BIO_ctrl_pending(BIO *b); 467size_t BIO_ctrl_pending(BIO *b);
465size_t BIO_ctrl_wpending(BIO *b); 468size_t BIO_ctrl_wpending(BIO *b);
466#define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) 469#define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
467#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0,(bio_info_cb **)(cbp)) 470#define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
468#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,(bio_info_cb *)(cb)) 471 cbp)
472#define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
469 473
470/* For the BIO_f_buffer() type */ 474/* For the BIO_f_buffer() type */
471#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) 475#define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
@@ -493,8 +497,8 @@ int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
493unsigned long BIO_number_read(BIO *bio); 497unsigned long BIO_number_read(BIO *bio);
494unsigned long BIO_number_written(BIO *bio); 498unsigned long BIO_number_written(BIO *bio);
495 499
496# ifndef NO_FP_API 500# ifndef OPENSSL_NO_FP_API
497# if defined(WIN16) && defined(_WINDLL) 501# if defined(OPENSSL_SYS_WIN16) && defined(_WINDLL)
498BIO_METHOD *BIO_s_file_internal(void); 502BIO_METHOD *BIO_s_file_internal(void);
499BIO *BIO_new_file_internal(char *filename, char *mode); 503BIO *BIO_new_file_internal(char *filename, char *mode);
500BIO *BIO_new_fp_internal(FILE *stream, int close_flag); 504BIO *BIO_new_fp_internal(FILE *stream, int close_flag);
@@ -536,7 +540,7 @@ int BIO_nread(BIO *bio, char **buf, int num);
536int BIO_nwrite0(BIO *bio, char **buf); 540int BIO_nwrite0(BIO *bio, char **buf);
537int BIO_nwrite(BIO *bio, char **buf, int num); 541int BIO_nwrite(BIO *bio, char **buf, int num);
538 542
539#ifndef WIN16 543#ifndef OPENSSL_SYS_WIN16
540long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi, 544long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi,
541 long argl,long ret); 545 long argl,long ret);
542#else 546#else
@@ -555,7 +559,7 @@ BIO_METHOD *BIO_s_bio(void);
555BIO_METHOD *BIO_s_null(void); 559BIO_METHOD *BIO_s_null(void);
556BIO_METHOD *BIO_f_null(void); 560BIO_METHOD *BIO_f_null(void);
557BIO_METHOD *BIO_f_buffer(void); 561BIO_METHOD *BIO_f_buffer(void);
558#ifdef VMS 562#ifdef OPENSSL_SYS_VMS
559BIO_METHOD *BIO_f_linebuffer(void); 563BIO_METHOD *BIO_f_linebuffer(void);
560#endif 564#endif
561BIO_METHOD *BIO_f_nbio_test(void); 565BIO_METHOD *BIO_f_nbio_test(void);
@@ -588,8 +592,6 @@ int BIO_sock_init(void );
588void BIO_sock_cleanup(void); 592void BIO_sock_cleanup(void);
589int BIO_set_tcp_ndelay(int sock,int turn_on); 593int BIO_set_tcp_ndelay(int sock,int turn_on);
590 594
591void ERR_load_BIO_strings(void );
592
593BIO *BIO_new_socket(int sock, int close_flag); 595BIO *BIO_new_socket(int sock, int close_flag);
594BIO *BIO_new_fd(int fd, int close_flag); 596BIO *BIO_new_fd(int fd, int close_flag);
595BIO *BIO_new_connect(char *host_port); 597BIO *BIO_new_connect(char *host_port);
@@ -615,6 +617,7 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
615/* The following lines are auto generated by the script mkerr.pl. Any changes 617/* The following lines are auto generated by the script mkerr.pl. Any changes
616 * made after this point may be overwritten when the script is next run. 618 * made after this point may be overwritten when the script is next run.
617 */ 619 */
620void ERR_load_BIO_strings(void);
618 621
619/* Error codes for the BIO functions. */ 622/* Error codes for the BIO functions. */
620 623
@@ -670,6 +673,7 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
670#define BIO_R_NO_HOSTNAME_SPECIFIED 112 673#define BIO_R_NO_HOSTNAME_SPECIFIED 112
671#define BIO_R_NO_PORT_DEFINED 113 674#define BIO_R_NO_PORT_DEFINED 113
672#define BIO_R_NO_PORT_SPECIFIED 114 675#define BIO_R_NO_PORT_SPECIFIED 114
676#define BIO_R_NO_SUCH_FILE 128
673#define BIO_R_NULL_PARAMETER 115 677#define BIO_R_NULL_PARAMETER 115
674#define BIO_R_TAG_MISMATCH 116 678#define BIO_R_TAG_MISMATCH 116
675#define BIO_R_UNABLE_TO_BIND_SOCKET 117 679#define BIO_R_UNABLE_TO_BIND_SOCKET 117
@@ -684,4 +688,3 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
684} 688}
685#endif 689#endif
686#endif 690#endif
687