Lines Matching refs:sparams
114 sasl_server_params_t *sparams, in crammd5_server_mech_new() argument
122 text = sparams->utils->malloc(sizeof(server_context_t)); in crammd5_server_mech_new()
124 MEMERROR( sparams->utils ); in crammd5_server_mech_new()
141 static char *gettime(sasl_server_params_t *sparams) in gettime() argument
147 ret= sparams->utils->malloc(15); in gettime()
157 static char *randomdigits(sasl_server_params_t *sparams) in randomdigits() argument
173 sparams->utils->rand(sparams->utils->rpool, in randomdigits()
177 sparams->utils->rand(sparams->utils->rpool,(char *) temp,4); in randomdigits()
184 … ret = sparams->utils->malloc(15); /* there's no way an unsigned can be longer than this right? */ in randomdigits()
193 sasl_server_params_t *sparams, in crammd5_server_mech_step1() argument
205 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR, in crammd5_server_mech_step1()
208 SETERROR(sparams->utils, "CRAM-MD5 does not accpet inital data"); in crammd5_server_mech_step1()
214 time = gettime(sparams); in crammd5_server_mech_step1()
215 randdigits = randomdigits(sparams); in crammd5_server_mech_step1()
217 MEMERROR( sparams->utils ); in crammd5_server_mech_step1()
222 text->challenge = sparams->utils->malloc(200 + 1); in crammd5_server_mech_step1()
224 MEMERROR(sparams->utils); in crammd5_server_mech_step1()
230 sparams->serverFQDN); in crammd5_server_mech_step1()
236 sparams->utils->free(time); in crammd5_server_mech_step1()
237 sparams->utils->free(randdigits); in crammd5_server_mech_step1()
246 sasl_server_params_t *sparams, in crammd5_server_mech_step2() argument
273 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR, in crammd5_server_mech_step2()
276 SETERROR( sparams->utils,"need authentication name"); in crammd5_server_mech_step2()
281 userid = (char *) sparams->utils->malloc(pos+1); in crammd5_server_mech_step2()
283 MEMERROR( sparams->utils); in crammd5_server_mech_step2()
291 result = sparams->utils->prop_request(sparams->propctx, password_request); in crammd5_server_mech_step2()
295 result = sparams->canon_user(sparams->utils->conn, in crammd5_server_mech_step2()
300 result = sparams->utils->prop_getnames(sparams->propctx, in crammd5_server_mech_step2()
308 sparams->utils->seterror(sparams->utils->conn,0, in crammd5_server_mech_step2()
311 sparams->utils->seterror(sparams->utils->conn,0, in crammd5_server_mech_step2()
322 sparams->utils->seterror(sparams->utils->conn,0, in crammd5_server_mech_step2()
325 sparams->utils->seterror(sparams->utils->conn,0, in crammd5_server_mech_step2()
332 sec = sparams->utils->malloc(sizeof(sasl_secret_t) + len); in crammd5_server_mech_step2()
344 sparams->utils->hmac_md5_precalc(&md5state, /* OUT */ in crammd5_server_mech_step2()
353 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR, in crammd5_server_mech_step2()
356 sparams->utils->seterror(sparams->utils->conn, 0, in crammd5_server_mech_step2()
369 sparams->utils->hmac_md5_import(&tmphmac, (HMAC_MD5_STATE *) &md5state); in crammd5_server_mech_step2()
370 sparams->utils->MD5Update(&(tmphmac.ictx), in crammd5_server_mech_step2()
373 sparams->utils->hmac_md5_final((unsigned char *) &digest, &tmphmac); in crammd5_server_mech_step2()
376 digest_str = convert16((unsigned char *) digest, 16, sparams->utils); in crammd5_server_mech_step2()
383 sparams->utils->seterror(sparams->utils->conn, 0, in crammd5_server_mech_step2()
386 sparams->utils->seterror(sparams->utils->conn, 0, in crammd5_server_mech_step2()
406 if (userid) sparams->utils->free(userid); in crammd5_server_mech_step2()
407 if (sec) _plug_free_secret(sparams->utils, &sec); in crammd5_server_mech_step2()
409 if (digest_str) sparams->utils->free(digest_str); in crammd5_server_mech_step2()
416 sasl_server_params_t *sparams, in crammd5_server_mech_step() argument
431 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR, in crammd5_server_mech_step()
434 SETERROR(sparams->utils, "CRAM-MD5 input longer than 1024 bytes"); in crammd5_server_mech_step()
442 return crammd5_server_mech_step1(text, sparams, in crammd5_server_mech_step()
448 return crammd5_server_mech_step2(text, sparams, in crammd5_server_mech_step()
455 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR, in crammd5_server_mech_step()
458 sparams->utils->log(NULL, SASL_LOG_ERR, in crammd5_server_mech_step()