From e756ea4722924e29d5e23f673e1bdf5287f21985 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 15 Sep 2008 16:53:20 +0000 Subject: [PATCH] Updates from stable branch. --- crypto/bio/bss_dgram.c | 14 +++++++------- crypto/bn/bn_nist.c | 1 - ssl/d1_pkt.c | 2 +- ssl/ssl_locl.h | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 1d203aeec5..c3da6dc82f 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -351,7 +351,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) { struct timeval *tv = (struct timeval *)ptr; int timeout = tv->tv_sec * 1000 + tv->tv_usec/1000; - if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIME0, + if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, (void*)&timeout, sizeof(timeout)) < 0) { perror("setsockopt"); ret = -1; } } @@ -366,8 +366,8 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) { int timeout, sz = sizeof(timeout); struct timeval *tv = (struct timeval *)ptr; - if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIME0, - (void*)&timeout, &sz)) < 0) + if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, + (void*)&timeout, &sz) < 0) { perror("getsockopt"); ret = -1; } else { @@ -389,7 +389,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) { struct timeval *tv = (struct timeval *)ptr; int timeout = tv->tv_sec * 1000 + tv->tv_usec/1000; - if (setsockopt(b->num, SOL_SOCKET, SO_SNDTIME0, + if (setsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO, (void*)&timeout, sizeof(timeout)) < 0) { perror("setsockopt"); ret = -1; } } @@ -404,8 +404,8 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) { int timeout, sz = sizeof(timeout); struct timeval *tv = (struct timeval *)ptr; - if (getsockopt(b->num, SOL_SOCKET, SO_SNDTIME0, - (void*)&timeout, &sz)) < 0) + if (getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO, + (void*)&timeout, &sz) < 0) { perror("getsockopt"); ret = -1; } else { @@ -425,7 +425,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) /* fall-through */ case BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP: #ifdef OPENSSL_SYS_WINDOWS - if ( data->_errno == ETIMEDOUT) + if ( data->_errno == WSAETIMEDOUT) #else if ( data->_errno == EAGAIN) #endif diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c index e7c3d6bac2..1fc94f55c3 100644 --- a/crypto/bn/bn_nist.c +++ b/crypto/bn/bn_nist.c @@ -713,7 +713,6 @@ int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, #define BN_NIST_521_TOP_MASK (BN_ULONG)0x1FF #endif int top, ret = 0; - BN_ULONG *r_d; BIGNUM *tmp; field = &_bignum_nist_p_521; /* just to make sure */ diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index e206b34e74..b2765ba801 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -1259,7 +1259,7 @@ int dtls1_write_bytes(SSL *s, int type, const void *buf_, int len) else s->s3->wnum += i; - return tot + i; + return i; } int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment) diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index 6cfccce9fa..735db39713 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -332,7 +332,7 @@ #define SSL_HIGH 0x00000080L #define SSL_FIPS 0x00000100L -/* we have used 000000ff - 24 bits left to go */ +/* we have used 000001ff - 23 bits left to go */ /* * Macros to check the export status and cipher strength for export ciphers. -- 2.25.1