diff options
author | markus <> | 2003-05-12 02:18:40 +0000 |
---|---|---|
committer | markus <> | 2003-05-12 02:18:40 +0000 |
commit | d4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch) | |
tree | d52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/md2 | |
parent | 582bbd139cd2afd58d10dc051c5b0b989b441074 (diff) | |
download | openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2 openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip |
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/md2')
-rw-r--r-- | src/lib/libcrypto/md2/Makefile.ssl | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/md2/md2_dgst.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/md2/md2_one.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/md2/md2test.c | 5 |
4 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/libcrypto/md2/Makefile.ssl b/src/lib/libcrypto/md2/Makefile.ssl index e89a17f3a4..3206924c90 100644 --- a/src/lib/libcrypto/md2/Makefile.ssl +++ b/src/lib/libcrypto/md2/Makefile.ssl | |||
@@ -68,7 +68,7 @@ lint: | |||
68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 68 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
69 | 69 | ||
70 | depend: | 70 | depend: |
71 | $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | 71 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
72 | 72 | ||
73 | dclean: | 73 | dclean: |
74 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 74 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
@@ -79,8 +79,11 @@ clean: | |||
79 | 79 | ||
80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
81 | 81 | ||
82 | md2_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
82 | md2_dgst.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h | 83 | md2_dgst.o: ../../include/openssl/md2.h ../../include/openssl/opensslconf.h |
83 | md2_dgst.o: ../../include/openssl/opensslv.h md2_dgst.c | 84 | md2_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
85 | md2_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
86 | md2_dgst.o: md2_dgst.c | ||
84 | md2_one.o: ../../e_os.h ../../include/openssl/bio.h | 87 | md2_one.o: ../../e_os.h ../../include/openssl/bio.h |
85 | md2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 88 | md2_one.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
86 | md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 89 | md2_one.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
diff --git a/src/lib/libcrypto/md2/md2_dgst.c b/src/lib/libcrypto/md2/md2_dgst.c index e25dd00e02..ecb64f0ec4 100644 --- a/src/lib/libcrypto/md2/md2_dgst.c +++ b/src/lib/libcrypto/md2/md2_dgst.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <openssl/md2.h> | 62 | #include <openssl/md2.h> |
63 | #include <openssl/opensslv.h> | 63 | #include <openssl/opensslv.h> |
64 | #include <openssl/crypto.h> | ||
64 | 65 | ||
65 | const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; | 66 | const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; |
66 | 67 | ||
@@ -118,9 +119,9 @@ const char *MD2_options(void) | |||
118 | int MD2_Init(MD2_CTX *c) | 119 | int MD2_Init(MD2_CTX *c) |
119 | { | 120 | { |
120 | c->num=0; | 121 | c->num=0; |
121 | memset(c->state,0,MD2_BLOCK*sizeof(MD2_INT)); | 122 | memset(c->state,0,sizeof c->state); |
122 | memset(c->cksm,0,MD2_BLOCK*sizeof(MD2_INT)); | 123 | memset(c->cksm,0,sizeof c->cksm); |
123 | memset(c->data,0,MD2_BLOCK); | 124 | memset(c->data,0,sizeof c->data); |
124 | return 1; | 125 | return 1; |
125 | } | 126 | } |
126 | 127 | ||
@@ -196,7 +197,7 @@ static void md2_block(MD2_CTX *c, const unsigned char *d) | |||
196 | t=(t+i)&0xff; | 197 | t=(t+i)&0xff; |
197 | } | 198 | } |
198 | memcpy(sp1,state,16*sizeof(MD2_INT)); | 199 | memcpy(sp1,state,16*sizeof(MD2_INT)); |
199 | memset(state,0,48*sizeof(MD2_INT)); | 200 | OPENSSL_cleanse(state,48*sizeof(MD2_INT)); |
200 | } | 201 | } |
201 | 202 | ||
202 | int MD2_Final(unsigned char *md, MD2_CTX *c) | 203 | int MD2_Final(unsigned char *md, MD2_CTX *c) |
diff --git a/src/lib/libcrypto/md2/md2_one.c b/src/lib/libcrypto/md2/md2_one.c index b12c37ce4d..835160ef56 100644 --- a/src/lib/libcrypto/md2/md2_one.c +++ b/src/lib/libcrypto/md2/md2_one.c | |||
@@ -88,6 +88,6 @@ unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md) | |||
88 | } | 88 | } |
89 | #endif | 89 | #endif |
90 | MD2_Final(md,&c); | 90 | MD2_Final(md,&c); |
91 | memset(&c,0,sizeof(c)); /* Security consideration */ | 91 | OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */ |
92 | return(md); | 92 | return(md); |
93 | } | 93 | } |
diff --git a/src/lib/libcrypto/md2/md2test.c b/src/lib/libcrypto/md2/md2test.c index 7d3664faf5..901d0a7d8e 100644 --- a/src/lib/libcrypto/md2/md2test.c +++ b/src/lib/libcrypto/md2/md2test.c | |||
@@ -61,6 +61,8 @@ | |||
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <openssl/md2.h> | 62 | #include <openssl/md2.h> |
63 | 63 | ||
64 | #include "../e_os.h" | ||
65 | |||
64 | #ifdef OPENSSL_NO_MD2 | 66 | #ifdef OPENSSL_NO_MD2 |
65 | int main(int argc, char *argv[]) | 67 | int main(int argc, char *argv[]) |
66 | { | 68 | { |
@@ -122,8 +124,7 @@ int main(int argc, char *argv[]) | |||
122 | R++; | 124 | R++; |
123 | P++; | 125 | P++; |
124 | } | 126 | } |
125 | exit(err); | 127 | EXIT(err); |
126 | return(0); | ||
127 | } | 128 | } |
128 | 129 | ||
129 | static char *pt(unsigned char *md) | 130 | static char *pt(unsigned char *md) |