summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md2
diff options
context:
space:
mode:
authorbeck <>2014-04-15 17:46:17 +0000
committerbeck <>2014-04-15 17:46:17 +0000
commitc9414ed70ec89926c1041a64ee4b2f3ef36c90f6 (patch)
treec53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/md2
parent0cfe49dc6db41fd2d4f960b618ed41b11ffffc6a (diff)
downloadopenbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.gz
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.bz2
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.zip
Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternity
with the bearded ones... some API's that nobody should be using will dissapear with this commit.
Diffstat (limited to 'src/lib/libcrypto/md2')
-rw-r--r--src/lib/libcrypto/md2/md2_one.c16
-rw-r--r--src/lib/libcrypto/md2/md2test.c4
2 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/libcrypto/md2/md2_one.c b/src/lib/libcrypto/md2/md2_one.c
index f7fef5cc0a..cb8594e085 100644
--- a/src/lib/libcrypto/md2/md2_one.c
+++ b/src/lib/libcrypto/md2/md2_one.c
@@ -71,23 +71,7 @@ unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md)
71 if (md == NULL) md=m; 71 if (md == NULL) md=m;
72 if (!MD2_Init(&c)) 72 if (!MD2_Init(&c))
73 return NULL; 73 return NULL;
74#ifndef CHARSET_EBCDIC
75 MD2_Update(&c,d,n); 74 MD2_Update(&c,d,n);
76#else
77 {
78 char temp[1024];
79 unsigned long chunk;
80
81 while (n > 0)
82 {
83 chunk = (n > sizeof(temp)) ? sizeof(temp) : n;
84 ebcdic2ascii(temp, d, chunk);
85 MD2_Update(&c,temp,chunk);
86 n -= chunk;
87 d += chunk;
88 }
89 }
90#endif
91 MD2_Final(md,&c); 75 MD2_Final(md,&c);
92 OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */ 76 OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */
93 return(md); 77 return(md);
diff --git a/src/lib/libcrypto/md2/md2test.c b/src/lib/libcrypto/md2/md2test.c
index db5f5bc6d2..0195214036 100644
--- a/src/lib/libcrypto/md2/md2test.c
+++ b/src/lib/libcrypto/md2/md2test.c
@@ -72,10 +72,6 @@ int main(int argc, char *argv[])
72#include <openssl/evp.h> 72#include <openssl/evp.h>
73#include <openssl/md2.h> 73#include <openssl/md2.h>
74 74
75#ifdef CHARSET_EBCDIC
76#include <openssl/ebcdic.h>
77#endif
78
79static char *test[]={ 75static char *test[]={
80 "", 76 "",
81 "a", 77 "a",