X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3fce9d1fcda568cea3745f5853c1abdc5fe909df..94187a80bd60baab4b9c4b949ad820d730578123:/sbr/netsec.c diff --git a/sbr/netsec.c b/sbr/netsec.c index 4b5edcfc..ab490467 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -881,7 +881,7 @@ netsec_flush(netsec_context *nsc, char **errstr) if (nsc->ns_snoop) { unsigned int snoopoutlen = netoutlen; - const char *snoopoutbuf = nsc->ns_outbuffer; + const char *snoopoutbuf = (const char *) nsc->ns_outbuffer; while (snoopoutlen > 0) { const char *end = strpbrk(snoopoutbuf, "\r\n"); @@ -913,7 +913,7 @@ netsec_flush(netsec_context *nsc, char **errstr) #endif /* TLS_SUPPORT */ fprintf(stderr, "=> "); if (nsc->ns_snoop_cb) { - char *ptr; + const char *ptr; unsigned int cb_len = outlen; if (nsc->ns_snoop_savebuf) { @@ -1479,6 +1479,20 @@ netsec_get_sasl_mechanism(netsec_context *nsc) return nsc->sasl_chosen_mech; } +/* + * Return the negotiated SASL strength security factor (SSF) + */ + +int +netsec_get_sasl_ssf(netsec_context *nsc) +{ +#ifdef CYRUS_SASL + return nsc->sasl_ssf; +#else /* CYRUS_SASL */ + return 0; +#endif /* CYRUS_SASL */ +} + /* * Set an OAuth2 service name, if we support it. */