All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
rlm_cram.c File Reference

CRAM mail authentication (APOP, CRAM-MD5) More...

#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/md5.h>
#include <ctype.h>
+ Include dependency graph for rlm_cram.c:

Go to the source code of this file.

Macros

#define SM_AUTHTYPE   101
 
#define SM_CHALLENGE   102
 
#define SM_RESPONSE   103
 
#define VENDORPEC_SM   11406
 

Functions

static void calc_apop_digest (uint8_t *buffer, uint8_t const *challenge, size_t challen, char const *password)
 
static void calc_md4_digest (uint8_t *buffer, uint8_t const *challenge, size_t challen, char const *password)
 
static void calc_md5_digest (uint8_t *buffer, uint8_t const *challenge, size_t challen, char const *password)
 
static void calc_sha1_digest (uint8_t *buffer, uint8_t const *challenge, size_t challen, char const *password)
 
static rlm_rcode_t CC_HINT (nonnull)
 

Variables

module_t rlm_cram
 

Detailed Description

CRAM mail authentication (APOP, CRAM-MD5)

Id:
649ed8daad0cf7d1900109628248ec83e2fb9303
     Attributes used (Vendor Code/PEN: 11406, you may change it to your own)
     101 (Sandy-Mail-Authtype), selects CRAM protocol, possible values:
        2: CRAM-MD5
        3: APOP
        8: CRAM-MD4
        9: CRAM-SHA1
     102 (Sandy-Mail-Challenge), contains server's challenge (usually
     text banner)
     103 (Sandy-Mail-Response), contains client's response, 16 octets
     for APOP/CRAM-MD5/CRAM-MD4, 20 octets for CRAM-SHA1

Definition in file rlm_cram.c.

Macro Definition Documentation

#define SM_AUTHTYPE   101

Definition at line 46 of file rlm_cram.c.

#define SM_CHALLENGE   102

Definition at line 47 of file rlm_cram.c.

#define SM_RESPONSE   103

Definition at line 48 of file rlm_cram.c.

#define VENDORPEC_SM   11406

Definition at line 45 of file rlm_cram.c.

Function Documentation

static void calc_apop_digest ( uint8_t *  buffer,
uint8_t const *  challenge,
size_t  challen,
char const *  password 
)
static

Definition at line 50 of file rlm_cram.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void calc_md4_digest ( uint8_t *  buffer,
uint8_t const *  challenge,
size_t  challen,
char const *  password 
)
static

Definition at line 82 of file rlm_cram.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void calc_md5_digest ( uint8_t *  buffer,
uint8_t const *  challenge,
size_t  challen,
char const *  password 
)
static

Definition at line 62 of file rlm_cram.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void calc_sha1_digest ( uint8_t *  buffer,
uint8_t const *  challenge,
size_t  challen,
char const *  password 
)
static

Definition at line 102 of file rlm_cram.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static rlm_rcode_t CC_HINT ( nonnull  )
static

Definition at line 124 of file rlm_cram.c.

+ Here is the call graph for this function:

Variable Documentation

module_t rlm_cram
Initial value:
= {
.magic = RLM_MODULE_INIT,
.name = "cram",
.methods = {
},
}
#define RLM_TYPE_THREAD_SAFE
Module is threadsafe.
Definition: modules.h:75
#define RLM_MODULE_INIT
Definition: modules.h:86
static rlm_rcode_t mod_authenticate(void *instance, REQUEST *request) CC_HINT(nonnull)
0 methods index for authenticate section.
Definition: modules.h:41

Definition at line 191 of file rlm_cram.c.