summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/cast
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2003-11-18 12:39:05 +0000
committermarkus <markus@openbsd.org>2003-11-18 12:39:05 +0000
commite280eb565d60f596dcccee6bf150f7eca4c0b64e (patch)
tree1ba38db9b7f1efe80d64024f3975753b4d2fc419 /lib/libcrypto/cast
parentunbreak fake authloop for non-existent users (my screwup). Spotted and (diff)
downloadwireguard-openbsd-e280eb565d60f596dcccee6bf150f7eca4c0b64e.tar.xz
wireguard-openbsd-e280eb565d60f596dcccee6bf150f7eca4c0b64e.zip
use bn_asm_vax.S (from netbsd); test + ok by miod
use asm code for i386, except for the CBC code, because it is not clean PIC code. add <machime/asm.h> support to x86unix.pl tested by: nick (on 30386), henning, djm, tedu, jmc and more; no shlib minor crank necessary, only internal symbols changed.
Diffstat (limited to 'lib/libcrypto/cast')
-rw-r--r--lib/libcrypto/cast/asm/cast-586.pl2
-rw-r--r--lib/libcrypto/cast/c_enc.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/cast/asm/cast-586.pl b/lib/libcrypto/cast/asm/cast-586.pl
index 6be0bfe5724..0ed55d1905e 100644
--- a/lib/libcrypto/cast/asm/cast-586.pl
+++ b/lib/libcrypto/cast/asm/cast-586.pl
@@ -28,7 +28,7 @@ $S4="CAST_S_table3";
&CAST_encrypt("CAST_encrypt",1);
&CAST_encrypt("CAST_decrypt",0);
-&cbc("CAST_cbc_encrypt","CAST_encrypt","CAST_decrypt",1,4,5,3,-1,-1);
+&cbc("CAST_cbc_encrypt","CAST_encrypt","CAST_decrypt",1,4,5,3,-1,-1) unless $main'openbsd;
&asm_finish();
diff --git a/lib/libcrypto/cast/c_enc.c b/lib/libcrypto/cast/c_enc.c
index 0fe2cffeccf..e80f65b6986 100644
--- a/lib/libcrypto/cast/c_enc.c
+++ b/lib/libcrypto/cast/c_enc.c
@@ -59,6 +59,7 @@
#include <openssl/cast.h>
#include "cast_lcl.h"
+#ifndef OPENBSD_CAST_ASM
void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
{
register CAST_LONG l,r,*k,t;
@@ -122,6 +123,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
data[1]=l&0xffffffffL;
data[0]=r&0xffffffffL;
}
+#endif
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
CAST_KEY *ks, unsigned char *iv, int enc)