Hi,

I'm trying to add SSL-support to my application.
What I'm doing is basically this:
init (same for client and server):
---------------------------------
        SSL_library_init();
        SSL_load_error_strings();
        bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
        meth = SSLv23_method();
        ctx = SSL_CTX_new(meth);

Client:
------
        socket_h_to = connect(...);
      ssl_h_to = SSL_new(ctx);
      sbio = BIO_new_socket(socket_h_to, BIO_NOCLOSE);
      SSL_set_bio(ssl_h_to, sbio, sbio);
      int dummy = SSL_connect(ssl_h_to);
      if (dummy <= 0)
      {
        log(LOG_INFO, "do_http_request(): problem starting SSL connection
%d", SSL_get_error(ssl_h_to, dummy));
        }
dummy gets <= 0 and the logging tells me an error 1 (SSL_ERROR_SSL) occured

server:
------
        socket_h_from = accept(...); // and fork
      sbio = BIO_new_socket(socket_h_from, BIO_NOCLOSE);
      ssl_h_to = SSL_new(cpnt -> ctx);
      SSL_set_bio(ssl_h_to, sbio, sbio);
      if (SSL_accept(ssl_h_to) <= 0)
      {
          // log error
      }
dummy gets <= 0 and the logging tells me an error 1 (SSL_ERROR_SSL) occured

Anyone who knows what I'm doing wrong here?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to