Something that I completely do not understand happened here, and I also can't figure out how it broke. The previous two versions have included the installed copy of the architecture conf header with no problems. However, the 3.8.2 build fails, complaining it can't find openssl/opensslconf.h, and there's no obvious reason why, since the includes appear to happen the same way in the source as before. I've temporarily worked around this issue by making the build system manually copy the platform header around inside the source tree, but this really shouldn't be necessary. There must be something else in the include machinery that changed, but this was a patch release with very minor changes to the portability layer. There were no build system changes I can see that would cause this. It's possible the cause may be revealed by looking at the BSD source differences, but this is truly baffling to me because it seems like it should be 100% a build system issue. The source tree should not mysteriously be able to break the compiler's include path! Of course, it's also entirely possible that the previous versions don't work at all the way I thought they did. But let's actually pretend I'm perfect and that's not possible.
LibreSSL with a Zig build system
This is a somewhat hacky port of the LibreSSL build system to Zig. It builds LibreSSL exclusively as static libraries. It does not (currently) build the LibreSSL command-line executables, like openssl
.
Notes:
-
In order for this to work,
.\update.sh
must have first been run to bring in the LibreSSL OpenBSD sources. (Or, if you trust me, you may use thezig-3.8.1
branch which has the upstream sources committed to the repository, for ease of use with the Zig package manager). -
I don't know if this causes LibreSSL to be compiled in a way that Compromises Its Cryptographic Integrity. Hopefully it is not even possible to do such a thing in the first place. But I am not an expert, and I ain't looking to port the tests.
-
This does not (currently) compile the assembly routines, only the C versions, which may cause reduced performance on some platforms.
-
Only the "big 3" platforms are supported (namely: macOS, Linux, and Windows), and they may be poorly supported, at that. I can cross compile to them from my computer but I have not tried natively compiling on all platforms.
-
Why LibreSSL? It has a CMake-based build system rather than the insane hand-rolled perl mess that OpenSSL does, so it was very straightforward to follow the build process for the purposes of porting it. In theory, its OpenSSL compatibility layer makes it possible to use with a variety of other programs that want to link OpenSSL.