~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to linux/include/freeswan/ipsec_auth.h

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Authentication Header declarations
3
 
 * Copyright (C) 2003 Michael Richardson <mcr@sandelman.ottawa.on.ca>
4
 
 * 
5
 
 * This program is free software; you can redistribute it and/or modify it
6
 
 * under the terms of the GNU General Public License as published by the
7
 
 * Free Software Foundation; either version 2 of the License, or (at your
8
 
 * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
9
 
 * 
10
 
 * This program is distributed in the hope that it will be useful, but
11
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13
 
 * for more details.
14
 
 *
15
 
 * RCSID $Id: ipsec_auth.h,v 1.1 2003/12/13 19:10:16 mcr Exp $
16
 
 */
17
 
 
18
 
#include "ipsec_md5h.h"
19
 
#include "ipsec_sha1.h"
20
 
 
21
 
#ifndef IPSEC_AUTH_H
22
 
#define IPSEC_AUTH_H
23
 
 
24
 
#define AH_FLENGTH              12              /* size of fixed part */
25
 
#define AHMD5_KMAX              64              /* MD5 max 512 bits key */
26
 
#define AHMD5_AMAX              12              /* MD5 96 bits of authenticator */
27
 
 
28
 
#define AHMD596_KLEN            16              /* MD5 128 bits key */
29
 
#define AHSHA196_KLEN           20              /* SHA1 160 bits key */
30
 
 
31
 
#define AHMD596_ALEN            16              /* MD5 128 bits authentication length */
32
 
#define AHSHA196_ALEN           20              /* SHA1 160 bits authentication length */
33
 
 
34
 
#define AHMD596_BLKLEN          64              /* MD5 block length */
35
 
#define AHSHA196_BLKLEN         64              /* SHA1 block length */
36
 
 
37
 
#define AH_AMAX                 AHSHA196_ALEN   /* keep up to date! */
38
 
#define AHHMAC_HASHLEN          12              /* authenticator length of 96bits */
39
 
#define AHHMAC_RPLLEN           4               /* 32 bit replay counter */
40
 
 
41
 
#define DB_AH_PKTRX             0x0001
42
 
#define DB_AH_PKTRX2            0x0002
43
 
#define DB_AH_DMP               0x0004
44
 
#define DB_AH_IPSA              0x0010
45
 
#define DB_AH_XF                0x0020
46
 
#define DB_AH_INAU              0x0040
47
 
#define DB_AH_REPLAY            0x0100
48
 
 
49
 
#ifdef __KERNEL__
50
 
 
51
 
/* General HMAC algorithm is described in RFC 2104 */
52
 
 
53
 
#define         HMAC_IPAD       0x36
54
 
#define         HMAC_OPAD       0x5C
55
 
 
56
 
struct md5_ctx {
57
 
        MD5_CTX ictx;           /* context after H(K XOR ipad) */
58
 
        MD5_CTX octx;           /* context after H(K XOR opad) */
59
 
};
60
 
 
61
 
struct sha1_ctx {
62
 
        SHA1_CTX ictx;          /* context after H(K XOR ipad) */
63
 
        SHA1_CTX octx;          /* context after H(K XOR opad) */
64
 
};
65
 
 
66
 
struct auth_alg {
67
 
        void (*init)(void *ctx);
68
 
        void (*update)(void *ctx, unsigned char *bytes, __u32 len);
69
 
        void (*final)(unsigned char *hash, void *ctx);
70
 
        int hashlen;
71
 
};
72
 
 
73
 
struct options;
74
 
 
75
 
#endif /* __KERNEL__ */
76
 
#endif /* IPSEC_AUTH_H */
77
 
 
78
 
/*
79
 
 * $Log: ipsec_auth.h,v $
80
 
 * Revision 1.1  2003/12/13 19:10:16  mcr
81
 
 *      refactored rcv and xmit code - same as FS 2.05.
82
 
 *
83
 
 * Revision 1.1  2003/12/06 21:21:19  mcr
84
 
 *      split up receive path into per-transform files, for
85
 
 *      easier later removal.
86
 
 *
87
 
 *
88
 
 */