Lines Matching refs:sparams
2531 sasl_server_params_t * sparams, argument
2539 text = sparams->utils->malloc(sizeof(server_context_t));
2554 sasl_server_params_t *sparams, argument
2572 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
2576 result = get_server_realm(sparams, &realm);
2608 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2633 nonce = create_nonce(sparams->utils);
2637 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2640 SETERROR(sparams->utils, "internal erorr: failed creating a nonce");
2650 result = _plug_buf_alloc(sparams->utils, &(text->out_buf),
2654 sparams->utils->free(nonce);
2665 if (realm && add_to_challenge(sparams->utils,
2670 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2672 sparams->utils->free(nonce);
2674 SETERROR(sparams->utils, "internal error: add_to_challenge failed");
2687 if (add_to_challenge(sparams->utils,
2692 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2694 sparams->utils->free(nonce);
2696 SETERROR(sparams->utils, "internal error: add_to_challenge 3 failed");
2707 if (add_to_challenge(sparams->utils,
2712 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2714 sparams->utils->free(nonce);
2716 SETERROR(sparams->utils,
2725 add_to_challenge(sparams->utils,
2729 sparams->utils->free(nonce);
2730 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2734 SETERROR(sparams->utils, "internal error: add_to_challenge failed");
2746 if(sparams->props.maxbufsize) {
2748 sparams->props.maxbufsize);
2749 if (add_to_challenge(sparams->utils,
2754 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2757 SETERROR(sparams->utils,
2765 if (add_to_challenge(sparams->utils,
2770 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2772 sparams->utils->free(nonce);
2774 SETERROR(sparams->utils, "internal error: add_to_challenge 6 failed");
2791 if (add_to_challenge(sparams->utils,
2796 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2798 sparams->utils->free(nonce);
2800 SETERROR(sparams->utils, "internal error: add_to_challenge 7 failed");
2810 sparams->utils->free(nonce);
2811 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2814 SETERROR(sparams->utils,
2821 _plug_strdup(sparams->utils, realm, &text->realm, NULL);
2837 sasl_server_params_t *sparams, argument
2879 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
2882 in = sparams->utils->malloc(clientinlen + 1);
2910 _plug_strdup(sparams->utils, value, &username, NULL);
2912 _plug_strdup(sparams->utils, value, &authorization_id, NULL);
2914 _plug_strdup(sparams->utils, value, (char **) &cnonce, NULL);
2918 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2921 SETERROR(sparams->utils,
2930 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2933 SETERROR(sparams->utils,
2939 _plug_strdup(sparams->utils, value, &realm, NULL);
2941 _plug_strdup(sparams->utils, value, (char **) &nonce, NULL);
2943 _plug_strdup(sparams->utils, value, &qop, NULL);
2951 _plug_strdup(sparams->utils, value, &digesturi, NULL);
2956 service_len = strlen(sparams->service);
2957 if (strncasecmp(digesturi, sparams->service, service_len) ||
2961 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2964 SETERROR(sparams->utils,
2973 _plug_strdup(sparams->utils, value, &response, NULL);
2975 _plug_strdup(sparams->utils, value, &cipher, NULL);
2981 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2984 SETERROR(sparams->utils,
2991 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
2994 SETERROR(sparams->utils, "invalid maxbuf parameter");
3001 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3004 SETERROR(sparams->utils,
3013 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3016 SETERROR(sparams->utils, "client doesn't support UTF-8");
3021 _plug_strdup(sparams->utils, value, &charset, NULL);
3023 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
3050 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3053 SETERROR(sparams->utils, "required parameters missing");
3063 if (sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
3067 _plug_strdup(sparams->utils, text->reauth->e[val].realm,
3070 _plug_strdup(sparams->utils, (char *)text->reauth->e[val].nonce,
3073 _plug_strdup(sparams->utils, text->reauth->e[val].nonce,
3078 _plug_strdup(sparams->utils, (char *)text->reauth->e[val].cnonce,
3081 _plug_strdup(sparams->utils, text->reauth->e[val].cnonce,
3086 sparams->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
3102 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3106 SETERROR(sparams->utils,
3114 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3118 SETERROR(sparams->utils,
3126 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3129 SETERROR(sparams->utils,
3137 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3141 SETERROR(sparams->utils,
3148 result = sparams->utils->prop_request(sparams->propctx, password_request);
3151 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3154 SETERROR(sparams->utils, "unable to resquest user password");
3161 result = sparams->canon_user(sparams->utils->conn,
3165 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3168 SETERROR(sparams->utils, "unable canonify user and get auxprops");
3174 result = sparams->canon_user(sparams->utils->conn,
3177 result = sparams->canon_user(sparams->utils->conn,
3184 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3187 SETERROR(sparams->utils, "unable authorization ID");
3192 result = sparams->utils->prop_getnames(sparams->propctx, password_request,
3199 sparams->utils->seterror(sparams->utils->conn, 0,
3202 sparams->utils->seterror(sparams->utils->conn, 0,
3213 sparams->utils->seterror(sparams->utils->conn,0,
3216 sparams->utils->seterror(sparams->utils->conn,0,
3223 sec = sparams->utils->malloc(sizeof(sasl_secret_t) + len);
3226 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3229 SETERROR(sparams->utils, "unable to allocate secret");
3254 DigestCalcSecret(sparams->utils, (unsigned char *)username,
3258 DigestCalcSecret(sparams->utils, username,
3272 _plug_free_secret(sparams->utils, &sec);
3278 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3281 sparams->utils->seterror(sparams->utils->conn, 0,
3294 _plug_strdup(sparams->utils, "auth", &qop, NULL);
3328 sparams->utils->log(sparams->utils->conn, SASL_LOG_WARN,
3331 SETERROR(sparams->utils, "client requested invalid cipher");
3352 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3355 SETERROR(sparams->utils,
3363 sparams->utils,
3375 SETERROR(sparams->utils, "internal error: unable to create response");
3384 SETERROR(sparams->utils,
3387 SETERROR(sparams->utils,
3399 SETERROR(sparams->utils, gettext("server nonce expired"));
3401 SETERROR(sparams->utils, "server nonce expired");
3439 sparams->props.maxbufsize ? sparams->props.maxbufsize : DEFAULT_BUFSIZE;
3440 text->utils = sparams->utils;
3450 create_layer_keys(text, sparams->utils,text->HA1,n,enckey,deckey);
3458 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3466 sparams->utils->seterror(sparams->utils->conn, 0,
3492 result = _plug_buf_alloc(sparams->utils, &(text->out_buf),
3514 sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
3522 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3530 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3540 clear_reauth_entry(&text->reauth->e[val], SERVER, sparams->utils);
3546 sparams->utils->mutex_unlock(text->reauth->mutex); /* UNLOCK */
3550 if (in_start) sparams->utils->free (in_start);
3553 sparams->utils->free (username);
3556 sparams->utils->free (authorization_id);
3559 sparams->utils->free (realm);
3561 sparams->utils->free (nonce);
3563 sparams->utils->free (cnonce);
3565 sparams->utils->free (response);
3567 sparams->utils->free (cipher);
3569 sparams->utils->free(serverresponse);
3571 sparams->utils->free (charset);
3573 sparams->utils->free (digesturi);
3575 sparams->utils->free (qop);
3577 _plug_free_secret(sparams->utils, &sec);
3584 sasl_server_params_t *sparams, argument
3603 if (!sparams->props.maxbufsize) {
3607 if (sparams->props.max_ssf < sparams->external_ssf) {
3611 sparams->props.max_ssf - sparams->external_ssf;
3613 if (sparams->props.min_ssf < sparams->external_ssf) {
3617 sparams->props.min_ssf - sparams->external_ssf;
3623 if (digestmd5_server_mech_step2(stext, sparams,
3631 sparams->utils->log(sparams->utils->conn, SASL_LOG_WARN,
3634 sparams->utils->log(NULL, SASL_LOG_WARN,
3644 return digestmd5_server_mech_step1(stext, sparams,
3649 return digestmd5_server_mech_step2(stext, sparams,
3655 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
3658 sparams->utils->log(NULL, SASL_LOG_ERR,