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

« back to all changes in this revision

Viewing changes to linux/net/ipsec/ipsec_md5c.c

  • 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
1
/*
2
 
 * RCSID $Id: ipsec_md5c.c,v 1.7 2002/09/10 01:45:14 mcr Exp $
 
2
 * RCSID $Id: ipsec_md5c.c,v 1.9 2004/09/08 17:21:36 ken Exp $
3
3
 */
4
4
 
5
5
/*
10
10
#include <asm/byteorder.h>
11
11
#include <linux/string.h>
12
12
 
13
 
#include "freeswan/ipsec_md5h.h"
 
13
#include "openswan/ipsec_md5h.h"
14
14
 
15
15
/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
16
16
 */
144
144
/*
145
145
 * MD5 initialization. Begins an MD5 operation, writing a new context.
146
146
 */
147
 
void MD5Init(void *vcontext)
 
147
void osMD5Init(void *vcontext)
148
148
{
149
149
  MD5_CTX *context = vcontext;                                     
150
150
 
161
161
  operation, processing another message block, and updating the
162
162
  context.
163
163
 */
164
 
void MD5Update (vcontext, input, inputLen)
 
164
void osMD5Update (vcontext, input, inputLen)
165
165
     void *vcontext;
166
166
     unsigned char *input;                                /* input block */
167
167
     __u32 inputLen;                     /* length of input block */
205
205
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
206
206
  the message digest and zeroizing the context.
207
207
 */
208
 
void MD5Final (digest, vcontext)
 
208
void osMD5Final (digest, vcontext)
209
209
unsigned char digest[16];                         /* message digest */
210
210
void *vcontext;                                       /* context */
211
211
{
220
220
*/
221
221
  index = (unsigned int)((context->count[0] >> 3) & 0x3f);
222
222
  padLen = (index < 56) ? (56 - index) : (120 - index);
223
 
  MD5Update (context, PADDING, padLen);
 
223
  osMD5Update (context, PADDING, padLen);
224
224
 
225
225
  /* Append length (before padding) */
226
 
  MD5Update (context, bits, 8);
 
226
  osMD5Update (context, bits, 8);
227
227
 
228
228
  if (digest != NULL)                   /* Bill Simpson's padding */
229
229
  {
400
400
 
401
401
/*
402
402
 * $Log: ipsec_md5c.c,v $
 
403
 * Revision 1.9  2004/09/08 17:21:36  ken
 
404
 * Rename MD5* -> osMD5 functions to prevent clashes with other symbols exported by kernel modules (CIFS in 2.6 initiated this)
 
405
 *
 
406
 * Revision 1.8  2004/04/06 02:49:26  mcr
 
407
 *      pullup of algo code from alg-branch.
 
408
 *
403
409
 * Revision 1.7  2002/09/10 01:45:14  mcr
404
410
 *      changed type of MD5_CTX and SHA1_CTX to void * so that
405
411
 *      the function prototypes would match, and could be placed