Back to index

courier  0.68.2
Functions
externalauth.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

const char * externalauth ()

Function Documentation

const char* externalauth ( )

Definition at line 16 of file externalauth.c.

{
       const char *p=getenv("TLS_EXTERNAL");
       char *q, *r;

       if (!p || !*p)
              return NULL;

       if ((q=malloc(strlen(p)+20)) == NULL)
              return NULL;

       strcat(strcpy(q, "TLS_SUBJECT_"), p);

       for (r=q; *r; r++)
              if (*r >= 'a' && *r <= 'z')
                     *r -= 'a' - 'A';

       p=getenv(q);
       free(q);

       if (p && *p)
              return p;
       return 0;
}

Here is the caller graph for this function: