File: sasl_start.c

package info (click to toggle)
cvm 0.97-0.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,036 kB
  • sloc: ansic: 4,065; sh: 2,758; makefile: 235; sql: 15
file content (16 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (5)
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;
}