From: Stephan Bosch Date: Fri, 6 Jan 2023 13:47:14 +0000 (+0100) Subject: auth: auth-scram-server - Change return type of auth_scram_get_server_final() to... X-Git-Tag: 2.4.0~3136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=572c2f45016bee045134c67c7768d995f20fff22;p=thirdparty%2Fdovecot%2Fcore.git auth: auth-scram-server - Change return type of auth_scram_get_server_final() to string_t*. --- diff --git a/src/auth/auth-scram-server.c b/src/auth/auth-scram-server.c index 6ef04ca072..67b626d6b8 100644 --- a/src/auth/auth-scram-server.c +++ b/src/auth/auth-scram-server.c @@ -324,7 +324,7 @@ auth_scram_parse_client_final(struct scram_auth_request *server, return 0; } -static const char * +static string_t * auth_scram_get_server_final(struct scram_auth_request *server) { const struct hash_method *hmethod = server->hash_method; @@ -361,5 +361,5 @@ auth_scram_get_server_final(struct scram_auth_request *server) str_append(str, "v="); base64_encode(server_signature, sizeof(server_signature), str); - return str_c(str); + return str; } diff --git a/src/auth/mech-scram.c b/src/auth/mech-scram.c index ade3aca142..d6823d16cf 100644 --- a/src/auth/mech-scram.c +++ b/src/auth/mech-scram.c @@ -117,7 +117,7 @@ void mech_scram_auth_continue(struct auth_request *auth_request, AUTH_LOG_MSG_PASSWORD_MISMATCH); } else { server_final_message = - auth_scram_get_server_final(request); + str_c(auth_scram_get_server_final(request)); len = strlen(server_final_message); auth_request_success(auth_request, server_final_message, len);