X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=blobdiff_plain;f=lib%2Fsha1.c;h=6cf583c354c55da3b90a03fdba7b469ad81b13e6;hp=9d7d44779afff595e51ba6b51b8a39ce73e4d601;hb=8e0f64e4cd12f7779113bc438afd106dad3e1f1a;hpb=dbf55f6694dbf710b44e3ae76a46fd8b8f993f7c diff --git a/lib/sha1.c b/lib/sha1.c index 9d7d44779..6cf583c35 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -23,6 +23,9 @@ #include +#if HAVE_OPENSSL_SHA1 +# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +#endif #include "sha1.h" #include @@ -46,6 +49,7 @@ # error "invalid BLOCKSIZE" #endif +#if ! HAVE_OPENSSL_SHA1 /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; @@ -116,6 +120,7 @@ sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf) return sha1_read_ctx (ctx, resbuf); } +#endif /* Compute SHA1 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes @@ -190,6 +195,7 @@ sha1_stream (FILE *stream, void *resblock) return 0; } +#if ! HAVE_OPENSSL_SHA1 /* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message @@ -424,3 +430,4 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) e = ctx->E += e; } } +#endif