Hi,

following I will show the code line excerpt affected.

OpenSSL version: 1.0.1f
Operating System: Windows7
C++ Compiler: VS2005
Source File: ssl/s23_clnt.c
Affected Line: 286

Excerpt:

int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, int
len)
    {
    int send_time = 0;

    if (len < 4)
        return 0;
    if (server)
        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
    else
        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
    if (send_time)
        {
        unsigned long Time = time(NULL); //<----- LINE: 286
        unsigned char *p = result;
        l2n(Time, p);
        return RAND_pseudo_bytes(p, len-4);
        }
    else
        return RAND_pseudo_bytes(result, len);
    }

The call to "time(NULL)" produces a warning because of type mismatch
assignment.
Afterwards this will be treated as error and fails the build for debug
versions.
The workarround currently used:

                      unsigned long Time = (unsigned long)time(NULL);

works successful within debug build.
May be, you have a better solution for, but this ensures qualified debug
builds.

BTW: With this patch OpenSSL compiles successful using VS2005 at platforms
win32/x64 in both release and debug (statically and dll).

kind regards

Heiko Rabe

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to