fordesign <[EMAIL PROTECTED]> is having problems with SSL_CTX_new() 
(in ssl_lib.c) under purify.  It fails at the line

    ssl_create_cipher_list(ret->method,
        &ret->cipher_list,&ret->cipher_list_by_id,
        SSL_DEFAULT_CIPHER_LIST);
    if (ret->cipher_list == NULL
        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0)
        {
        SSLerr(SSL_F_SSL_CTX_NEW,SSL_R_LIBRARY_HAS_NO_CIPHERS);
        goto err2;
        }    

even in a ten-line demo program (see below for source).

I've asked him to step through ssl_create_cipher_list()
to see where it starts behaving differently under Purify.

Does anyone on this list use Purify?  It'd be nice to
see if this bug can be reproduced, it should be easy to find.
- Dan

Source for the tiny testing program, plus comments from his message:
   
#include <openssl/ssl.h>
#include <stdio.h>
main()
{
    int ret;
    SSL_METHOD *meth;
    SSL_CTX *ctx;

    ret = SSL_library_init();
    if (ret < 1) {
        fprintf(stderr, "Can't init SSL.\n");
        exit(1);
    }
    SSL_load_error_strings();

    meth = SSLv3_client_method();
    if (!meth) {
        fprintf(stderr, "Can't get meth.\n");
        exit(1);
    }

    ctx = SSL_CTX_new(meth);
    if (!ctx) {
        fprintf(stderr, "Can't get ctx.\n");
        exit(1);
    }

    printf("Success.\n");
    exit(0);
}

followed are the testing result:
    bash-2.02$ gcc -g -I../include -DSUNOS test2.cpp -lsocket -L../lib -lssl -lcrypto
    bash-2.02$ a.out
    Success.
    bash-2.02$ purify gcc -g -I../include -DSUNOS test2.cpp -lsocket -L../lib -lssl 
-lcrypto
    Purify 5.1 Solaris 2 (32-bit), Copyright (C) 1992-2000 Rational Software Corp. All 
rights reserved. 
    Instrumenting: cchc1iI0.o  Linking
    gcc: file path prefix `/usr/local/pure/purify-5.1-solaris2/nld32/' never used
    bash-2.02$ a.out
    Purify or PureCoverage slave: Warning: Unknown language "zh", using English.
    Can't get ctx.

my openssl install steps:
    ./config --prefix=/xxx/xxx/xxx/  --openssldir=/xxx/xxx/xxx/openssl (/xxx/xxx/xxx/ 
is not /usr/local)
    ./make
    ./make test
    ./make install
can anyone reproduct this error on his machine?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to