diff options
author | djm <> | 2008-09-06 12:15:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:15:54 +0000 |
commit | f1625f274acf5dcd5601f6cb5e29e233b2a441a3 (patch) | |
tree | 44899ddfbef8f24aacbea50086c041c1b150f6d6 /src/lib/libcrypto/mdc2 | |
parent | 4f828b924f54507141fb95ebe49dfcd261945e85 (diff) | |
download | openbsd-f1625f274acf5dcd5601f6cb5e29e233b2a441a3.tar.gz openbsd-f1625f274acf5dcd5601f6cb5e29e233b2a441a3.tar.bz2 openbsd-f1625f274acf5dcd5601f6cb5e29e233b2a441a3.zip |
import of OpenSSL 0.9.8h
Diffstat (limited to 'src/lib/libcrypto/mdc2')
-rw-r--r-- | src/lib/libcrypto/mdc2/Makefile | 23 | ||||
-rw-r--r-- | src/lib/libcrypto/mdc2/mdc2.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/mdc2/mdc2test.c | 3 |
3 files changed, 16 insertions, 20 deletions
diff --git a/src/lib/libcrypto/mdc2/Makefile b/src/lib/libcrypto/mdc2/Makefile index b8e9a9a4fa..1d064f17a6 100644 --- a/src/lib/libcrypto/mdc2/Makefile +++ b/src/lib/libcrypto/mdc2/Makefile | |||
@@ -7,11 +7,6 @@ TOP= ../.. | |||
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= | 8 | INCLUDES= |
9 | CFLAG=-g | 9 | CFLAG=-g |
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
12 | INSTALLTOP=/usr/local/ssl | ||
13 | MAKEDEPPROG= makedepend | ||
14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
15 | MAKEFILE= Makefile | 10 | MAKEFILE= Makefile |
16 | AR= ar r | 11 | AR= ar r |
17 | 12 | ||
@@ -51,6 +46,7 @@ links: | |||
51 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | 46 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
52 | 47 | ||
53 | install: | 48 | install: |
49 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
54 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | 50 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ |
55 | do \ | 51 | do \ |
56 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 52 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
@@ -66,6 +62,7 @@ lint: | |||
66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 62 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
67 | 63 | ||
68 | depend: | 64 | depend: |
65 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
69 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | 66 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
70 | 67 | ||
71 | dclean: | 68 | dclean: |
@@ -83,16 +80,14 @@ mdc2_one.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | |||
83 | mdc2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 80 | mdc2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
84 | mdc2_one.o: ../../include/openssl/lhash.h ../../include/openssl/mdc2.h | 81 | mdc2_one.o: ../../include/openssl/lhash.h ../../include/openssl/mdc2.h |
85 | mdc2_one.o: ../../include/openssl/opensslconf.h | 82 | mdc2_one.o: ../../include/openssl/opensslconf.h |
86 | mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 83 | mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
87 | mdc2_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 84 | mdc2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
88 | mdc2_one.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 85 | mdc2_one.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h |
89 | mdc2_one.o: ../cryptlib.h mdc2_one.c | 86 | mdc2_one.o: ../../include/openssl/ui_compat.h ../cryptlib.h mdc2_one.c |
90 | mdc2dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | ||
91 | mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | 87 | mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h |
92 | mdc2dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 88 | mdc2dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/mdc2.h |
93 | mdc2dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h | 89 | mdc2dgst.o: ../../include/openssl/opensslconf.h |
94 | mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h | 90 | mdc2dgst.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
95 | mdc2dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | ||
96 | mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 91 | mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
97 | mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | 92 | mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h |
98 | mdc2dgst.o: mdc2dgst.c | 93 | mdc2dgst.o: mdc2dgst.c |
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h index 4cba101f37..72778a5212 100644 --- a/src/lib/libcrypto/mdc2/mdc2.h +++ b/src/lib/libcrypto/mdc2/mdc2.h | |||
@@ -74,19 +74,17 @@ extern "C" { | |||
74 | 74 | ||
75 | typedef struct mdc2_ctx_st | 75 | typedef struct mdc2_ctx_st |
76 | { | 76 | { |
77 | int num; | 77 | unsigned int num; |
78 | unsigned char data[MDC2_BLOCK]; | 78 | unsigned char data[MDC2_BLOCK]; |
79 | DES_cblock h,hh; | 79 | DES_cblock h,hh; |
80 | int pad_type; /* either 1 or 2, default 1 */ | 80 | int pad_type; /* either 1 or 2, default 1 */ |
81 | } MDC2_CTX; | 81 | } MDC2_CTX; |
82 | 82 | ||
83 | #ifdef OPENSSL_FIPS | 83 | |
84 | int private_MDC2_Init(MDC2_CTX *c); | ||
85 | #endif | ||
86 | int MDC2_Init(MDC2_CTX *c); | 84 | int MDC2_Init(MDC2_CTX *c); |
87 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); | 85 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); |
88 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); | 86 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); |
89 | unsigned char *MDC2(const unsigned char *d, unsigned long n, | 87 | unsigned char *MDC2(const unsigned char *d, size_t n, |
90 | unsigned char *md); | 88 | unsigned char *md); |
91 | 89 | ||
92 | #ifdef __cplusplus | 90 | #ifdef __cplusplus |
diff --git a/src/lib/libcrypto/mdc2/mdc2test.c b/src/lib/libcrypto/mdc2/mdc2test.c index c9abe99d92..017b31add2 100644 --- a/src/lib/libcrypto/mdc2/mdc2test.c +++ b/src/lib/libcrypto/mdc2/mdc2test.c | |||
@@ -140,6 +140,9 @@ int main(int argc, char *argv[]) | |||
140 | printf("pad2 - ok\n"); | 140 | printf("pad2 - ok\n"); |
141 | 141 | ||
142 | EVP_MD_CTX_cleanup(&c); | 142 | EVP_MD_CTX_cleanup(&c); |
143 | #ifdef OPENSSL_SYS_NETWARE | ||
144 | if (ret) printf("ERROR: %d\n", ret); | ||
145 | #endif | ||
143 | EXIT(ret); | 146 | EXIT(ret); |
144 | return(ret); | 147 | return(ret); |
145 | } | 148 | } |