diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ngx_md5.c | 6 | ||||
-rw-r--r-- | src/core/ngx_md5.h | 32 | ||||
-rw-r--r-- | src/core/ngx_module.h | 9 | ||||
-rw-r--r-- | src/core/ngx_sha1.c | 6 | ||||
-rw-r--r-- | src/core/ngx_sha1.h | 22 |
5 files changed, 0 insertions, 75 deletions
diff --git a/src/core/ngx_md5.c b/src/core/ngx_md5.c index 440c75bca..c25d0025d 100644 --- a/src/core/ngx_md5.c +++ b/src/core/ngx_md5.c @@ -3,8 +3,6 @@ * An internal implementation, based on Alexander Peslyak's * public domain implementation: * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 - * It is not expected to be optimal and is used only - * if no MD5 implementation was found in system. */ @@ -13,8 +11,6 @@ #include <ngx_md5.h> -#if !(NGX_HAVE_MD5) - static const u_char *ngx_md5_body(ngx_md5_t *ctx, const u_char *data, size_t size); @@ -285,5 +281,3 @@ ngx_md5_body(ngx_md5_t *ctx, const u_char *data, size_t size) return p; } - -#endif diff --git a/src/core/ngx_md5.h b/src/core/ngx_md5.h index 18d09d6d5..713b614f8 100644 --- a/src/core/ngx_md5.h +++ b/src/core/ngx_md5.h @@ -13,36 +13,6 @@ #include <ngx_core.h> -#if (NGX_HAVE_MD5) - -#if (NGX_HAVE_OPENSSL_MD5_H) -#include <openssl/md5.h> -#else -#include <md5.h> -#endif - - -typedef MD5_CTX ngx_md5_t; - - -#if (NGX_OPENSSL_MD5) - -#define ngx_md5_init MD5_Init -#define ngx_md5_update MD5_Update -#define ngx_md5_final MD5_Final - -#else - -#define ngx_md5_init MD5Init -#define ngx_md5_update MD5Update -#define ngx_md5_final MD5Final - -#endif - - -#else /* !NGX_HAVE_MD5 */ - - typedef struct { uint64_t bytes; uint32_t a, b, c, d; @@ -55,6 +25,4 @@ void ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size); void ngx_md5_final(u_char result[16], ngx_md5_t *ctx); -#endif - #endif /* _NGX_MD5_H_INCLUDED_ */ diff --git a/src/core/ngx_module.h b/src/core/ngx_module.h index e911cb49c..a1a0d6c27 100644 --- a/src/core/ngx_module.h +++ b/src/core/ngx_module.h @@ -119,17 +119,8 @@ #define NGX_MODULE_SIGNATURE_16 "0" #endif -#if (NGX_HAVE_MD5) -#define NGX_MODULE_SIGNATURE_17 "1" -#else #define NGX_MODULE_SIGNATURE_17 "0" -#endif - -#if (NGX_HAVE_SHA1) -#define NGX_MODULE_SIGNATURE_18 "1" -#else #define NGX_MODULE_SIGNATURE_18 "0" -#endif #if (NGX_HAVE_OPENAT) #define NGX_MODULE_SIGNATURE_19 "1" diff --git a/src/core/ngx_sha1.c b/src/core/ngx_sha1.c index fd665fd73..f00dc52d6 100644 --- a/src/core/ngx_sha1.c +++ b/src/core/ngx_sha1.c @@ -4,8 +4,6 @@ * Copyright (C) Nginx, Inc. * * An internal SHA1 implementation. - * It is not expected to be optimal and is used only - * if no SHA1 implementation was found in system. */ @@ -14,8 +12,6 @@ #include <ngx_sha1.h> -#if !(NGX_HAVE_SHA1) - static const u_char *ngx_sha1_body(ngx_sha1_t *ctx, const u_char *data, size_t size); @@ -296,5 +292,3 @@ ngx_sha1_body(ngx_sha1_t *ctx, const u_char *data, size_t size) return p; } - -#endif diff --git a/src/core/ngx_sha1.h b/src/core/ngx_sha1.h index 7fe4c9887..4a98f7183 100644 --- a/src/core/ngx_sha1.h +++ b/src/core/ngx_sha1.h @@ -13,26 +13,6 @@ #include <ngx_core.h> -#if (NGX_HAVE_SHA1) - -#if (NGX_HAVE_OPENSSL_SHA1_H) -#include <openssl/sha.h> -#else -#include <sha.h> -#endif - - -typedef SHA_CTX ngx_sha1_t; - - -#define ngx_sha1_init SHA1_Init -#define ngx_sha1_update SHA1_Update -#define ngx_sha1_final SHA1_Final - - -#else /* !NGX_HAVE_SHA1 */ - - typedef struct { uint64_t bytes; uint32_t a, b, c, d, e, f; @@ -45,6 +25,4 @@ void ngx_sha1_update(ngx_sha1_t *ctx, const void *data, size_t size); void ngx_sha1_final(u_char result[20], ngx_sha1_t *ctx); -#endif - #endif /* _NGX_SHA1_H_INCLUDED_ */ |