summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-04-17 19:59:12 +0000
committermiod <miod@openbsd.org>2014-04-17 19:59:12 +0000
commit9e593c41da051b34fcc4fd28c28b01f17195edab (patch)
tree56c30e810083ca0746249a0e5a7340cb5b212666
parentBob O.D.'ed on the o_dir code so high he forgot to rm the `test' after (diff)
downloadwireguard-openbsd-9e593c41da051b34fcc4fd28c28b01f17195edab.tar.xz
wireguard-openbsd-9e593c41da051b34fcc4fd28c28b01f17195edab.zip
Use of OPENSSL_SYS_xxx defines in public header files considered harmful.
-rw-r--r--lib/libcrypto/bn/bn.h7
-rw-r--r--lib/libcrypto/ossl_typ.h9
-rw-r--r--lib/libcrypto/pkcs7/pkcs7.h6
-rw-r--r--lib/libcrypto/x509/x509.h7
-rw-r--r--lib/libssl/src/crypto/bn/bn.h7
-rw-r--r--lib/libssl/src/crypto/ossl_typ.h9
-rw-r--r--lib/libssl/src/crypto/pkcs7/pkcs7.h6
-rw-r--r--lib/libssl/src/crypto/x509/x509.h7
-rw-r--r--lib/libssl/src/e_os2.h46
9 files changed, 2 insertions, 102 deletions
diff --git a/lib/libcrypto/bn/bn.h b/lib/libcrypto/bn/bn.h
index 2e3fab98dbc..4959232179b 100644
--- a/lib/libcrypto/bn/bn.h
+++ b/lib/libcrypto/bn/bn.h
@@ -165,12 +165,7 @@ extern "C" {
* For machines with only one compiler (or shared libraries), this should
* be on. Again this in only really a problem on machines
* using "long long's", are 32bit, and are not using my assembler code. */
-#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \
- defined(OPENSSL_SYS_WIN32) || defined(linux)
-# ifndef BN_DIV2W
-# define BN_DIV2W
-# endif
-#endif
+/* #define BN_DIV2W */
/* assuming long is 64bit - this is the DEC Alpha
* unsigned long long is only 64 bits :-(, don't define
diff --git a/lib/libcrypto/ossl_typ.h b/lib/libcrypto/ossl_typ.h
index ae79bf8ae48..3c360b0d9bb 100644
--- a/lib/libcrypto/ossl_typ.h
+++ b/lib/libcrypto/ossl_typ.h
@@ -99,15 +99,6 @@ typedef int ASN1_NULL;
typedef struct ASN1_ITEM_st ASN1_ITEM;
typedef struct asn1_pctx_st ASN1_PCTX;
-#ifdef OPENSSL_SYS_WIN32
-#undef X509_NAME
-#undef X509_EXTENSIONS
-#undef X509_CERT_PAIR
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef OCSP_REQUEST
-#undef OCSP_RESPONSE
-#endif
-
#ifdef BIGNUM
#undef BIGNUM
#endif
diff --git a/lib/libcrypto/pkcs7/pkcs7.h b/lib/libcrypto/pkcs7/pkcs7.h
index 4476d613742..04edb22f75b 100644
--- a/lib/libcrypto/pkcs7/pkcs7.h
+++ b/lib/libcrypto/pkcs7/pkcs7.h
@@ -69,12 +69,6 @@
extern "C" {
#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 thes are defined in wincrypt.h */
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef PKCS7_SIGNER_INFO
-#endif
-
/*
Encryption_ID DES-CBC
Digest_ID MD5
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h
index 27befbbbb01..2b0435686af 100644
--- a/lib/libcrypto/x509/x509.h
+++ b/lib/libcrypto/x509/x509.h
@@ -111,13 +111,6 @@
extern "C" {
#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 these are defined in wincrypt.h */
-#undef X509_NAME
-#undef X509_CERT_PAIR
-#undef X509_EXTENSIONS
-#endif
-
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3
diff --git a/lib/libssl/src/crypto/bn/bn.h b/lib/libssl/src/crypto/bn/bn.h
index 2e3fab98dbc..4959232179b 100644
--- a/lib/libssl/src/crypto/bn/bn.h
+++ b/lib/libssl/src/crypto/bn/bn.h
@@ -165,12 +165,7 @@ extern "C" {
* For machines with only one compiler (or shared libraries), this should
* be on. Again this in only really a problem on machines
* using "long long's", are 32bit, and are not using my assembler code. */
-#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \
- defined(OPENSSL_SYS_WIN32) || defined(linux)
-# ifndef BN_DIV2W
-# define BN_DIV2W
-# endif
-#endif
+/* #define BN_DIV2W */
/* assuming long is 64bit - this is the DEC Alpha
* unsigned long long is only 64 bits :-(, don't define
diff --git a/lib/libssl/src/crypto/ossl_typ.h b/lib/libssl/src/crypto/ossl_typ.h
index ae79bf8ae48..3c360b0d9bb 100644
--- a/lib/libssl/src/crypto/ossl_typ.h
+++ b/lib/libssl/src/crypto/ossl_typ.h
@@ -99,15 +99,6 @@ typedef int ASN1_NULL;
typedef struct ASN1_ITEM_st ASN1_ITEM;
typedef struct asn1_pctx_st ASN1_PCTX;
-#ifdef OPENSSL_SYS_WIN32
-#undef X509_NAME
-#undef X509_EXTENSIONS
-#undef X509_CERT_PAIR
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef OCSP_REQUEST
-#undef OCSP_RESPONSE
-#endif
-
#ifdef BIGNUM
#undef BIGNUM
#endif
diff --git a/lib/libssl/src/crypto/pkcs7/pkcs7.h b/lib/libssl/src/crypto/pkcs7/pkcs7.h
index 4476d613742..04edb22f75b 100644
--- a/lib/libssl/src/crypto/pkcs7/pkcs7.h
+++ b/lib/libssl/src/crypto/pkcs7/pkcs7.h
@@ -69,12 +69,6 @@
extern "C" {
#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 thes are defined in wincrypt.h */
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef PKCS7_SIGNER_INFO
-#endif
-
/*
Encryption_ID DES-CBC
Digest_ID MD5
diff --git a/lib/libssl/src/crypto/x509/x509.h b/lib/libssl/src/crypto/x509/x509.h
index 27befbbbb01..2b0435686af 100644
--- a/lib/libssl/src/crypto/x509/x509.h
+++ b/lib/libssl/src/crypto/x509/x509.h
@@ -111,13 +111,6 @@
extern "C" {
#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 these are defined in wincrypt.h */
-#undef X509_NAME
-#undef X509_CERT_PAIR
-#undef X509_EXTENSIONS
-#endif
-
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3
diff --git a/lib/libssl/src/e_os2.h b/lib/libssl/src/e_os2.h
index 68b2d10c882..c6e38aa831e 100644
--- a/lib/libssl/src/e_os2.h
+++ b/lib/libssl/src/e_os2.h
@@ -62,54 +62,8 @@
extern "C" {
#endif
-/******************************************************************************
- * Detect operating systems. This probably needs completing.
- * The result is that at least one OPENSSL_SYS_os macro should be defined.
- * However, if none is defined, Unix is assumed.
- **/
-
#define OPENSSL_SYS_UNIX
-/* --------------------------------- Unix ---------------------------------- */
-#ifdef OPENSSL_SYS_UNIX
-# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX)
-# define OPENSSL_SYS_LINUX
-# endif
-# ifdef OPENSSL_SYSNAME_MPE
-# define OPENSSL_SYS_MPE
-# endif
-# ifdef OPENSSL_SYSNAME_SNI
-# define OPENSSL_SYS_SNI
-# endif
-# ifdef OPENSSL_SYSNAME_ULTRASPARC
-# define OPENSSL_SYS_ULTRASPARC
-# endif
-# ifdef OPENSSL_SYSNAME_NEWS4
-# define OPENSSL_SYS_NEWS4
-# endif
-# ifdef OPENSSL_SYSNAME_MACOSX
-# define OPENSSL_SYS_MACOSX
-# endif
-# ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY
-# define OPENSSL_SYS_MACOSX_RHAPSODY
-# define OPENSSL_SYS_MACOSX
-# endif
-# ifdef OPENSSL_SYSNAME_SUNOS
-# define OPENSSL_SYS_SUNOS
-#endif
-# if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY)
-# define OPENSSL_SYS_CRAY
-# endif
-# if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX)
-# define OPENSSL_SYS_AIX
-# endif
-#endif
-
-/**
- * That's it for OS-specific stuff
- *****************************************************************************/
-
-
/* Specials for I/O an exit */
# define OPENSSL_EXPORT extern
# define OPENSSL_IMPORT extern