summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md4
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/md4')
-rw-r--r--src/lib/libcrypto/md4/md4.h14
-rw-r--r--src/lib/libcrypto/md4/md4_dgst.c3
-rw-r--r--src/lib/libcrypto/md4/md4_locl.h2
3 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h
index c794e186db..7a7b23682f 100644
--- a/src/lib/libcrypto/md4/md4.h
+++ b/src/lib/libcrypto/md4/md4.h
@@ -59,11 +59,13 @@
59#ifndef HEADER_MD4_H 59#ifndef HEADER_MD4_H
60#define HEADER_MD4_H 60#define HEADER_MD4_H
61 61
62#include <openssl/e_os2.h>
63
62#ifdef __cplusplus 64#ifdef __cplusplus
63extern "C" { 65extern "C" {
64#endif 66#endif
65 67
66#ifdef NO_MD4 68#ifdef OPENSSL_NO_MD4
67#error MD4 is disabled. 69#error MD4 is disabled.
68#endif 70#endif
69 71
@@ -74,9 +76,9 @@ extern "C" {
74 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 76 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75 */ 77 */
76 78
77#if defined(WIN16) || defined(__LP32__) 79#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__)
78#define MD4_LONG unsigned long 80#define MD4_LONG unsigned long
79#elif defined(_CRAY) || defined(__ILP64__) 81#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
80#define MD4_LONG unsigned long 82#define MD4_LONG unsigned long
81#define MD4_LONG_LOG2 3 83#define MD4_LONG_LOG2 3
82/* 84/*
@@ -102,9 +104,9 @@ typedef struct MD4state_st
102 int num; 104 int num;
103 } MD4_CTX; 105 } MD4_CTX;
104 106
105void MD4_Init(MD4_CTX *c); 107int MD4_Init(MD4_CTX *c);
106void MD4_Update(MD4_CTX *c, const void *data, unsigned long len); 108int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
107void MD4_Final(unsigned char *md, MD4_CTX *c); 109int MD4_Final(unsigned char *md, MD4_CTX *c);
108unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md); 110unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
109void MD4_Transform(MD4_CTX *c, const unsigned char *b); 111void MD4_Transform(MD4_CTX *c, const unsigned char *b);
110#ifdef __cplusplus 112#ifdef __cplusplus
diff --git a/src/lib/libcrypto/md4/md4_dgst.c b/src/lib/libcrypto/md4/md4_dgst.c
index 81488ae2e2..6446f5f5e7 100644
--- a/src/lib/libcrypto/md4/md4_dgst.c
+++ b/src/lib/libcrypto/md4/md4_dgst.c
@@ -70,7 +70,7 @@ const char *MD4_version="MD4" OPENSSL_VERSION_PTEXT;
70#define INIT_DATA_C (unsigned long)0x98badcfeL 70#define INIT_DATA_C (unsigned long)0x98badcfeL
71#define INIT_DATA_D (unsigned long)0x10325476L 71#define INIT_DATA_D (unsigned long)0x10325476L
72 72
73void MD4_Init(MD4_CTX *c) 73int MD4_Init(MD4_CTX *c)
74 { 74 {
75 c->A=INIT_DATA_A; 75 c->A=INIT_DATA_A;
76 c->B=INIT_DATA_B; 76 c->B=INIT_DATA_B;
@@ -79,6 +79,7 @@ void MD4_Init(MD4_CTX *c)
79 c->Nl=0; 79 c->Nl=0;
80 c->Nh=0; 80 c->Nh=0;
81 c->num=0; 81 c->num=0;
82 return 1;
82 } 83 }
83 84
84#ifndef md4_block_host_order 85#ifndef md4_block_host_order
diff --git a/src/lib/libcrypto/md4/md4_locl.h b/src/lib/libcrypto/md4/md4_locl.h
index 0a2b39018d..a8d31d7a73 100644
--- a/src/lib/libcrypto/md4/md4_locl.h
+++ b/src/lib/libcrypto/md4/md4_locl.h
@@ -68,7 +68,7 @@
68void md4_block_host_order (MD4_CTX *c, const void *p,int num); 68void md4_block_host_order (MD4_CTX *c, const void *p,int num);
69void md4_block_data_order (MD4_CTX *c, const void *p,int num); 69void md4_block_data_order (MD4_CTX *c, const void *p,int num);
70 70
71#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__) 71#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
72/* 72/*
73 * *_block_host_order is expected to handle aligned data while 73 * *_block_host_order is expected to handle aligned data while
74 * *_block_data_order - unaligned. As algorithm and host (x86) 74 * *_block_data_order - unaligned. As algorithm and host (x86)