diff options
| author | markus <> | 2002-09-05 12:51:50 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:50 +0000 |
| commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
| tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/md4 | |
| parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
| download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/md4')
| -rw-r--r-- | src/lib/libcrypto/md4/md4.h | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/md4/md4_dgst.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/md4/md4_locl.h | 2 |
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 |
| 63 | extern "C" { | 65 | extern "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 | ||
| 105 | void MD4_Init(MD4_CTX *c); | 107 | int MD4_Init(MD4_CTX *c); |
| 106 | void MD4_Update(MD4_CTX *c, const void *data, unsigned long len); | 108 | int MD4_Update(MD4_CTX *c, const void *data, unsigned long len); |
| 107 | void MD4_Final(unsigned char *md, MD4_CTX *c); | 109 | int MD4_Final(unsigned char *md, MD4_CTX *c); |
| 108 | unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md); | 110 | unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md); |
| 109 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); | 111 | void 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 | ||
| 73 | void MD4_Init(MD4_CTX *c) | 73 | int 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 @@ | |||
| 68 | void md4_block_host_order (MD4_CTX *c, const void *p,int num); | 68 | void md4_block_host_order (MD4_CTX *c, const void *p,int num); |
| 69 | void md4_block_data_order (MD4_CTX *c, const void *p,int num); | 69 | void 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) |
