[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Fetch socket error/SSL error in error_cb ?



I'm working on a libevent-based server. The server is working great
with RSA-based certs. But something is blowing up with ECDSA-based
certs. OpenSSL's s_client is dying with:


My accept_cb performs the following:

    bufferevent* bin = NULL;
    bin = bufferevent_openssl_socket_new(base, fd, ssl,
BUFFEREVENT_SSL_ACCEPTING,
            BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS);

    bufferevent_setcb(bin, proxy_server_read_cb, NULL, error_cb, NULL);
    bufferevent_enable(bin, EV_READ);

When things blow up on accept(), I land here:

  void error_cb(struct bufferevent *bev, short what, void *arg)
  {
    LogDebug("error_cb (bufferevent)");

    if (what & (BEV_EVENT_EOF | BEV_EVENT_ERROR))
    {
        ...
        bufferevent_free(bev);
    }
  }

befferevent.h mentions SSL a few times, but there does not appear to
be a function retrieve the SSL object (unless I'm mis-reading the
header).

How do I access the SSL object associated with the bufferevent bev?

Thanks in advance.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.