1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 03:23:12 +02:00

+- Some small SSL fixes ..

This commit is contained in:
stskeeps
2001-02-19 18:13:53 +00:00
parent a28500faae
commit b7b2155573
2 changed files with 12 additions and 5 deletions
+1
View File
@@ -224,3 +224,4 @@
- stats-server and services-server are no longer required (missing = disabled services aliases)
- socks set {} options are now optional. Defaults are used if missing
- If an invalid ban or except is found, it is removed
- Some small SSL fixes ..
+11 -5
View File
@@ -108,12 +108,18 @@ int ssl_handshake(aClient *cptr)
CHK_NULL(cptr->ssl);
SSL_set_fd((SSL *) cptr->ssl, cptr->fd);
set_non_blocking(cptr->fd, cptr);
/*
* if necessary, SSL_write() will negotiate a TLS/SSL session, if not already explicitly
* performed by SSL_connect() or SSL_accept(). If the peer requests a
* re-negotiation, it will be performed transparently during the SSL_write() operation.
* The behaviour of SSL_write() depends on the underlying BIO.
*
*/
err = SSL_accept((SSL *) cptr->ssl);
if ((err) == -1)
{
sendto_umode(UMODE_JUNK, "Lost connection to %s:Error in SSL_accept()",
get_client_name(cptr, TRUE));
return 0;
if (err == -1)
{
/* wtf. it works, so ? */
return -1;
}
/* Get client's certificate (note: beware of dynamic