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

« back to all changes in this revision

Viewing changes to src/include/sha1.h

  • 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:
1
1
#ifndef _FR_SHA1_H
2
2
#define _FR_SHA1_H
3
3
 
4
 
/*
5
 
 *  FreeRADIUS defines to ensure globally unique SHA1 function names,
6
 
 *  so that we don't pick up vendor-specific broken SHA1 libraries.
7
 
 */
8
 
#define fr_SHA1_CTX             fr_SHA1_CTX
9
 
#define fr_SHA1Transform                fr_SHA1Transform
10
 
#define fr_SHA1Init             fr_SHA1Init
11
 
#define fr_SHA1Update           fr_SHA1Update
12
 
#define fr_SHA1Final            fr_SHA1Final
13
 
 
 
4
#ifndef WITH_OPENSSL_SHA1
14
5
typedef struct {
15
6
    uint32_t state[5];
16
7
    uint32_t count[2];
25
16
/*
26
17
 * this version implements a raw SHA1 transform, no length is appended,
27
18
 * nor any 128s out to the block size.
 
19
 *
 
20
 *      Hmm... this function doesn't appear to be used anywhere.
28
21
 */
29
 
void fr_fr_SHA1FinalNoLen(uint8_t digest[20], fr_SHA1_CTX* context);
 
22
void fr_SHA1FinalNoLen(uint8_t digest[20], fr_SHA1_CTX* context);
 
23
 
 
24
#else  /* WITH_OPENSSL_SHA1 */
 
25
 
 
26
#include <openssl/sha.h>
 
27
 
 
28
#define fr_SHA1_CTX     SHA_CTX
 
29
#define fr_SHA1Init     SHA1_Init
 
30
#define fr_SHA1Update   SHA1_Update
 
31
#define fr_SHA1Final    SHA1_Final
 
32
#define fr_SHA1Transform SHA1_Transform
 
33
#endif
30
34
 
31
35
/*
32
36
 * FIPS 186-2 PRF based upon SHA1.
 
37
 *
 
38
 *      Hmm... this is only used in src/modules/rlm_eap/libeap/
 
39
 *      why is the prototype here?
33
40
 */
34
41
extern void fips186_2prf(uint8_t mk[20], uint8_t finalkey[160]);
35
42
 
36
 
 
37
43
#endif /* _FR_SHA1_H */