# define MAKESTR(x) TOSTR(x)
# define NOQUOTE(x) x
# if defined(OSSL_WINCTX)
-# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" ##"-"## NOQUOTE(OPENSSL_VERSION_STR) ##"-"## MAKESTR(OSSL_WINCTX)
+# define REGISTRY_KEY "SOFTWARE\\WOW6432Node\\OpenSSL" ##"-"## MAKESTR(OPENSSL_VERSION_MAJOR) ##"."## MAKESTR(OPENSSL_VERSION_MINOR) ##"-"## MAKESTR(OSSL_WINCTX)
# endif
/**
static char openssldir[MAX_PATH + 1];
/**
- * @brief The pointer to the opennsldir buffer
+ * @brief The pointer to the openssldir buffer
*/
static char *openssldirptr = NULL;
@tempout = run(app(["openssl", "version", "-v"]), capture => 1);
my $version = "@tempout";
$version =~ s/^OpenSSL //;
-$version =~ s/-.*\n//;
+$version =~ s/(^[0-9]+\.[0-9]+)(.*$)/\1/;
my $regkey = "HKLM\\SOFTWARE\\OpenSSL-".$version."-".$context;
$regkey =~ s/\n//g;
my @expectmoddir = run(cmd(["reg.exe", "query", $regkey, "/reg:32", "/t", "REG_EXPAND_SZ", "/v", "MODULESDIR"]), capture => 1);
-my @osslversion = run(app(["openssl", "version", "-d"]), capture => 1);
+my @ossldir = run(app(["openssl", "version", "-d"]), capture => 1);
-print "@osslversion";
+print "@ossldir";
$expect = "@expectossldir";
-$actual = "@osslversion";
+$actual = "@ossldir";
$expect =~ s/HKEY_LOCAL_MACHINE.*\n*//;
$expect =~ s/\n//g;
$expect =~ s/.*REG_EXPAND_SZ *//;