summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-09-15 16:53:20 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-09-15 16:53:20 +0000
commite756ea4722924e29d5e23f673e1bdf5287f21985 (patch)
tree5af901736b6cb4ed5e44085c0eccb71cc9743b59
parent9fce44377557864088ed58cf65d7077d1cd28331 (diff)
Updates from stable branch.
-rw-r--r--crypto/bio/bss_dgram.c14
-rw-r--r--crypto/bn/bn_nist.c1
-rw-r--r--ssl/d1_pkt.c2
-rw-r--r--ssl/ssl_locl.h2
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.