Updates from stable branch.

This commit is contained in:
Dr. Stephen Henson 2008-09-15 16:53:20 +00:00
parent 9fce443775
commit e756ea4722
4 changed files with 9 additions and 10 deletions

View 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

View 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 */

View 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)

View File

@ -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.