comparison src/core/ngx_sha1.c @ 6603:9eefb38f0005

Internal md5 and sha1 implementations are now always used. This reduces the number of moving parts in ABI compatibility checks. Additionally, it also allows to use OpenSSL in FIPS mode while still using md5 for non-security tasks.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 30 Jun 2016 18:57:39 +0300
parents 1064ea81ed3a
children
comparison
equal deleted inserted replaced
6602:bcd442b585f0 6603:9eefb38f0005
2 /* 2 /*
3 * Copyright (C) Maxim Dounin 3 * Copyright (C) Maxim Dounin
4 * Copyright (C) Nginx, Inc. 4 * Copyright (C) Nginx, Inc.
5 * 5 *
6 * An internal SHA1 implementation. 6 * An internal SHA1 implementation.
7 * It is not expected to be optimal and is used only
8 * if no SHA1 implementation was found in system.
9 */ 7 */
10 8
11 9
12 #include <ngx_config.h> 10 #include <ngx_config.h>
13 #include <ngx_core.h> 11 #include <ngx_core.h>
14 #include <ngx_sha1.h> 12 #include <ngx_sha1.h>
15 13
16
17 #if !(NGX_HAVE_SHA1)
18 14
19 static const u_char *ngx_sha1_body(ngx_sha1_t *ctx, const u_char *data, 15 static const u_char *ngx_sha1_body(ngx_sha1_t *ctx, const u_char *data,
20 size_t size); 16 size_t size);
21 17
22 18
294 ctx->d = d; 290 ctx->d = d;
295 ctx->e = e; 291 ctx->e = e;
296 292
297 return p; 293 return p;
298 } 294 }
299
300 #endif