starttls: take ownership of 'tls' capability
This commit is contained in:
parent
32df5e96a6
commit
0416a2cc86
3 changed files with 20 additions and 5 deletions
|
@ -67,11 +67,9 @@ extern unsigned int CLICAP_SASL;
|
||||||
extern unsigned int CLICAP_ACCOUNT_NOTIFY;
|
extern unsigned int CLICAP_ACCOUNT_NOTIFY;
|
||||||
extern unsigned int CLICAP_EXTENDED_JOIN;
|
extern unsigned int CLICAP_EXTENDED_JOIN;
|
||||||
extern unsigned int CLICAP_AWAY_NOTIFY;
|
extern unsigned int CLICAP_AWAY_NOTIFY;
|
||||||
extern unsigned int CLICAP_TLS;
|
|
||||||
extern unsigned int CLICAP_USERHOST_IN_NAMES;
|
extern unsigned int CLICAP_USERHOST_IN_NAMES;
|
||||||
extern unsigned int CLICAP_CAP_NOTIFY;
|
extern unsigned int CLICAP_CAP_NOTIFY;
|
||||||
extern unsigned int CLICAP_CHGHOST;
|
extern unsigned int CLICAP_CHGHOST;
|
||||||
extern unsigned int CLICAP_ACCOUNT_TAG;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX: this is kind of ugly, but this allows us to have backwards
|
* XXX: this is kind of ugly, but this allows us to have backwards
|
||||||
|
|
|
@ -100,7 +100,6 @@ unsigned int CLICAP_SASL;
|
||||||
unsigned int CLICAP_ACCOUNT_NOTIFY;
|
unsigned int CLICAP_ACCOUNT_NOTIFY;
|
||||||
unsigned int CLICAP_EXTENDED_JOIN;
|
unsigned int CLICAP_EXTENDED_JOIN;
|
||||||
unsigned int CLICAP_AWAY_NOTIFY;
|
unsigned int CLICAP_AWAY_NOTIFY;
|
||||||
unsigned int CLICAP_TLS;
|
|
||||||
unsigned int CLICAP_USERHOST_IN_NAMES;
|
unsigned int CLICAP_USERHOST_IN_NAMES;
|
||||||
unsigned int CLICAP_CAP_NOTIFY;
|
unsigned int CLICAP_CAP_NOTIFY;
|
||||||
unsigned int CLICAP_CHGHOST;
|
unsigned int CLICAP_CHGHOST;
|
||||||
|
@ -148,7 +147,6 @@ init_builtin_capabs(void)
|
||||||
CLICAP_ACCOUNT_NOTIFY = capability_put(cli_capindex, "account-notify", NULL);
|
CLICAP_ACCOUNT_NOTIFY = capability_put(cli_capindex, "account-notify", NULL);
|
||||||
CLICAP_EXTENDED_JOIN = capability_put(cli_capindex, "extended-join", NULL);
|
CLICAP_EXTENDED_JOIN = capability_put(cli_capindex, "extended-join", NULL);
|
||||||
CLICAP_AWAY_NOTIFY = capability_put(cli_capindex, "away-notify", NULL);
|
CLICAP_AWAY_NOTIFY = capability_put(cli_capindex, "away-notify", NULL);
|
||||||
CLICAP_TLS = capability_put(cli_capindex, "tls", NULL);
|
|
||||||
CLICAP_USERHOST_IN_NAMES = capability_put(cli_capindex, "userhost-in-names", NULL);
|
CLICAP_USERHOST_IN_NAMES = capability_put(cli_capindex, "userhost-in-names", NULL);
|
||||||
CLICAP_CAP_NOTIFY = capability_put(cli_capindex, "cap-notify", NULL);
|
CLICAP_CAP_NOTIFY = capability_put(cli_capindex, "cap-notify", NULL);
|
||||||
CLICAP_CHGHOST = capability_put(cli_capindex, "chghost", NULL);
|
CLICAP_CHGHOST = capability_put(cli_capindex, "chghost", NULL);
|
||||||
|
|
|
@ -41,7 +41,26 @@ struct Message starttls_msgtab = {
|
||||||
|
|
||||||
mapi_clist_av1 starttls_clist[] = { &starttls_msgtab, NULL };
|
mapi_clist_av1 starttls_clist[] = { &starttls_msgtab, NULL };
|
||||||
|
|
||||||
DECLARE_MODULE_AV1(starttls, NULL, NULL, starttls_clist, NULL, NULL, "$Revision$");
|
unsigned int CLICAP_TLS = 0;
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_LIBCRYPTO
|
||||||
|
CLICAP_TLS = capability_put(cli_capindex, "tls", NULL);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_LIBCRYPTO
|
||||||
|
capability_orphan(cli_capindex, "tls");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(starttls, _modinit, _moddeinit, starttls_clist, NULL, NULL, "$Revision$");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mr_starttls(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
mr_starttls(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
|
Loading…
Reference in a new issue