summaryrefslogtreecommitdiffstats
path: root/NOTES-WINDOWS.md
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2024-06-06 20:37:37 +0200
committerNeil Horman <nhorman@openssl.org>2024-07-09 10:01:30 +0200
commitdd2b22d88c9c974f4ca6bce2550f89ac7fb76839 (patch)
tree9213e8dc0ead156dd62364b8782bce3377ccaaf3 /NOTES-WINDOWS.md
parentAvoid NULL pointer dereference (diff)
downloadopenssl-dd2b22d88c9c974f4ca6bce2550f89ac7fb76839.tar.xz
openssl-dd2b22d88c9c974f4ca6bce2550f89ac7fb76839.zip
Add defaults api to openssl build
Build time defaults aren't great for windows, in which various macros (like OPENSSLDIR) are selected at build time, but may be selected differently at install time. Add an internal defaults api to return the build time constants on unix systems, but instead query registry keys for the form: HLKM\SOFTWARE\OpenSSL-{version}-{wininstallcontext} Such that each built version of openssl may maintain its own set of registry keys to identify these locations, and be set administratiely as appropriate at install or run time Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24450)
Diffstat (limited to 'NOTES-WINDOWS.md')
-rw-r--r--NOTES-WINDOWS.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/NOTES-WINDOWS.md b/NOTES-WINDOWS.md
index f4573fd430..e218f28bee 100644
--- a/NOTES-WINDOWS.md
+++ b/NOTES-WINDOWS.md
@@ -125,6 +125,28 @@ Administrator" before running `nmake install`. The other solution
is, of course, to choose a different set of directories by using
`--prefix` and `--openssldir` when configuring.
+Note that, on Windows platforms (both 32 and 64 bit), the above build time
+defaults can be overridden by registry keys. This is done because it is common
+practice for windows based installers to allow users to place the installation
+tree at various locations not defined at build time. The following keys:
+
+ `\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL\OPENSSLDIR`
+ `\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL\ENGINESDIR`
+ `\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\OpenSSL\MODULESDIR`
+
+Can be administratively set, and openssl will take the paths found there as the
+values for OPENSSLDIR, ENGINESDIR and MODULESDIR respectively. If unset, the
+build time defaults will be used.
+
+To enable the reading of registry keys from windows builds, add
+`-DWININSTALLCONTEXT=<string>`to the Configure command line. Without setting
+this, the library defaults back to reporing the build time defaults without
+checking the registry. Note that if you wish to have a private set of registry
+keys for your application, you should set `OPENSSL_VERSION` to a unique value
+
+Note the installer available at <https://github.com/openssl/installer> will set
+these keys when the installer is run.
+
Special notes for Universal Windows Platform builds, aka `VC-*-UWP`
-------------------------------------------------------------------