Backport of other fixes to keep VC++ happy.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 30 Jan 2006 13:49:59 +0000 (13:49 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 30 Jan 2006 13:49:59 +0000 (13:49 +0000)
ssl/s23_clnt.c
ssl/s23_srvr.c
ssl/s2_clnt.c
ssl/s2_srvr.c
ssl/s3_clnt.c
ssl/s3_srvr.c
ssl/ssl_asn1.c
ssl/ssl_lib.c
ssl/ssl_sess.c

index 3ac0b62bac3571b6516d2fbb16e26e8c4f7294ce..86356731ea63c982b214eb64c9304b5959b78b6c 100644 (file)
@@ -106,7 +106,7 @@ SSL_METHOD *SSLv23_client_method(void)
 int ssl23_connect(SSL *s)
        {
        BUF_MEM *buf=NULL;
-       unsigned long Time=time(NULL);
+       unsigned long Time=(unsigned long)time(NULL);
        void (*cb)(const SSL *ssl,int type,int val)=NULL;
        int ret= -1;
        int new_state,state;
@@ -254,7 +254,7 @@ static int ssl23_client_hello(SSL *s)
 #endif
 
                p=s->s3->client_random;
-               Time=time(NULL);                        /* Time */
+               Time=(unsigned long)time(NULL);                 /* Time */
                l2n(Time,p);
                if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
                        return -1;
index 1612ba2b1de9d8da2a7439d29fbf22955f8ec5cc..b73abc448f8cd644b9951b3f8463f04217e89e67 100644 (file)
@@ -158,7 +158,7 @@ SSL_METHOD *SSLv23_server_method(void)
 int ssl23_accept(SSL *s)
        {
        BUF_MEM *buf;
-       unsigned long Time=time(NULL);
+       unsigned long Time=(unsigned long)time(NULL);
        void (*cb)(const SSL *ssl,int type,int val)=NULL;
        int ret= -1;
        int new_state,state;
index f22d6c0028dfe7f3f1898aabc0d67aa74a3734ec..eba04c715b3b3e8d1537c5618b757693fe2e4f58 100644 (file)
@@ -162,7 +162,7 @@ SSL_METHOD *SSLv2_client_method(void)
 
 int ssl2_connect(SSL *s)
        {
-       unsigned long l=time(NULL);
+       unsigned long l=(unsigned long)time(NULL);
        BUF_MEM *buf=NULL;
        int ret= -1;
        void (*cb)(const SSL *ssl,int type,int val)=NULL;
index 94aec664e1effcc825d00b6d4262641214e4242a..7a4992b7aac93c4d2817035027dbabf9c543ac94 100644 (file)
@@ -162,7 +162,7 @@ SSL_METHOD *SSLv2_server_method(void)
 
 int ssl2_accept(SSL *s)
        {
-       unsigned long l=time(NULL);
+       unsigned long l=(unsigned long)time(NULL);
        BUF_MEM *buf=NULL;
        int ret= -1;
        long num1;
index 9181fd81de4b8f3379a98b43c31d8fbe996c7b02..05194fdb31815fb7c5de1f580b567733c2c139f0 100644 (file)
@@ -165,7 +165,7 @@ SSL_METHOD *SSLv3_client_method(void)
 int ssl3_connect(SSL *s)
        {
        BUF_MEM *buf=NULL;
-       unsigned long Time=time(NULL),l;
+       unsigned long Time=(unsigned long)time(NULL),l;
        long num1;
        void (*cb)(const SSL *ssl,int type,int val)=NULL;
        int ret= -1;
@@ -533,7 +533,7 @@ static int ssl3_client_hello(SSL *s)
                /* else use the pre-loaded session */
 
                p=s->s3->client_random;
-               Time=time(NULL);                        /* Time */
+               Time=(unsigned long)time(NULL);                 /* Time */
                l2n(Time,p);
                if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
                    goto err;
index c4a1a7152382d5b4a9fb0f8f7714cedd8c3ea623..36fc39d7f82527b0753db53623102eb0808a1b8a 100644 (file)
@@ -173,7 +173,7 @@ SSL_METHOD *SSLv3_server_method(void)
 int ssl3_accept(SSL *s)
        {
        BUF_MEM *buf;
-       unsigned long l,Time=time(NULL);
+       unsigned long l,Time=(unsigned long)time(NULL);
        void (*cb)(const SSL *ssl,int type,int val)=NULL;
        long num1;
        int ret= -1;
@@ -954,7 +954,7 @@ static int ssl3_send_server_hello(SSL *s)
                {
                buf=(unsigned char *)s->init_buf->data;
                p=s->s3->server_random;
-               Time=time(NULL);                        /* Time */
+               Time=(unsigned long)time(NULL);                 /* Time */
                l2n(Time,p);
                if(RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
                        return -1;
index 4d5900ad2f250e12f15a9c35b453306e68d6c5a0..fc5fcce108f4f9834f280a719ca17c259e9ed91a 100644 (file)
@@ -344,7 +344,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char * const *pp,
                OPENSSL_free(ai.data); ai.data=NULL; ai.length=0;
                }
        else
-               ret->time=time(NULL);
+               ret->time=(unsigned long)time(NULL);
 
        ai.length=0;
        M_ASN1_D2I_get_EXP_opt(aip,d2i_ASN1_INTEGER,2);
index 6cdc7f6156c5dfdbba738cb3cc6faa92776569fa..2bd9a5af861169103f769090ba613069f32987ee 100644 (file)
@@ -1716,7 +1716,7 @@ void ssl_update_cache(SSL *s,int mode)
                        ?s->ctx->stats.sess_connect_good
                        :s->ctx->stats.sess_accept_good) & 0xff) == 0xff)
                        {
-                       SSL_CTX_flush_sessions(s->ctx,time(NULL));
+                       SSL_CTX_flush_sessions(s->ctx,(unsigned long)time(NULL));
                        }
                }
        }
index 868a207a1f7cfeaca3777fcd32d375e199e0febd..2ba8b9612e45384dfbcfaba6fa0763a7ef11ae32 100644 (file)
@@ -118,7 +118,7 @@ SSL_SESSION *SSL_SESSION_new(void)
        ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
        ss->references=1;
        ss->timeout=60*5+4; /* 5 minute timeout by default */
-       ss->time=time(NULL);
+       ss->time=(unsigned long)time(NULL);
        ss->prev=NULL;
        ss->next=NULL;
        ss->compress_meth=0;