On Tue, Jun 04, 2002 at 08:48:58PM +0200, Folkert van Heusden wrote:
> 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
Where do you load the private key and certificate on the server side?
Anyway, please use the ERR_get_error() family of functions to find out
more about the error condition.
Best regards,
Lutz
--
Lutz Jaenicke [EMAIL PROTECTED]
http://www.aet.TU-Cottbus.DE/personen/jaenicke/
BTU Cottbus, Allgemeine Elektrotechnik
Universitaetsplatz 3-4, D-03044 Cottbus
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]