On 07/24/2011 03:55 AM, Michael Tuexen wrote:
On Jul 24, 2011, at 12:40 AM, com...@gmx.ch wrote:
I got some code which uses nonblocking dtls via self fed bios.
You are supposed to call DTLSv1_listen() to handle the front state...

#define DTLSv1_listen(ssl, peer) \
       SSL_ctrl(ssl,DTLS_CTRL_LISTEN,0, (void *)peer)

long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg)
       case DTLS_CTRL_LISTEN:
               ret = dtls1_listen(s, parg);
               break;

int dtls1_listen(SSL *s, struct sockaddr *client)
       {
       int ret;

       SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
       s->d1->listen = 1;

       ret = SSL_accept(s);
       if (ret <= 0) return ret;

       (void) BIO_dgram_get_peer(SSL_get_rbio(s), client);
       return 1;
       }


Correct me if I'm wrong, but I don't see how DTLSv1_listen could work
with nonblocking io at all.
Besides, this requires BIO_dgrams - which is not my usecase either, I
got BIO_s_mem.

Robin is always suggesting to use 1.0.0 ...
Does not make any difference, the code cited is copied from 1.0.0.


Markus
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to