modules/au/AU_util.h

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following functions.

   1 /***************************************
   2   $Revision: 1.10 $
   3 
   4   Authentication utilities 
   5 
   6   Status: NOT REVIEWED, TESTED
   7 
   8   Author(s):      Engin Gunduz 
   9 
  10   ******************/ /******************
  11   Modification History:
  12         engin (05/04/2000) Created.
  13   ******************/ /******************
  14   Copyright (c) 2000,2001,2002                    RIPE NCC
  15  
  16   All Rights Reserved
  17   
  18   Permission to use, copy, modify, and distribute this software and its
  19   documentation for any purpose and without fee is hereby granted,
  20   provided that the above copyright notice appear in all copies and that
  21   both that copyright notice and this permission notice appear in
  22   supporting documentation, and that the name of the author not be
  23   used in advertising or publicity pertaining to distribution of the
  24   software without specific, written prior permission.
  25   
  26   THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  27   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
  28   AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  29   DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  30   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  31   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  32  ***************************************/
  33 
  34 #ifndef AU_UTIL_H
  35 #define AU_UTIL_H 
  36 
  37 #include <stdio.h>
  38 #include <stdlib.h>
  39 #include <string.h>
  40 #include <sys/types.h>
  41 #include <unistd.h>
  42 #include <regex.h>
  43 #include <glib.h>
  44 //#include "er_UP_errors.h"
  45 //#include "erroutines.h"
  46 
  47 #define AU_MAIL_FROM 1
  48 #define AU_CRYPT_PW 2
  49 #define AU_PGP 3
  50 #define AU_NONE 4
  51 #define AU_MD5_PW 5
  52 
  53 #ifdef __cplusplus
  54 extern "C" {
  55 #endif
  56 
  57 
  58 typedef struct _credentials_struct{
  59    GSList * password_list;
  60    char * from;       /* this is the whole "From:" field of the incoming message */
  61    char * from_email; /* this is only the e-mail address */
  62    /*char pgp_struct[10];*/
  63    GSList * pgp_key_list;
  64 } credentials_struct;
  65 
  66 
  67 typedef struct _auth_struct{
  68   int type;
  69   char * auth;
  70   char * mntner_name;
  71   int index;
  72   char * pgp_struct;
  73 } auth_struct;
  74 
  75 char * AU_crypt(const char *key, const char *setting);
  76 int AU_authorise(GSList * auth_vector, credentials_struct credentials);
  77 
  78 #ifdef __cplusplus
  79  }
  80 #endif
  81 
  82 #endif

/* [<][>][^][v][top][bottom][index][help] */