Still haven't gotten this to work.  I moved the new SSL code into
an even simpler client program, similar to the ones in the demos
directories.  Now at least ERR_print_errors_fp() tells me something,
instead of just doing nothing like it did in the previous program.
No idea why that wasn't working before.  Anyway, on SSL_connect()
it now says:

4012:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown 
protocol:s23_clnt.c:463:

This is when trying to connect to https://www.apache-ssl.org/  Does this
ring any bells with anyone?  My current SSL code fragment is below.
---
Jef

         Jef Poskanzer  [EMAIL PROTECTED]  http://www.acme.com/jef/

#include <ssl.h>

    SSL_CTX* ssl_ctx;
    SSL* ssl;

    /* Make SSL connection. */
    SSL_load_error_strings();
    SSLeay_add_ssl_algorithms();
    ssl_ctx = SSL_CTX_new( SSLv23_client_method() );
    ssl = SSL_new( ssl_ctx );
    SSL_set_fd( ssl, sockfd );
    r = SSL_connect( ssl );
    if ( r <= 0 )
        {
        (void) fprintf(
            stderr, "%s: %s - SSL connection failed - %d\n", argv0, url, r );
        ERR_print_errors_fp( stderr );
        exit( 1 );
        }
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to