# Helper targets #####################################################
-link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl
+link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl \
+ $(BLDDIR)/apps/openssl.cnf
$(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl: configdata.pm
@if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
ln -sf "../$(SRCDIR)/util/`basename "$@"`" "$(BLDDIR)/util"; \
fi
+$(BLDDIR)/apps/openssl.cnf: configdata.pm
+ @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
+ mkdir -p "$(BLDDIR)/apps"; \
+ ln -sf "../$(SRCDIR)/apps/`basename "$@"`" "$(BLDDIR)/apps"; \
+ fi
+
FORCE:
# Building targets ###################################################
# Helper targets #####################################################
-copy-utils: $(BLDDIR)\util\wrap.pl
+copy-utils: $(BLDDIR)\util\wrap.pl $(BLDDIR)\apps\openssl.cnf
$(BLDDIR)\util\wrap.pl: configdata.pm
@if NOT EXIST "$(BLDDIR)\util" mkdir "$(BLDDIR)\util"
@if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\util\$(@F)" "$(BLDDIR)\util"
+$(BLDDIR)\apps\openssl.cnf: configdata.pm
+ @if NOT EXIST "$(BLDDIR)\apps" mkdir "$(BLDDIR)\apps"
+ @if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\apps\$(@F)" "$(BLDDIR)\apps"
+
# Building targets ###################################################
configdata.pm: "$(SRCDIR)\Configure" {- join(" ", map { '"'.$_.'"' } @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -}
my $there = canonpath(catdir(dirname($0), updir()));
my $std_engines = catdir($there, 'engines');
my $std_providers = catdir($there, 'providers');
+my $std_openssl_conf = catdir($there, 'apps/openssl.cnf');
my $unix_shlib_wrap = catfile($there, 'util/shlib_wrap.sh');
$ENV{OPENSSL_ENGINES} = $std_engines
if ($ENV{OPENSSL_ENGINES} // '') eq '' && -d $std_engines;
$ENV{OPENSSL_MODULES} = $std_providers
if ($ENV{OPENSSL_MODULES} // '') eq '' && -d $std_providers;
+$ENV{OPENSSL_CONF} = $std_openssl_conf
+ if ($ENV{OPENSSL_CONF} // '') eq '' && -f $std_openssl_conf;
my $use_system = 0;
my @cmd;