From a14d72ca2fec5d4eb5a043936e4f7ce08015c177 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 17 Apr 2019 23:47:51 +0100 Subject: sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZID Added the ability for the calling program to specify the authorisation identity (authzid), the identity to act as, in addition to the authentication identity (authcid) and password when using SASL PLAIN authentication. Fixed #3653 Closes #3790 --- lib/setopt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/setopt.c') diff --git a/lib/setopt.c b/lib/setopt.c index 92cd5b271..ff68788e5 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2400,6 +2400,12 @@ static CURLcode vsetopt(struct Curl_easy *data, CURLoption option, break; #endif + case CURLOPT_SASL_AUTHZID: + /* Authorisation identity (identity to act as) */ + result = Curl_setstropt(&data->set.str[STRING_SASL_AUTHZID], + va_arg(param, char *)); + break; + case CURLOPT_SASL_IR: /* Enable/disable SASL initial response */ data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE; -- cgit v1.2.3