VST using OpenSSL built on Win 11 won't work on Win 10

I’ve hit a bit of a dead-end with this problem and I need some advice.
I’m near the end of developing a plug-in and I’m using the OpenSSL library for encryption. It’s been working fine so far - but I recently tested the VST3 on a Windows 10 machine and it didn’t show up in any host. I’ve tried on 4 different Windows 10 machines and it only worked on one of them.
After some trial and error - I found plugin would work if I removed the OpenSSL linked libraries and the encryption code that relied on them.
I had some problems before with OpenSSL on MacOS with targets and versions, so I’m wondering if this is the same kind of thing. I’m building the OpenSSL libraries and the plugin on a Windows 11 machine and it works fine on that computer.
Does anybody have any advice or experience with OpenSSL and Windows plugin development?
I’m sure the information is out there, I’m just having trouble finding it.

Some additional info:
In the Projucer I have the following settings for the Visual Studio exporter…

  • External Libraries to Link has the names of the two .lib files (libssl.lib and libcrypto.lib) each on its own line.
  • Header Search Paths and Extra Library Search Paths both point to their respective locations (…\OpenSSL\include and …\OpenSSL\lib)
  • In Runtime Library I’ve selected “Use static runtime”

I saw a problem here from 2 years ago about spaces in the file path, but I’m not sure if that’s the issue. The plugin builds fine and without error messages, and runs as expected on the build machine.
Am I missing something obvious? I was under the impression I didn’t need to add anything to Extra Linker Flags or Extra Compiler Flags, but maybe I should?

Or maybe there’s a bit of advice on building the OpenSSL library that I’ve missed. I’ve been following their guide for building and installing and it all seemed to go as expected, but there’s often little hidden tricks with these things

So turns out this is one of those “it’s easy when you know how” kind of things…
Basically you need to set no-shared during the Configure stage of building the OpenSSL library.
With no-shared set, you will probably also need to set no-capieng too.
So if you are using OpenSSL as a static library within a plugin, the configure step for building OpenSSL should look something like this:

perl Configure VC-WIN64A no-shared no-capieng

(if you need CAPI then you’ll need a slightly different setup, but this worked for me)
The whole Windows 10/11 thing was just a red herring, and the Projucer setup was all correct.
I hope this information helps somebody in the future.

1 Like