| 505 |
|
assert(client_p->connection->fd); |
| 506 |
|
assert(client_p->connection->fd == F); |
| 507 |
|
|
| 508 |
< |
tls_handshake_status_t ret = tls_handshake(&F->ssl, TLS_ROLE_CLIENT, &sslerr); |
| 508 |
> |
tls_handshake_status_t ret = tls_handshake(&F->tls, TLS_ROLE_CLIENT, &sslerr); |
| 509 |
|
if (ret != TLS_HANDSHAKE_DONE) |
| 510 |
|
{ |
| 511 |
|
if ((event_base->time.sec_monotonic - client_p->connection->created_monotonic) > TLS_HANDSHAKE_TIMEOUT) |
| 537 |
|
|
| 538 |
|
comm_settimeout(F, 0, NULL, NULL); |
| 539 |
|
|
| 540 |
< |
if (tls_verify_cert(&F->ssl, ConfigServerInfo.message_digest_algorithm, &client_p->certfp) == false) |
| 540 |
> |
if (tls_verify_cert(&F->tls, ConfigServerInfo.message_digest_algorithm, &client_p->certfp) == false) |
| 541 |
|
ilog(LOG_TYPE_IRCD, "Server %s!%s@%s gave bad TLS client certificate", |
| 542 |
|
client_p->name, client_p->username, client_p->host); |
| 543 |
|
|
| 552 |
|
assert(client_p->connection->fd); |
| 553 |
|
assert(client_p->connection->fd == F); |
| 554 |
|
|
| 555 |
< |
if (tls_new(&F->ssl, F->fd, TLS_ROLE_CLIENT) == false) |
| 555 |
> |
if (tls_new(&F->tls, F->fd, TLS_ROLE_CLIENT) == false) |
| 556 |
|
{ |
| 557 |
|
SetDead(client_p); |
| 558 |
|
exit_client(client_p, "TLS context initialization failed"); |
| 560 |
|
} |
| 561 |
|
|
| 562 |
|
if (!EmptyString(conf->cipher_list)) |
| 563 |
< |
tls_set_ciphers(&F->ssl, conf->cipher_list); |
| 563 |
> |
tls_set_ciphers(&F->tls, conf->cipher_list); |
| 564 |
|
|
| 565 |
|
server_tls_handshake(F, client_p); |
| 566 |
|
} |
| 618 |
|
return; |
| 619 |
|
} |
| 620 |
|
|
| 621 |
< |
if (IsConfSSL(conf)) |
| 621 |
> |
if (IsConfTLS(conf)) |
| 622 |
|
{ |
| 623 |
|
server_tls_connect_init(client_p, conf, F); |
| 624 |
|
return; |