Avoid warnings on VC++ 2005.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 5 Dec 2005 17:21:22 +0000 (17:21 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 5 Dec 2005 17:21:22 +0000 (17:21 +0000)
ssl/d1_clnt.c
ssl/d1_srvr.c
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 f985afdb3eff5a35c978a515b27df31046ec41c7..2dd9da2fda0db2e29b286a9eddfe18c37c9726ce 100644 (file)
@@ -144,7 +144,7 @@ IMPLEMENT_dtls1_meth_func(DTLSv1_client_method,
 int dtls1_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;
@@ -544,7 +544,7 @@ int dtls1_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);
                RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
 
index 2b0578ff7fe00edd1e1319befb76e39bb034f782..962ae5688d25b8673a71a78b4be1c695a4636918 100644 (file)
@@ -145,7 +145,7 @@ IMPLEMENT_dtls1_meth_func(DTLSv1_server_method,
 int dtls1_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;
@@ -667,7 +667,7 @@ int dtls1_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);
                RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
                /* Do the message type and length last */
index 3cbc64257074b3586b7b68c95091528de88b8762..1d1110b6f0259f86610b25eea81cf6d3a55bd841 100644 (file)
@@ -88,7 +88,7 @@ IMPLEMENT_ssl23_meth_func(SSLv23_client_method,
 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;
@@ -236,7 +236,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 5bf37c94d683f50914f0a73a8f77d9b788f5c771..b33b699a1c926c4fdda7cac015fd25100ad0c460 100644 (file)
@@ -140,7 +140,7 @@ IMPLEMENT_ssl23_meth_func(SSLv23_server_method,
 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 d5eefbdc2a09427854112f1c585ca22ca94e6596..89f3f7d753c61e43e747e3300583a2894cdefdd0 100644 (file)
@@ -144,7 +144,7 @@ IMPLEMENT_ssl2_meth_func(SSLv2_client_method,
 
 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 f0a1d4c3a94795246cebd6565aa079ad13433c59..45943240f05b16132c296a94eb0066ec4116d041 100644 (file)
@@ -144,7 +144,7 @@ IMPLEMENT_ssl2_meth_func(SSLv2_server_method,
 
 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 7284c0aa4b95afc20dc200759fc0e4962070406c..3e1f256c264044e83cd72ec526be81432640d3ee 100644 (file)
@@ -159,7 +159,7 @@ IMPLEMENT_ssl3_meth_func(SSLv3_client_method,
 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;
@@ -541,7 +541,7 @@ 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 96a2602d07d4bae27e6f8f8d55228f9ca40a86fc..ee0ac436d066798440f085de14b86aa5f4359059 100644 (file)
@@ -164,7 +164,7 @@ IMPLEMENT_ssl3_meth_func(SSLv3_server_method,
 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;
@@ -1038,7 +1038,7 @@ 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 c274b94953348cfa3b5fbf5e045b6e7ac99f1dcb..d129acc329110b90d1704be92dcca629ab1855c6 100644 (file)
@@ -344,7 +344,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **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 f524f630d0727c1c8b5d931ead3b875af1bcbe8d..b79ac1c9a28dd09f63e1291df22b7d400b86475c 100644 (file)
@@ -1914,7 +1914,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 1da69cf787e1815e5cfbf01e3ffde9c7be12eb62..5286964e694142b651b15d997aad77ec817813f1 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;