Lines Matching defs:sparams
112 sasl_server_params_t *sparams,
120 text = sparams->utils->malloc(sizeof(server_context_t));
122 MEMERROR( sparams->utils );
139 static char *gettime(sasl_server_params_t *sparams)
145 ret= sparams->utils->malloc(15);
155 static char *randomdigits(sasl_server_params_t *sparams)
171 sparams->utils->rand(sparams->utils->rpool,
175 sparams->utils->rand(sparams->utils->rpool,(char *) temp,4);
182 ret = sparams->utils->malloc(15); /* there's no way an unsigned can be longer than this right? */
191 sasl_server_params_t *sparams,
203 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
206 SETERROR(sparams->utils, "CRAM-MD5 does not accpet inital data");
212 time = gettime(sparams);
213 randdigits = randomdigits(sparams);
215 MEMERROR( sparams->utils );
220 text->challenge = sparams->utils->malloc(200 + 1);
222 MEMERROR(sparams->utils);
228 sparams->serverFQDN);
234 sparams->utils->free(time);
235 sparams->utils->free(randdigits);
244 sasl_server_params_t *sparams,
271 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
274 SETERROR( sparams->utils,"need authentication name");
279 userid = (char *) sparams->utils->malloc(pos+1);
281 MEMERROR( sparams->utils);
289 result = sparams->utils->prop_request(sparams->propctx, password_request);
293 result = sparams->canon_user(sparams->utils->conn,
298 result = sparams->utils->prop_getnames(sparams->propctx,
306 sparams->utils->seterror(sparams->utils->conn,0,
309 sparams->utils->seterror(sparams->utils->conn,0,
320 sparams->utils->seterror(sparams->utils->conn,0,
323 sparams->utils->seterror(sparams->utils->conn,0,
330 sec = sparams->utils->malloc(sizeof(sasl_secret_t) + len);
342 sparams->utils->hmac_md5_precalc(&md5state, /* OUT */
351 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
354 sparams->utils->seterror(sparams->utils->conn, 0,
367 sparams->utils->hmac_md5_import(&tmphmac, (HMAC_MD5_STATE *) &md5state);
368 sparams->utils->MD5Update(&(tmphmac.ictx),
371 sparams->utils->hmac_md5_final((unsigned char *) &digest, &tmphmac);
374 digest_str = convert16((unsigned char *) digest, 16, sparams->utils);
381 sparams->utils->seterror(sparams->utils->conn, 0,
384 sparams->utils->seterror(sparams->utils->conn, 0,
404 if (userid) sparams->utils->free(userid);
405 if (sec) _plug_free_secret(sparams->utils, &sec);
407 if (digest_str) sparams->utils->free(digest_str);
414 sasl_server_params_t *sparams,
429 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
432 SETERROR(sparams->utils, "CRAM-MD5 input longer than 1024 bytes");
440 return crammd5_server_mech_step1(text, sparams,
446 return crammd5_server_mech_step2(text, sparams,
453 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
456 sparams->utils->log(NULL, SASL_LOG_ERR,