mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Fixes for defaults code
Fix up some indenting, and ensure that the run_once routines don't get defined if OSSL_WINCTX isn't defined to avoid compiler errors Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24450)
This commit is contained in:
parent
290452f2bd
commit
bf74cf35cf
@ -132,11 +132,9 @@ A summary table of behavior on Windows platforms
|
||||
|`OSSL_WINCTX`|Registry key|OpenSSL Behavior |
|
||||
|-------------|------------|------------------------------------------|
|
||||
|Defined | Defined |OpenSSL Reads Paths from Registry |
|
||||
|Defined | Undefined |OpenSSL returns errors on module/conf load|
|
||||
|Defined | Undefined |OpenSSL returns errors on module/conf load|
|
||||
|Undefined | N/A |OpenSSL uses build time defaults |
|
||||
|
||||
|
||||
|
||||
Special notes for Universal Windows Platform builds, aka `VC-*-UWP`
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
@ -18,7 +18,10 @@
|
||||
|
||||
typedef enum OPTION_choice {
|
||||
OPT_COMMON,
|
||||
OPT_B, OPT_D, OPT_E, OPT_M, OPT_F, OPT_O, OPT_P, OPT_V, OPT_A, OPT_R, OPT_C, OPT_W
|
||||
OPT_B, OPT_D, OPT_E, OPT_M, OPT_F, OPT_O, OPT_P, OPT_V, OPT_A, OPT_R, OPT_C
|
||||
#if defined(_WIN32)
|
||||
,OPT_W
|
||||
#endif
|
||||
} OPTION_CHOICE;
|
||||
|
||||
const OPTIONS version_options[] = {
|
||||
|
@ -13,14 +13,14 @@
|
||||
#include "internal/cryptlib.h"
|
||||
#include "internal/e_os.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32) && defined(OSSL_WINCTX)
|
||||
|
||||
# define TOSTR(x) #x
|
||||
# define MAKESTR(x) TOSTR(x)
|
||||
# define NOQUOTE(x) x
|
||||
#if defined(OSSL_WINCTX)
|
||||
# if defined(OSSL_WINCTX)
|
||||
# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" ##"-"## NOQUOTE(OPENSSL_VERSION_STR) ##"-"## MAKESTR(OSSL_WINCTX)
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/**
|
||||
* @brief The directory where OpenSSL is installed.
|
||||
@ -63,7 +63,7 @@ static char *modulesdirptr = NULL;
|
||||
static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
{
|
||||
char *retval = NULL;
|
||||
#ifdef REGISTY_KEY
|
||||
# ifdef REGISTRY_KEY
|
||||
DWORD keysize;
|
||||
DWORD ktype;
|
||||
HKEY hkey;
|
||||
@ -104,7 +104,7 @@ static char *get_windows_regdirs(char *dst, LPCTSTR valuename)
|
||||
out:
|
||||
OPENSSL_free(tempstr);
|
||||
RegCloseKey(hkey);
|
||||
#endif
|
||||
# endif /* REGISTRY_KEY */
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ DEFINE_RUN_ONCE_STATIC(do_defaults_setup)
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(_WIN32) && defined(OSSL_WINCTX) */
|
||||
|
||||
/**
|
||||
* @brief Get the directory where OpenSSL is installed.
|
||||
|
Loading…
Reference in New Issue
Block a user