~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to src/modules/rlm_x99_token/x99_pwe.h

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2006-01-15 13:34:13 UTC
  • mto: (3.1.3 dapper) (4.1.3 sid) (1.1.14 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060115133413-zo1dslttvdoalqym
Tags: upstream-1.1.0
ImportĀ upstreamĀ versionĀ 1.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * x99_pwe.h
3
 
 * $Id: x99_pwe.h,v 1.6 2002/05/30 04:21:11 fcusack Exp $
4
 
 *
5
 
 *   This program is free software; you can redistribute it and/or modify
6
 
 *   it under the terms of the GNU General Public License as published by
7
 
 *   the Free Software Foundation; either version 2 of the License, or
8
 
 *   (at your option) any later version.
9
 
 *
10
 
 *   This program is distributed in the hope that it will be useful,
11
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *   GNU General Public License for more details.
14
 
 *
15
 
 *   You should have received a copy of the GNU General Public License
16
 
 *   along with this program; if not, write to the Free Software
17
 
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 *
19
 
 * Copyright 2001,2002  Google, Inc.
20
 
 */
21
 
 
22
 
#ifndef X99_PWE_H
23
 
#define X99_PWE_H
24
 
 
25
 
/* Some hardcoding here ... because not all types have #defines */
26
 
#define PW_MS_CHAP_CHALLENGE  ((311 << 16) | 11)
27
 
#define PW_MS_CHAP_RESPONSE   ((311 << 16) | 1)
28
 
#define PW_MS_CHAP2_RESPONSE  ((311 << 16) | 25)
29
 
 
30
 
/* MPPE encryption policy */
31
 
#define MPPE_ENC_POL_ENCRYPTION_FORBIDDEN "0x00000000"
32
 
#define MPPE_ENC_POL_ENCRYPTION_ALLOWED   "0x00000001"
33
 
#define MPPE_ENC_POL_ENCRYPTION_REQUIRED  "0x00000002"
34
 
 
35
 
/* MPPE encryption types */
36
 
#define MPPE_ENC_TYPES_RC4_40     "0x00000002"
37
 
#define MPPE_ENC_TYPES_RC4_128    "0x00000004"
38
 
#define MPPE_ENC_TYPES_RC4_40_128 "0x00000006"
39
 
 
40
 
/* Translate the above into something easily usable. */
41
 
static const char *x99_mppe_policy[3] = {
42
 
    MPPE_ENC_POL_ENCRYPTION_FORBIDDEN,
43
 
    MPPE_ENC_POL_ENCRYPTION_ALLOWED,
44
 
    MPPE_ENC_POL_ENCRYPTION_REQUIRED };
45
 
 
46
 
static const char *x99_mppe_types[3] = {
47
 
    MPPE_ENC_TYPES_RC4_40,
48
 
    MPPE_ENC_TYPES_RC4_128,
49
 
    MPPE_ENC_TYPES_RC4_40_128 };
50
 
 
51
 
static void x99_key_from_hash(des_cblock *key,const unsigned char hashbytes[7]);
52
 
 
53
 
#endif /* X99_PWE_H */
54