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

« back to all changes in this revision

Viewing changes to src/modules/rlm_eap/libeap/fips186prf.c

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * This code was written from scratch by Michael Richardson, and it is
8
8
 * dual licensed under both GPL and BSD.
9
9
 *
10
 
 * Version:     $Id: fips186prf.c,v 1.10 2007/11/23 13:17:22 aland Exp $
 
10
 * Version:     $Id$
11
11
 *
12
12
 * GPL notice:
13
13
 *
45
45
 */
46
46
 
47
47
#include <freeradius-devel/ident.h>
48
 
RCSID("$Id: fips186prf.c,v 1.10 2007/11/23 13:17:22 aland Exp $")
 
48
RCSID("$Id$")
49
49
 
50
50
#include <freeradius-devel/autoconf.h>
51
51
 
138
138
 
139
139
                memset(zeros, 0, sizeof(zeros));
140
140
                memcpy(zeros, xval.p, 20);
 
141
#ifndef WITH_OPENSSL_SHA1
141
142
                fr_SHA1Transform(context.state, zeros);
142
 
                fr_fr_SHA1FinalNoLen(w_0.p, &context);
 
143
#else
 
144
                fr_SHA1Transform(&context, zeros);
 
145
#endif
 
146
                fr_SHA1FinalNoLen(w_0.p, &context);
143
147
 
144
148
                /*   c. XKEY = (1 + XKEY + w_0) mod 2^160 */
145
149
                onesixty_add_mod(&sum,  &xkey, &w_0);
153
157
 
154
158
                memset(zeros, 0, sizeof(zeros));
155
159
                memcpy(zeros, xval.p, 20);
 
160
#ifndef WITH_OPENSSL_SHA1
156
161
                fr_SHA1Transform(context.state, zeros);
157
 
                fr_fr_SHA1FinalNoLen(w_1.p, &context);
 
162
#else
 
163
                fr_SHA1Transform(&context, zeros);
 
164
#endif
 
165
                fr_SHA1FinalNoLen(w_1.p, &context);
158
166
 
159
167
                /*   f. XKEY = (1 + XKEY + w_1) mod 2^160 */
160
168
                onesixty_add_mod(&sum,  &xkey, &w_1);