Updates from stable branch.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 15 Sep 2008 16:53:20 +0000 (16:53 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 15 Sep 2008 16:53:20 +0000 (16:53 +0000)
crypto/bio/bss_dgram.c
crypto/bn/bn_nist.c
ssl/d1_pkt.c
ssl/ssl_locl.h

index 1d203aeec554f77f27bbf86e14361364db092672..c3da6dc82fa9e9750249b81b97f609ff8a39f04c 100644 (file)
@@ -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
index e7c3d6bac2730425814496f21c006ec736ae8278..1fc94f55c32cb13286cd7e26256fcc5a175e1c00 100644 (file)
@@ -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 */
index e206b34e74242ede489f24c09599f17fe7331e8d..b2765ba8019ff70e5c05f4ff82e3db7ad1347f96 100644 (file)
@@ -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)
index 6cfccce9fa4b4f288e250c20e3ebb7e67b071f5f..735db3971329118a6ca0c0aeb14166e8d0d36cc5 100644 (file)
 #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.