Lines Matching defs:mech

97 static struct sec_server_mech *mech;
108 static struct sec_client_mech *mech;
180 buf->size = (*mech->decode)(app_data, buf->data, len, data_prot);
256 bytes = (*mech->encode)(app_data, from, length, data_prot, &buf);
287 len -= (*mech->overhead)(app_data, data_prot, len);
353 len = (*mech->decode)(app_data, buf, len, level);
383 len = (*mech->encode)(app_data, buf, strlen(buf), command_prot, &enc);
437 for(i = 0; (mech = mechs[i]) != NULL; i++){
438 if(!strcasecmp(auth_name, mech->name)){
439 tmp = realloc(app_data, mech->size);
441 reply(431, "Unable to accept %s at this time", mech->name);
446 if(mech->init && (*mech->init)(app_data) != 0) {
447 reply(431, "Unable to accept %s at this time", mech->name);
450 if(mech->auth) {
451 (*mech->auth)(app_data);
454 if(mech->adat)
469 if(mech && !sec_complete) {
473 (*mech->adat)(app_data, buf, len);
476 reply(503, "You must %sissue an AUTH first.", mech ? "re-" : "");
484 if(mech->pbsz)
485 new = (*mech->pbsz)(app_data, size);
519 if((*mech->check_prot)(app_data, p)){
521 mech->name, level_to_name(p));
534 if(mech->ccc && (*mech->ccc)(app_data) == 0) {
564 len = (*mech->decode)(app_data, buf, len, level);
582 return (*mech->userok)(app_data, userstr);
589 if(sec_complete && mech->session)
590 return (*mech->session)(app_data, user);
627 printf("Using %s for authentication.\n", mech->name);
715 if((*mech->check_prot)(app_data, level)) {
717 mech->name, level_to_name(level));
763 if((*mech->check_prot)(app_data, level)) {
765 mech->name, level_to_name(level));
851 mech = *m;
869 if (mech != NULL) {
870 if(mech->end)
871 (*mech->end)(app_data);
873 memset(app_data, 0, mech->size);