summaryrefslogtreecommitdiff
path: root/lib/libcrypto/des
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-05-24 13:11:02 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-05-24 13:11:02 +0000
commit531b179ca8d046618051ca8dafab318a087cca2b (patch)
tree287b3ace57f9d560ce2ee0105a272026c54f0978 /lib/libcrypto/des
parentf0e887952d8d843c4bac14b5db9ae1841f51c736 (diff)
Expand the OPENSSL_.*GLOBAL.* macros and stop including e_os2.h.
ok miod@ beck@
Diffstat (limited to 'lib/libcrypto/des')
-rw-r--r--lib/libcrypto/des/des.h11
-rw-r--r--lib/libcrypto/des/enc_read.c2
-rw-r--r--lib/libcrypto/des/set_key.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/libcrypto/des/des.h b/lib/libcrypto/des/des.h
index 19a9918766d..de99c73f435 100644
--- a/lib/libcrypto/des/des.h
+++ b/lib/libcrypto/des/des.h
@@ -61,8 +61,6 @@
#include <openssl/opensslconf.h>
-#include <openssl/e_os2.h> /* OPENSSL_DECLARE_GLOBAL, OPENSSL_GLOBAL_REF */
-
#ifdef OPENSSL_NO_DES
#error DES is disabled.
#endif
@@ -109,10 +107,11 @@ typedef struct DES_ks
#define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
-OPENSSL_DECLARE_GLOBAL(int,DES_check_key); /* defaults to false */
-#define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key)
-OPENSSL_DECLARE_GLOBAL(int,DES_rw_mode); /* defaults to DES_PCBC_MODE */
-#define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
+extern int _shadow_DES_check_key; /* defaults to false */
+#define DES_check_key _shadow_DES_check_key
+
+extern int _shadow_DES_rw_mode; /* defaults to DES_PCBC_MODE */
+#define DES_rw_mode _shadow_DES_rw_mode
const char *DES_options(void);
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
diff --git a/lib/libcrypto/des/enc_read.c b/lib/libcrypto/des/enc_read.c
index e1ac04c5b39..8e1ff8e3eb3 100644
--- a/lib/libcrypto/des/enc_read.c
+++ b/lib/libcrypto/des/enc_read.c
@@ -63,7 +63,7 @@
/* This has some uglies in it but it works - even over sockets. */
/*extern int errno;*/
-OPENSSL_IMPLEMENT_GLOBAL(int,DES_rw_mode,DES_PCBC_MODE)
+int _shadow_DES_rw_mode = DES_PCBC_MODE;
/*
diff --git a/lib/libcrypto/des/set_key.c b/lib/libcrypto/des/set_key.c
index e8dea50b962..85a0d2bfc1c 100644
--- a/lib/libcrypto/des/set_key.c
+++ b/lib/libcrypto/des/set_key.c
@@ -66,7 +66,7 @@
#include <openssl/crypto.h>
#include "des_locl.h"
-OPENSSL_IMPLEMENT_GLOBAL(int,DES_check_key,0) /* defaults to false */
+int _shadow_DES_check_key = 0; /* defaults to false */
static const unsigned char odd_parity[256]={
1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14,