diff options
author | venaas <venaas> | 2007-02-16 11:53:27 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-02-16 11:53:27 +0000 |
commit | 6f0105e2af9ee7d1e5bcdab93128535542ad7ef5 (patch) | |
tree | cbcfc822d2479ddf8d18147eb6ddd5c4eb9dce8b | |
parent | 60ec14c13bea9d86790a3905021ccd20760987b3 (diff) |
don't exit when ssl_accept fails
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@62 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r-- | radsecproxy.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index 6734fd2..c1df34f 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1479,13 +1479,14 @@ void *tlsserverrd(void *arg) { if (SSL_accept(ssl) <= 0) { while ((error = ERR_get_error())) err("tlsserverrd: SSL: %s", ERR_error_string(error, NULL)); - errx("accept failed, child exiting"); + printf("SSL_accept failed\n"); + goto errexit; } - if (tlsverifycert(&client->peer)) { - if (pthread_create(&tlsserverwrth, NULL, tlsserverwr, (void *)client)) - errx("pthread_create failed"); - + if (pthread_create(&tlsserverwrth, NULL, tlsserverwr, (void *)client)) { + err("pthread_create failed"); + goto errexit; + } for (;;) { buf = radtlsget(client->peer.ssl); if (!buf) @@ -1508,6 +1509,8 @@ void *tlsserverrd(void *arg) { printf("tlsserverrd: waiting for writer to end\n"); pthread_join(tlsserverwrth, NULL); } + + errexit: s = SSL_get_fd(ssl); SSL_free(ssl); close(s); |