File: sasl_start.c

package info (click to toggle)
cvm 0.97-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,064 kB
  • sloc: ansic: 4,065; sh: 2,730; makefile: 29; sql: 15
file content (16 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <string.h>
#include "sasl.h"
#include "sasl_internal.h"

int sasl_start(struct sasl_state* ss,
	       const char* mechanism, const str* initresponse, str* challenge)
{
  const struct sasl_mechanism* mech;
  for (mech = sasl_mechanisms; mech != 0; mech = mech->next) {
    if (strcasecmp(mechanism, mech->name) == 0) {
      ss->mech = mech;
      return mech->start(ss, initresponse, challenge);
    }
  }
  return SASL_NO_MECH;
}