Skip to content

Commit

Permalink
m_starttls: advertise tls cap only if SSL is possible
Browse files Browse the repository at this point in the history
  • Loading branch information
dwfreed committed Mar 12, 2024
1 parent 1ccc642 commit dd33557
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/m_starttls.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ mapi_clist_av1 starttls_clist[] = { &starttls_msgtab, NULL };

unsigned int CLICAP_TLS = 0;

static bool
tls_visible(struct Client *ignored)
{
return ircd_ssl_ok && get_ssld_count();
}

static struct ClientCapability capdata_tls = {
.visible = tls_visible,
.flags = CLICAP_FLAGS_PRIORITY,
};

Expand Down

0 comments on commit dd33557

Please sign in to comment.