X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsha1.h;h=e7e557308ee8e1f446c4295cc09d1c84bfda5e75;hb=4a54e34cf5629f9fed61f0b7d69ee3ba4d874bc6;hp=f1d26618b6be6b19433cd3679ddcfe3541af91cc;hpb=16e4aef0a9ebb22cd33bcf4f4533191d04ed59a1;p=ppp.git diff --git a/pppd/sha1.h b/pppd/sha1.h index f1d2661..e7e5573 100644 --- a/pppd/sha1.h +++ b/pppd/sha1.h @@ -1,12 +1,17 @@ /* sha1.h */ -/* If OpenSSL is in use, then use that version of SHA-1 */ -#ifdef OPENSSL -#include -#define __SHA1_INCLUDE_ -#endif +#include "pppdconf.h" #ifndef __SHA1_INCLUDE_ +#define __SHA1_INCLUDE_ + +#ifndef USE_SHA +#include + +#define SHA1_CTX SHA_CTX +#define SHA1_SIGNATURE_SIZE SHA_DIGEST_LENGTH + +#else #ifndef SHA1_SIGNATURE_SIZE #ifdef SHA_DIGESTSIZE @@ -17,8 +22,8 @@ #endif typedef struct { - unsigned long state[5]; - unsigned long count[2]; + u_int32_t state[5]; + u_int32_t count[2]; unsigned char buffer[64]; } SHA1_CTX; @@ -26,6 +31,5 @@ extern void SHA1_Init(SHA1_CTX *); extern void SHA1_Update(SHA1_CTX *, const unsigned char *, unsigned int); extern void SHA1_Final(unsigned char[SHA1_SIGNATURE_SIZE], SHA1_CTX *); -#define __SHA1_INCLUDE_ +#endif /* USE_SHA */ #endif /* __SHA1_INCLUDE_ */ -