The UEFI/EDK2 build turns off a lot of options that it doesn't use, and
a few of them got broken recently in OpenSSL HEAD. Even no-engine and
no-ui doesn't seem to work correctly any more.

Here are some fixes...

-- 
David Woodhouse                            Open Source Technology Centre
david.woodho...@intel.com                              Intel Corporation


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4310
Please log in as guest with password guest if prompted

>From ffef617e836e383a89be3824719877cf9e48ada3 Mon Sep 17 00:00:00 2001
From: David Woodhouse <david.woodho...@intel.com>
Date: Fri, 5 Feb 2016 16:01:19 +0000
Subject: [PATCH 4/4] Fix no-async build

When OPENSSL_NO_ASYNC is set, make ASYNC_{un,}block_pause() do nothing.

This prevents md_rand.c from failing to build. Probably better to do it
this way than to wrap every instance in an explicit #ifdef.
---
 Configure               | 3 +--
 include/openssl/async.h | 7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Configure b/Configure
index 876d1d7..15d3e88 100755
--- a/Configure
+++ b/Configure
@@ -782,8 +782,7 @@ foreach (sort (keys %disabled))
 		my ($ALGO, $algo);
 		($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
 
-		if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/ || /^async$/
-				|| /^autoalginit/ || /^autoerrinit/)
+		if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/ || /^async$/)
 			{
 			push @{$config{openssl_other_defines}}, "OPENSSL_NO_$ALGO";
 			print " OPENSSL_NO_$ALGO";
diff --git a/include/openssl/async.h b/include/openssl/async.h
index 8ec9b00..99d8075 100644
--- a/include/openssl/async.h
+++ b/include/openssl/async.h
@@ -53,6 +53,12 @@
 #ifndef HEADER_ASYNC_H
 # define HEADER_ASYNC_H
 
+#include <openssl/opensslconf.h>
+
+#ifdef OPENSSL_NO_ASYNC
+#define ASYNC_block_pause() do { ; } while(0)
+#define ASYNC_unblock_pause() do { ; } while(0)
+#else
 #include <stdlib.h>
 
 #if defined(_WIN32)
@@ -116,4 +122,5 @@ void ERR_load_ASYNC_strings(void);
 #ifdef  __cplusplus
 }
 #endif
+#endif /* OPENSSL_NO_ASYNC */
 #endif
-- 
2.5.0

>From 4433f535cf5aafc14c3ba32be370a05da4c32845 Mon Sep 17 00:00:00 2001
From: David Woodhouse <david.woodho...@intel.com>
Date: Fri, 5 Feb 2016 16:01:02 +0000
Subject: [PATCH 3/4] Fix no-sock build

---
 crypto/bio/b_addr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index 20ef8ec..13df916 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -56,6 +56,7 @@
 
 #include "bio_lcl.h"
 
+#ifndef OPENSSL_NO_SOCK
 #include <openssl/err.h>
 #include <openssl/buffer.h>
 #include <ctype.h>
@@ -848,3 +849,4 @@ int BIO_lookup(const char *host, const char *service,
 
     return ret;
 }
+#endif /* OPENSSL_NO_SOCK */
-- 
2.5.0

>From 536aca37e5d9369b4670514341309eac9e4685e0 Mon Sep 17 00:00:00 2001
From: David Woodhouse <david.woodho...@intel.com>
Date: Fri, 5 Feb 2016 16:00:20 +0000
Subject: [PATCH 2/4] Fix no-engine build

We need to drop the crypto/engine directory from the build too, and also
set OPENSSL_NO_ENGINE
---
 Configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Configure b/Configure
index 680735f..876d1d7 100755
--- a/Configure
+++ b/Configure
@@ -772,7 +772,11 @@ foreach (sort (keys %disabled))
 	elsif (/^sse2$/)
 		{ $no_sse2 = 1; }
 	elsif (/^engine$/)
-		{ @{$config{dirs}} = grep !/^engine$/, @{$config{dirs}}; }
+		{
+		@{$config{dirs}} = grep !/^engines$/, @{$config{dirs}};
+		@{$config{sdirs}} = grep !/^engine$/, @{$config{sdirs}};
+		push @{$config{openssl_other_defines}}, "OPENSSL_NO_ENGINE";
+		}
 	else
 		{
 		my ($ALGO, $algo);
-- 
2.5.0

>From 5a7257a7462946bb03a5ae8bc261b6a79ea6b364 Mon Sep 17 00:00:00 2001
From: David Woodhouse <david.woodho...@intel.com>
Date: Fri, 5 Feb 2016 13:40:53 +0000
Subject: [PATCH 1/4] Allow configuration with no-pqueue, no-ripemd, no-ts,
 no-ui

We use these for the UEFI build.

Also remove the 'Really???' comment from no-err and no-locking. We use
those too.
---
 Configure | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Configure b/Configure
index 1077371..680735f 100755
--- a/Configure
+++ b/Configure
@@ -269,13 +269,13 @@ my @disablables = (
     "ec_nistp_64_gcc_128",
     "egd",
     "engine",
-    "err",			# Really???
+    "err",
     "heartbeats",
     "hmac",
     "hw(-.+)?",
     "idea",
     "jpake",
-    "locking",			# Really???
+    "locking",
     "md2",
     "md4",
     "md5",
@@ -286,6 +286,7 @@ my @disablables = (
     "ocsp",
     "poly1305",
     "posix-io",
+    "pqueue",
     "psk",
     "rc2",
     "rc4",
@@ -293,6 +294,7 @@ my @disablables = (
     "rdrand",
     "rfc3779",
     "rijndael",			# Old AES name
+    "ripemd",
     "rmd160",
     "rsa",
     "scrypt",
@@ -311,6 +313,8 @@ my @disablables = (
     "stdio",
     "threads",
     "tls",
+    "ts",
+    "ui",
     "unit-test",
     "whirlpool",
     "zlib",
-- 
2.5.0

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to