diff options
author | Jacques Vidrine <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
---|---|---|
committer | Jacques Vidrine <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
commit | c1803d783676ddc1f7655e0a58c00f35ec8c4f45 (patch) | |
tree | a6133c35ab337984fbbd26293f8b1ad7a958132b /crypto/openssl/crypto/bio | |
parent | a21b1b381ecca3813b44ac652d05a5133d3f4e2b (diff) | |
download | src-c1803d783676ddc1f7655e0a58c00f35ec8c4f45.tar.gz src-c1803d783676ddc1f7655e0a58c00f35ec8c4f45.zip |
Import of OpenSSL 0.9.6d.
Notes
Notes:
svn path=/vendor-crypto/openssl/dist/; revision=100928
Diffstat (limited to 'crypto/openssl/crypto/bio')
-rw-r--r-- | crypto/openssl/crypto/bio/b_print.c | 9 | ||||
-rw-r--r-- | crypto/openssl/crypto/bio/b_sock.c | 4 | ||||
-rw-r--r-- | crypto/openssl/crypto/bio/bf_lbuf.c | 12 | ||||
-rw-r--r-- | crypto/openssl/crypto/bio/bio.h | 4 | ||||
-rw-r--r-- | crypto/openssl/crypto/bio/bss_bio.c | 7 | ||||
-rw-r--r-- | crypto/openssl/crypto/bio/bss_log.c | 2 |
6 files changed, 23 insertions, 15 deletions
diff --git a/crypto/openssl/crypto/bio/b_print.c b/crypto/openssl/crypto/bio/b_print.c index f0a50c29bed5..bbd510170b51 100644 --- a/crypto/openssl/crypto/bio/b_print.c +++ b/crypto/openssl/crypto/bio/b_print.c @@ -716,12 +716,13 @@ doapr_outch( if (buffer) { while (*currlen >= *maxlen) { if (*buffer == NULL) { - assert(*sbuffer != NULL); if (*maxlen == 0) *maxlen = 1024; *buffer = OPENSSL_malloc(*maxlen); - if (*currlen > 0) + if (*currlen > 0) { + assert(*sbuffer != NULL); memcpy(*buffer, *sbuffer, *currlen); + } *sbuffer = NULL; } else { *maxlen += 1024; @@ -761,7 +762,9 @@ int BIO_vprintf (BIO *bio, const char *format, va_list args) { int ret; size_t retlen; - MS_STATIC char hugebuf[1024*10]; + char hugebuf[1024*2]; /* Was previously 10k, which is unreasonable + in small-stack environments, like threads + or DOS programs. */ char *hugebufp = hugebuf; size_t hugebufsize = sizeof(hugebuf); char *dynbuf = NULL; diff --git a/crypto/openssl/crypto/bio/b_sock.c b/crypto/openssl/crypto/bio/b_sock.c index 7dfcbab769cd..8fb0716e7fb5 100644 --- a/crypto/openssl/crypto/bio/b_sock.c +++ b/crypto/openssl/crypto/bio/b_sock.c @@ -72,9 +72,9 @@ #endif #ifdef SO_MAXCONN -#define MAX_LISTEN SOMAXCONN -#elif defined(SO_MAXCONN) #define MAX_LISTEN SO_MAXCONN +#elif defined(SOMAXCONN) +#define MAX_LISTEN SOMAXCONN #else #define MAX_LISTEN 32 #endif diff --git a/crypto/openssl/crypto/bio/bf_lbuf.c b/crypto/openssl/crypto/bio/bf_lbuf.c index 7bcf8ed9413e..ec0f7eb0b7ee 100644 --- a/crypto/openssl/crypto/bio/bf_lbuf.c +++ b/crypto/openssl/crypto/bio/bf_lbuf.c @@ -200,7 +200,7 @@ static int linebuffer_write(BIO *b, const char *in, int inl) } } -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, "<*<", 3); #endif i=BIO_write(b->next_bio, @@ -210,13 +210,13 @@ BIO_write(b->next_bio, "<*<", 3); ctx->obuf_len = orig_olen; BIO_copy_next_retry(b); -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, ">*>", 3); #endif if (i < 0) return((num > 0)?num:i); if (i == 0) return(num); } -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, ">*>", 3); #endif if (i < ctx->obuf_len) @@ -229,20 +229,20 @@ BIO_write(b->next_bio, ">*>", 3); buffer if a NL was found and there is anything to write. */ if ((foundnl || p - in > ctx->obuf_size) && p - in > 0) { -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, "<*<", 3); #endif i=BIO_write(b->next_bio,in,p - in); if (i <= 0) { BIO_copy_next_retry(b); -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, ">*>", 3); #endif if (i < 0) return((num > 0)?num:i); if (i == 0) return(num); } -#ifdef DEBUG +#if 0 BIO_write(b->next_bio, ">*>", 3); #endif num+=i; diff --git a/crypto/openssl/crypto/bio/bio.h b/crypto/openssl/crypto/bio/bio.h index 3777f2866bdf..fd3aaa05856e 100644 --- a/crypto/openssl/crypto/bio/bio.h +++ b/crypto/openssl/crypto/bio/bio.h @@ -356,8 +356,8 @@ typedef struct bio_f_buffer_ctx_struct #define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port) #define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0) #define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1) -#define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2) -#define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port) +#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2) +#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3) #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) diff --git a/crypto/openssl/crypto/bio/bss_bio.c b/crypto/openssl/crypto/bio/bss_bio.c index 4614ad44dd1a..d836e3bc3b61 100644 --- a/crypto/openssl/crypto/bio/bss_bio.c +++ b/crypto/openssl/crypto/bio/bss_bio.c @@ -23,7 +23,12 @@ #include <openssl/crypto.h> #include "openssl/e_os.h" -#ifndef SSIZE_MAX + +/* VxWorks defines SSiZE_MAX with an empty value causing compile errors */ +#if defined(VXWORKS) +# undef SSIZE_MAX +# define SSIZE_MAX INT_MAX +#elif !defined(SSIZE_MAX) # define SSIZE_MAX INT_MAX #endif diff --git a/crypto/openssl/crypto/bio/bss_log.c b/crypto/openssl/crypto/bio/bss_log.c index 1edf16a76fd8..7ba2acad43b5 100644 --- a/crypto/openssl/crypto/bio/bss_log.c +++ b/crypto/openssl/crypto/bio/bss_log.c @@ -75,7 +75,7 @@ # include <starlet.h> #elif defined(__ultrix) # include <sys/syslog.h> -#elif !defined(MSDOS) /* Unix */ +#elif !defined(MSDOS) && !defined(VXWORKS) /* Unix */ # include <syslog.h> #endif |