~ubuntu-branches/ubuntu/jaunty/freeradius/jaunty-proposed

« back to all changes in this revision

Viewing changes to src/include/sha1.h

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-09-22 08:42:02 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080922084202-eyjprg3z55481ha5
Tags: 2.1.0+dfsg-0ubuntu1
* New upstream release.
* Fixes FTBFS issue with new libtool.
* Fixes listen on random port. (LP: #261809)

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 */