ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_bsd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/s_bsd.c (file contents):
Revision 9156 by michael, Wed Jan 1 09:58:45 2020 UTC vs.
Revision 9157 by michael, Mon Jan 13 14:56:38 2020 UTC

# Line 158 | Line 158 | ssl_handshake(fde_t *F, void *data)
158    assert(client_p->connection->fd);
159    assert(client_p->connection->fd == F);
160  
161 <  tls_handshake_status_t ret = tls_handshake(&F->ssl, TLS_ROLE_SERVER, NULL);
161 >  tls_handshake_status_t ret = tls_handshake(&F->tls, TLS_ROLE_SERVER, NULL);
162    if (ret != TLS_HANDSHAKE_DONE)
163    {
164      if ((event_base->time.sec_monotonic - client_p->connection->created_monotonic) > TLS_HANDSHAKE_TIMEOUT)
# Line 183 | Line 183 | ssl_handshake(fde_t *F, void *data)
183  
184    comm_settimeout(F, 0, NULL, NULL);
185  
186 <  if (tls_verify_cert(&F->ssl, ConfigServerInfo.message_digest_algorithm, &client_p->certfp) == false)
186 >  if (tls_verify_cert(&F->tls, ConfigServerInfo.message_digest_algorithm, &client_p->certfp) == false)
187      ilog(LOG_TYPE_IRCD, "Client %s!%s@%s gave bad TLS client certificate",
188           client_p->name, client_p->username, client_p->host);
189  
# Line 202 | Line 202 | add_connection(struct Listener *listener
202   {
203    struct Client *client_p = client_make(NULL);
204  
205 <  client_p->connection->fd = fd_open(fd, true, (listener->flags & LISTENER_SSL) ?
206 <                                     "Incoming SSL connection" : "Incoming connection");
205 >  client_p->connection->fd = fd_open(fd, true, (listener->flags & LISTENER_TLS) ?
206 >                                     "Incoming TLS connection" : "Incoming connection");
207  
208    /*
209     * copy address to 'sockhost' as a string, copy it to host too
# Line 226 | Line 226 | add_connection(struct Listener *listener
226    client_p->connection->listener = listener;
227    ++listener->ref_count;
228  
229 <  if (listener->flags & LISTENER_SSL)
229 >  if (listener->flags & LISTENER_TLS)
230    {
231 <    if (tls_new(&client_p->connection->fd->ssl, fd, TLS_ROLE_SERVER) == false)
231 >    if (tls_new(&client_p->connection->fd->tls, fd, TLS_ROLE_SERVER) == false)
232      {
233        SetDead(client_p);
234        exit_client(client_p, "TLS context initialization failed");
235        return;
236      }
237  
238 <    AddFlag(client_p, FLAGS_SSL);
238 >    AddFlag(client_p, FLAGS_TLS);
239      ssl_handshake(client_p->connection->fd, client_p);
240    }
241    else

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)